org.springframework.extensions.webscripts
Class ScriptForm

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

public final class ScriptForm
extends ScriptBase

Describes a Form that can be bound for the currently rendering component.

Author:
muzquiano
See Also:
Serialized Form

Nested Class Summary
 class ScriptForm.FormBinding
           
 
Field Summary
 
Fields inherited from class org.springframework.extensions.webscripts.ScriptBase
context, properties
 
Constructor Summary
ScriptForm(RenderContext context)
          Instantiates a new script form.
 
Method Summary
 void bind(String title, Object value)
          Binds an element to this form.
 ScriptForm.FormBinding bind(String id, Object value, Object nullValue)
          Binds an element to this form.
protected  ScriptableMap buildProperties()
           
 ScriptForm.FormBinding getBinding(String id)
          Gets an element form binding.
 String[] getBindingIds()
          Gets the ids of all element form bindings.
 Object[] getBindings()
          Gets the bindings.
protected static String getPrefix(RenderContext context)
           
protected static String prefix(RenderContext context, String id)
           
protected static String unprefix(String prefixedId)
           
 
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

ScriptForm

public ScriptForm(RenderContext context)
Instantiates a new script form.

Parameters:
context - the request context
Method Detail

buildProperties

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

bind

public void bind(String title,
                 Object value)
Binds an element to this form.

Parameters:
title - the title
value - the value

bind

public ScriptForm.FormBinding bind(String id,
                                   Object value,
                                   Object nullValue)
Binds an element to this form.

Parameters:
title - the title
value - the value
nullValue - the null value
Returns:
the object

getBinding

public ScriptForm.FormBinding getBinding(String id)
Gets an element form binding.

Parameters:
id - the id
Returns:
the binding

getBindings

public Object[] getBindings()
Gets the bindings.

Returns:
the bindings

getBindingIds

public String[] getBindingIds()
Gets the ids of all element form bindings.

Returns:
the binding ids

getPrefix

protected static String getPrefix(RenderContext context)

prefix

protected static String prefix(RenderContext context,
                               String id)

unprefix

protected static String unprefix(String prefixedId)


Copyright © 2009 SpringSource, Inc. All Rights Reserved.