-
FEATURED COMPONENTS
First time here? Check out the FAQ!
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
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
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
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
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 ?
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
Asked: 2010-07-12 08:41:24 +0800
Seen: 775 times
Last updated: Jul 27 '10