org.ztemplates.web
Interface ZIRenderService

All Superinterfaces:
ZIService
All Known Implementing Classes:
ZRenderServiceImpl, ZRenderServiceSpring

public interface ZIRenderService
extends ZIService


Field Summary
static String SPRING_NAME
           
 
Method Summary
 String createJavaScriptId()
          creates a per request unique id for usage in javascript.
 String createJavaScriptId(String prefix)
          creates a per request unique id for usage in javascript.
 String getCssId(Class clazz)
          computes the cssId for the provided object
 String getJavaScriptIdPrefix()
          the prefix used when creating javascript ids.
 ZIRenderedObject prerender(Object obj)
          renders a object to a object that can be cached, just expose the returned object with @ZExpose(render=true).
 String render(Object obj)
          renders the object to a string
 String renderZtemplatesCss()
          renders ztemplates.css
 void setJavaScriptIdPrefix(String javaScriptIdPrefix)
          manually sets the prefix used when creating JavaScriptIds, use to have full control over the ids created
 

Field Detail

SPRING_NAME

static final String SPRING_NAME
See Also:
Constant Field Values
Method Detail

render

String render(Object obj)
              throws Exception
renders the object to a string

Parameters:
obj -
Throws:
Exception

prerender

ZIRenderedObject prerender(Object obj)
                           throws Exception
renders a object to a object that can be cached, just expose the returned object with @ZExpose(render=true).

Parameters:
obj -
Returns:
Throws:
Exception

renderZtemplatesCss

String renderZtemplatesCss()
                           throws Exception
renders ztemplates.css

Returns:
Throws:
Exception

createJavaScriptId

String createJavaScriptId()
creates a per request unique id for usage in javascript. Ids are guaranteed to be unique in request scope as well as for future requests of the same user, so one can safely cache prerendered pojos.


createJavaScriptId

String createJavaScriptId(String prefix)
creates a per request unique id for usage in javascript. Ids are guaranteed to be unique in request scope as well as for future requests of the same user, so one can safely cache prerendered pojos.


setJavaScriptIdPrefix

void setJavaScriptIdPrefix(String javaScriptIdPrefix)
manually sets the prefix used when creating JavaScriptIds, use to have full control over the ids created

Parameters:
javaScriptIdPrefix -

getJavaScriptIdPrefix

String getJavaScriptIdPrefix()
the prefix used when creating javascript ids.

Returns:

getCssId

String getCssId(Class clazz)
computes the cssId for the provided object

Parameters:
obj -
Returns:


Copyright © 2011. All Rights Reserved.