-
Bug
-
Resolution: Unresolved
-
Normal
-
None
-
6.5.0, 6.5.2
-
None
When using sapphire as a preferred theme, "zktheme" cookie with value "sapphire" is not set at the client, causing HTML body to incorrectly have CSS class="breeze" instead of "sapphire".
zk.xml config:
<library-property>
<name>org.zkoss.theme.preferred</name>
<value>sapphire</value>
</library-property>
This issue could be fixed by extending StandardThemeProvider and overriding getThemeURIs method like this:
@Override
public Collection<Object> getThemeURIs(Execution exec, List<Object> uris) {
super.getThemeURIs(exec, uris);
// Fixing theme cookie (won't be set otherwise)
if (Https.getCookieValue((HttpServletRequest) exec.getNativeRequest(), "zktheme") == null)
return uris;
}