Override multiple css as a zk theme through programming

asked 2013-04-16 04:59:46 +0800

hswain gravatar image hswain flag of India
1763 3 10

How can we dynamically change the css in ZK theme from class level. As per my req2uirement I have to chage the css in ZK theme after login, We will select css on the basis of loged in user.

delete flag offensive retag edit

3 Answers

Sort by ยป oldest newest most voted

answered 2013-04-25 12:33:59 +0800

nsharma gravatar image nsharma flag of India
917 1 11

updated 2014-10-29 11:53:16 +0800

create a class implementing ThemeProvider interface ,use getThemeURIs() method to set different CSS style.You have to create a new cookie for that theme and then refresh your UI.And retrieve those cookie in getThemeURIs(),give your CSS file path to the uri parameter.

In zk.xml you have to add a element


see here for better understanding.

link publish delete flag offensive edit


i need full war file of demo project

hswain ( 2013-04-25 12:44:52 +0800 )edit

edited the answer ,click the link for explanation.

nsharma ( 2013-04-25 13:19:28 +0800 )edit

answered 2013-04-25 13:06:52 +0800

Senthilchettyin gravatar image Senthilchettyin flag of India
2615 3 8

Check here

And check here

link publish delete flag offensive edit


great post.

hswain ( 2013-04-25 16:07:49 +0800 )edit

answered 2014-10-30 08:08:22 +0800

wiboralek gravatar image wiboralek

great :) works quite well

link publish delete flag offensive edit
Your answer
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




Asked: 2013-04-16 04:59:46 +0800

Seen: 75 times

Last updated: Oct 30 '14

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