org.springframework.extensions.webscripts
Class ScriptRenderingInstance

java.lang.Object
  extended by org.springframework.extensions.webscripts.ScriptBase
      extended by org.springframework.extensions.webscripts.ScriptRenderingInstance
All Implemented Interfaces:
Serializable

public final class ScriptRenderingInstance
extends ScriptBase

Wraps the renderer instance and provisions properties about the currently rendering item to the script writer. The following is valid: var object = instance.object; var objectId = instance.id; var user = instance.user; var renderingProperties = instance.properties;

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.springframework.extensions.webscripts.ScriptBase
context, properties
 
Constructor Summary
ScriptRenderingInstance(RenderContext context)
          Instantiates a new script renderer instance.
 
Method Summary
protected  ScriptableMap buildProperties()
           
 String getHtmlId()
          Gets the html id
 String getId()
          Gets the id.
 ScriptModelObject getObject()
          Gets the object.
 Object getParameter(String name)
          Returns the value of a request parameter
 String[] getParameterNames()
          Returns the names of request parameters
 org.mozilla.javascript.Scriptable getParameters()
          Returns a scriptable map of name/value pairs
 
Methods inherited from class org.springframework.extensions.webscripts.ScriptBase
getConfig, getModel, getObject, getProperties, getRequestContext, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ScriptRenderingInstance

public ScriptRenderingInstance(RenderContext context)
Instantiates a new script renderer instance.

Parameters:
context - the render context
Method Detail

buildProperties

protected ScriptableMap buildProperties()
Specified by:
buildProperties in class ScriptBase

getObject

public ScriptModelObject getObject()
Gets the object.

Returns:
the object

getId

public String getId()
Gets the id.

Returns:
the id

getHtmlId

public String getHtmlId()
Gets the html id

Returns:

getParameterNames

public String[] getParameterNames()
Returns the names of request parameters

Returns:
array of names (String)

getParameter

public Object getParameter(String name)
Returns the value of a request parameter

Parameters:
name -
Returns:

getParameters

public org.mozilla.javascript.Scriptable getParameters()
Returns a scriptable map of name/value pairs

Returns:


Copyright © 2009 SpringSource, Inc. All Rights Reserved.