0

Breeze Theme activation at application startup time

asked 2011-02-24 13:04:33 +0800

SimonDark gravatar image SimonDark
6

Hallo all,

I have an issue with loading the Breeze theme at application startup time.
Instead, Classic Blue is loaded at the very first time the application is started.
Theme switching (Classic Blue -> Breeze) occurs only after explicitely invoking:

Themes.setTheme(Executions.getCurrent(), Themes.BREEZE_THEME);

and refreshing the page. This creates the zktheme cookie with the correct entry "breeze" and
adds it to the HttpServletResponse. After the cookie was created everything works as expected.

According to the documentation it is sufficient to put the breeze.jar in /WEB-INF/lib to make
Breeze a default theme. Unfortunately this is not what happens in my case.

I experimented a little bit and I can confirm that the correct provider was retrieved at(actually before) page construction time.
Within

doBeforeCompose(Page page, Component parent, ComponentInfo compInfo)

of the main component in my application I tried the following:
Desktop desktop 		                        = page.getDesktop();
WebApp webApp 			        = desktop.getWebApp();
Configuration config 		                = webApp.getConfiguration();
ThemeProvider themeProvider 	= config.getThemeProvider();

The value of the themeProvider was of type org.zkoss.breeze.BreezeThemeProvider
so I assume that I am getting the correct provider at this point.

On the other side invoking

Themes.getTheme(Executions.getCurrent());

within the same method returned an empty String.

Invoking

Themes.setTheme(Executions.getCurrent(), Themes.BREEZE_THEME);

at this point did not have any effect and the main page was rendered with the Classic Blue theme.

Has anyone experienced similar issues ? Any help or hints will be greatly appreciated.

My Configuration



ZK 5.0.5
breeze.jar (5.0.5) - deployed within my /WEB-INF/lib folder
Spring MVC 3.0.4
Spring Security 3.0.3
JPA 2.0
...
etc.

Apache-Tomcat-6.0.20

delete flag offensive retag edit

2 Replies

Sort by ยป oldest newest

answered 2011-03-24 08:21:12 +0800

lcarlesso gravatar image lcarlesso
21 1

I have the same problem.. did you fix it?

link publish delete flag offensive edit

answered 2011-08-31 22:58:21 +0800

jumperchen gravatar image jumperchen
3909 2 8
http://jumperchen.blogspo... ZK Team

Please upgrade to latest ZK 5.0.8 version, and give it a try.

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: 2011-02-24 13:04:33 +0800

Seen: 404 times

Last updated: Aug 31 '11

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