# 12:/basicconcepts/zkthemer/index.dsp

asked 2009-07-03 06:26:48 +0800

anonymous
1

Wow!
Fantastic!

Finally, a long awaited theme customization is available!

Great, fantastic job!

delete retag edit

## 63 Replies

Sort by » oldest newest

answered 2009-07-13 14:02:37 +0800

anonymous
1

Thanks for the response Jose. I have another question, the ThemeProvider class you mentioned that I have to change, is it the one inside the jar theme or can I provide it in my application? If is the one inside the generated jar file, could it be possible for you to update the theme generator to provide for this function? Thanks.

answered 2009-07-13 17:16:37 +0800

anonymous
1

José,

I was unable to get it to work (I'm running on windows/tomcat). I've tried to unzip the contents of the jar (web folder), place it in my project's web folder (that was the only way I got for my browser to see the .css.dsp files) and implemented the ThemeProvider to point to that directory, but it keeps not loading the theme.

The only weird thing I noticed is that the zkthemer.jar is not generating a /js/ folder.
Is that a problem? Looks like ZK is expecting that folder.

<link rel="stylesheet" type="text/css" href="/my_project/zkau/web/lila/zul/css/normmoz.css.dsp"/>
<link rel="stylesheet" type="text/css" href="/my_project/zkau/web/lila<b >/js/</b>ext/timeplot/api/styles/timeplot-bundle.css"/>
<link rel="stylesheet" type="text/css" href="/my_project/zkau/web/lila/zkex/zul/css/zkexmoz.css.dsp"/>
<link rel="stylesheet" type="text/css" href="/my_project/zkau/web/lila/zkmax/zul/css/zkmaxmoz.css.dsp"/>


Any ideas?

answered 2009-07-15 06:51:38 +0800

anonymous
1

This is really delightful. Robbie has kindly offered to put the file onto zkforge. Why not get commit access to zkforge from the project guys and then put you code there and folks can then help upgrade it to zk5?

:-)

Well done.

answered 2009-07-15 18:40:49 +0800

anonymous
1

Hi!

@abatista You have to provide your own ThemeProvider class to get the functionality you want and then put the fully qualified name in your zk.xml. It is very easy to do.

answered 2009-07-16 12:30:33 +0800

anonymous
1

Thanks again Jose. I have been playing with it for a while and what I did is this. I created my own class inside my application called CustomThemeProvider and I used the same methods that you posted above. I also changed the zk.xml so that it uses my java class for the theme provider. When the application loads, I am able to load the generated color jar with no problem, but if I have multiple jars, it loads the first one in alphabetical order. For example, I have jars: red.jar, green.jar and lila.jar and green is the one that loads. I discovered that if I change the "themeName" global variable inside getThemeURIs to the theme I want, it loads. For example:

uri = "~./" + "lila" + "/" + uri.substring(3);

This will load the lila theme instead of the green.jar. This only works when the application loads, so I am trying to get the same result at runtime. So far what I have done is this:

ArrayList dsps = new ArrayList();

CustomThemeProvider tp = new CustomThemeProvider();
tp.themeName="lila";
tp.getThemeURIs(Executions.getCurrent(), dsps);

This method gets called when I push a button to change the theme. So far I haven't been able to get it to work, the theme doesn't change. I guess I'm missing something that must be done in order to load the theme that I specified. Any help is greatly appreciated. Thanks.

answered 2009-07-20 02:31:10 +0800

anonymous
1

Hi all,
When starting my application with the custom theme generated by the ZK Themer, only the Calendar component is not rendered correctly.
Someone had this problem? Can you help me?

answered 2009-07-22 14:30:19 +0800

anonymous
1

What about a versino of zkthemer for zk 5 ?

Thanks

answered 2009-07-26 17:28:54 +0800

anonymous
1

EVERE: Unable to load /WEB-INF/zk.xml
org.zkoss.zk.ui.UiException: Unable to load zkthemer.ThemeProvider, at [SYS jndi:/localhost/CSS-M-eye/WEB-INF/zk.xml line 8 col 17]

He conseguido que funcione, lo he hecho de la siguiente forma.

1. copie el archivo zkthemer.jar al directorio lib del proyecto.
2. generé el archivo de tema ejecutando zkthemer.jar desde el directorio lib:
lbertel@aldebaran ~/Proyectos/workspace/geored_zk/web/WEB-INF/lib \$ java -jar zkthemer.jar -c d8d8d8 -z . -t lila
Generated file: lila.ja
3. Se modifica el zk.xml
4. Adicionar al buld path del proyecto el archivo lila.jar.
4. Se realiza un clean del proyecto, para que reconstruya el proyecto.
5. y por último realice un refresh del proyecto (F5).

Y todo ok, funciono correctamente.

answered 2009-07-28 04:16:41 +0800

anonymous
1

Hello Folks!

ZK Studio Team already build a POC for the integration of this tool to ZK Studio.

Hop we can release soon!

answered 2009-08-06 16:31:46 +0800

anonymous
1

Hi, sorry i have since yet not can run the zkthemer well. I have done a lila.jar but no success by implementing in the application.

I work on windows system.

But by testing it, i have at a time become a 'attribut cannot be serializized' error. Please have early a look for this when running in clustered environment.

regards
Stephan

[hide preview]

## Stats

Asked: 2009-07-03 06:26:48 +0800

Seen: 71 times

Last updated: Feb 25 '11

Support Options
• Email Support
• Training
• Consulting
• Outsourcing