0

Customized CSS does not work

asked 2010-07-12 08:41:24 +0800

kapil4ya gravatar image kapil4ya
172 2

Hi guys,

I am customized the css rules and the images for our application. Basically I am changing the images provided in the zul.jar with custom ones and also having different css rules (mostly related to color other than blue).

I have a separate jar file for this and also I am overriding those values in the zul.jar file.

On one of the jboss servers (my local), the theme applies perfectly, the images change properly and css also applies, but on other jboss server, only the images change and the css rules remain as it is defined in the zul.jar file.

Can it be an issue with classloading ?

I have exact same configuration on both jboss servers.

Thanks

delete flag offensive retag edit

8 Replies

Sort by ยป oldest newest

answered 2010-07-13 03:03:40 +0800

vinhvo gravatar image vinhvo
369 3

Can you clean your webapps ?. Sometimes, the css and images stuff still remain for a while .

link publish delete flag offensive edit

answered 2010-07-13 23:05:29 +0800

SimonPai gravatar image SimonPai
1696 1

Hi kapil4ya,

I would second vinhvo's suggestion. To narrow down the range of the problem, you can also clear browser cache.

Regards,
Simon

link publish delete flag offensive edit

answered 2010-07-14 00:04:47 +0800

kapil4ya gravatar image kapil4ya
172 2

Thanks to both of you,

I have done all the things as suggested by you, clearing browser cache and all that, but still, it does not work.

Thanks again !

link publish delete flag offensive edit

answered 2010-07-15 20:11:00 +0800

SimonPai gravatar image SimonPai
1696 1

Hi kapil4ya,

Just wondering, what is the mechanism you replace the image file and the CSS entries? Do you replace the images and CSS files in zul.jar directly?
From you description I can't point out where the problem is. But if that doesn't work, you can also consider including a style sheet in your zul file, which can override the default values.

Simon

link publish delete flag offensive edit

answered 2010-07-24 00:27:31 +0800

kapil4ya gravatar image kapil4ya
172 2

Hi SimonPai,

I am first extracting the contents of the jar file (zul.jar) and replacing the images folder (zul\web\zul\img) with mine and then I create the zul.jar file with standard jar creation utility program and include that jar file in the application. This image replacement works.

As for css, we have a silvergray.jar and silvergray-tod.jar file with color.css.dsp and img.css.dsp file. There we have defined all the css colors. This is where I see the problem is, sometimes the contents of the silvergray.jar file take precedence over the ones defined in zul\web\zul\css\zk.wcs and norm.css and ext.css.


Thanks

link publish delete flag offensive edit

answered 2010-07-25 21:16:41 +0800

SimonPai gravatar image SimonPai
1696 1

Hi kapil4ya,

Are you using silvergray.jar or silvergray-tod.jar with a ThemeProvider? In the former case, I have yet reproduced the issue, and from my understanding I can't think of why the gray theme CSS will come before zk.wcs, as they are specified in lang-addon.xml. For the latter case, I need to know how you implmeneted the ThemeProvider.

Simon

link publish delete flag offensive edit

answered 2010-07-27 03:00:13 +0800

kapil4ya gravatar image kapil4ya
172 2

Hi SimonPai,

I am simple using both the jar files (silvergray and silvergray-tod) with same contents, and including them in the lib directory of the web app.

" I can't think of why the gray theme CSS will come before zk.wcs, as they are specified in lang-addon.xml"

Please elaborate more on this, what lang-addon.xml has to do with theme ?

link publish delete flag offensive edit

answered 2010-07-27 03:25:20 +0800

SimonPai gravatar image SimonPai
1696 1

kapil4ya,

If you don't need to switch themes dynamically, you should just include silvergray.jar in the lib folder. (I just figured out the latest silvergray.zip doesn't come with a readme file, we will put it back.)
If you extract silvergray.jar, you can see a lang-addon.xml under metainfo/zk, with the following content:

<?xml version="1.0" encoding="UTF-8"?> 
<language-addon> 
	<addon-name>silvergray</addon-name> 
	<depends>zul,zkex,zkmax</depends> 
	<language-name>xul/html</language-name> 
	<stylesheet href="~./silvergray/img.css.dsp" type="text/css"/> 
	<stylesheet href="~./silvergray/color.css.dsp" type="text/css"/> 
</language-addon> 

This should specify the system to load zul, zkex, zkmax (if any) language definitions (which includes the original CSS) prior to loading silvergray CSS files.
Anyway, you can try to remove silvergray-tod.jar and see if that changes anything. Meanwhile I will try to think of more ways to inspect your situation.

Simon

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2010-07-12 08:41:24 +0800

Seen: 775 times

Last updated: Jul 27 '10

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More