org.ztemplates.web.spring
Class ZRenderServiceSpring

java.lang.Object
  extended by org.ztemplates.web.spring.ZRenderServiceSpring
All Implemented Interfaces:
ZIRenderService, ZIService

@Component(value="ZIRenderService")
@Scope(value="request")
public class ZRenderServiceSpring
extends Object
implements ZIRenderService

Spring proxy for ZIRenderService

Author:
gerd

Field Summary
 
Fields inherited from interface org.ztemplates.web.ZIRenderService
SPRING_NAME
 
Constructor Summary
ZRenderServiceSpring()
           
 
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
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ZRenderServiceSpring

public ZRenderServiceSpring()
Method Detail

render

public String render(Object obj)
              throws Exception
Description copied from interface: ZIRenderService
renders the object to a string

Specified by:
render in interface ZIRenderService
Throws:
Exception

prerender

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

Specified by:
prerender in interface ZIRenderService
Returns:
Throws:
Exception

renderZtemplatesCss

public String renderZtemplatesCss()
                           throws Exception
Description copied from interface: ZIRenderService
renders ztemplates.css

Specified by:
renderZtemplatesCss in interface ZIRenderService
Returns:
Throws:
Exception

createJavaScriptId

public String createJavaScriptId()
Description copied from interface: ZIRenderService
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.

Specified by:
createJavaScriptId in interface ZIRenderService

createJavaScriptId

public String createJavaScriptId(String prefix)
Description copied from interface: ZIRenderService
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.

Specified by:
createJavaScriptId in interface ZIRenderService

setJavaScriptIdPrefix

public void setJavaScriptIdPrefix(String javaScriptIdPrefix)
Description copied from interface: ZIRenderService
manually sets the prefix used when creating JavaScriptIds, use to have full control over the ids created

Specified by:
setJavaScriptIdPrefix in interface ZIRenderService

getJavaScriptIdPrefix

public String getJavaScriptIdPrefix()
Description copied from interface: ZIRenderService
the prefix used when creating javascript ids.

Specified by:
getJavaScriptIdPrefix in interface ZIRenderService
Returns:

getCssId

public String getCssId(Class clazz)
Description copied from interface: ZIRenderService
computes the cssId for the provided object

Specified by:
getCssId in interface ZIRenderService
Returns:


Copyright © 2011. All Rights Reserved.