Default exposed values#

The following values are exposed by default by the rendering engine and can be used as ${variableName} in your templates. You can turn this behavior on/off with the @ZRenderer annotation.

  • "contextPath" (exposed default=true) - the context path of the webapp. Useful when creating urls.
  • "cssId" (exposed default=true) - a value that can be used to name css styles or to define skins for your webapp. Add the cssId to the style names associated with a template, like for example: Then use cssId in your css files like this (at runtime cssId will be replaced with the string "MyFile"):

in the velocity template MyFile.vm (same location as class file)

<div class="${cssId}-header">Header</div>

in the css fragment MyFile.css (same location as class file)

.${cssId}-header {
  • zscript (exposed default=false) - AJAX-Support, exposes the javascript and css html-tags accumulated till now. Use to automatically generate the correct JavaScript and Css Tags.

Overrriding default values#

You can override the default values by exposing a property with the same name from the render-pojo.
public String getCssId() {
   return "myCssId";

Neuen Anhang hinzuf�gen

Du bist nicht autorisiert, Anh�nge zu dieser Seite hochzuladen.
« Diese Seite (Version-) wurde zuletzt am 18-Nov-2009 08:54 von ge�ndert.