From Documentation

Jump to: navigation, search







Contents


Themes comprises of stylesheets and images. The URLs for those resources must be resolved once the theme changes.

Several APIs were available to redirect theme resources to the correct location.

ServletFns.encodeThemeURL(String) is for translating image locations inside *.css.dsp files.

ServletFns.resolveThemeURL(String) is for redirecting the retrieval of stylesheets inside a ThemeProvider.

Example Usage (inside *.css.dsp)

tr.z-row-over > td.z-row-inner, tr.z-row-over > .z-cell {
    background-image: url(${c:encodeThemeURL('~./zul/img/grid/column-over.png')});
}

Example Usage (inside a ThemeProvider):

...
public String beforeWidgetCSS(Execution exec, String uri) {
	if (uri.startsWith("~./zul/css/") ||
		uri.startsWith("~./js/zul/")) {
		
		uri = ServletFns.resolveThemeURL(uri);
	}
	
	return uri;
}
...



Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.



You got stuck here?
Let us know how we can improve this page
For specific questions please use the forum