org.apache.tapestry.form
Class RequirableFieldSupportImpl

java.lang.Object
  extended by org.apache.tapestry.form.RequirableFieldSupportImpl
All Implemented Interfaces:
RequirableFieldSupport

public class RequirableFieldSupportImpl
extends java.lang.Object
implements RequirableFieldSupport

Default RequirableFieldSupport implementation. This implementation generates calls to a static javascript function during render if client-side validation is enabled.

Since:
4.0
Author:
Paul Ferraro

Constructor Summary
RequirableFieldSupportImpl()
           
 
Method Summary
protected  java.lang.String buildRequiredMessage(RequirableField component)
           
 void render(RequirableField component, IMarkupWriter writer, IRequestCycle cycle)
          Called by the RequiredField during render to generate client-side validation logic.
 void rewind(RequirableField component, IMarkupWriter writer, IRequestCycle cycle)
          Called by the RequiredField during rewind to perform required field checking.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RequirableFieldSupportImpl

public RequirableFieldSupportImpl()
Method Detail

render

public void render(RequirableField component,
                   IMarkupWriter writer,
                   IRequestCycle cycle)
Description copied from interface: RequirableFieldSupport
Called by the RequiredField during render to generate client-side validation logic.

Specified by:
render in interface RequirableFieldSupport
See Also:
RequirableFieldSupport.render(org.apache.tapestry.form.RequirableField, org.apache.tapestry.IMarkupWriter, org.apache.tapestry.IRequestCycle)

rewind

public void rewind(RequirableField component,
                   IMarkupWriter writer,
                   IRequestCycle cycle)
Description copied from interface: RequirableFieldSupport
Called by the RequiredField during rewind to perform required field checking.

Specified by:
rewind in interface RequirableFieldSupport
See Also:
RequirableFieldSupport.rewind(org.apache.tapestry.form.RequirableField, org.apache.tapestry.IMarkupWriter, org.apache.tapestry.IRequestCycle)

buildRequiredMessage

protected java.lang.String buildRequiredMessage(RequirableField component)