6

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
http://corejavaexample.bl...

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
3

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

<desktop-config>
        <theme-provider-class>package.yourclass</theme-provider-class>
    </desktop-config>

see here for better understanding.

link publish delete flag offensive edit

Comments

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
2

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

Senthilchettyin gravatar image Senthilchettyin flag of India
2623 3 8
http://emrpms.blogspot.in...

Check here

And check here

link publish delete flag offensive edit

Comments

great post.

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

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

wiboralek gravatar image wiboralek
1
http://www.kolejkapokase....

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

Follow
2 followers

RSS

Stats

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