org.apache.tapestry.form
Class ValidatableFieldSupportImpl

java.lang.Object
  extended by org.apache.tapestry.form.ValidatableFieldSupportImpl
All Implemented Interfaces:
ValidatableFieldSupport

public class ValidatableFieldSupportImpl
extends java.lang.Object
implements ValidatableFieldSupport

Default VadidatableFieldSupport 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
ValidatableFieldSupportImpl()
           
 
Method Summary
 void bind(ValidatableField component, IMarkupWriter writer, IRequestCycle cycle, java.lang.String value)
          Called during rewind of the specified component.
protected  java.lang.String getTranslatedValue(ValidatableField component)
           
protected  java.util.Iterator getValidatorsIterator(ValidatableField component)
           
 void render(ValidatableField component, IMarkupWriter writer, IRequestCycle cycle)
          Called during render of the specified component.
 void renderContributions(ValidatableField component, IMarkupWriter writer, IRequestCycle cycle)
          Called during render of the specified component.
 void setThreadLocale(org.apache.hivemind.service.ThreadLocale threadLocale)
           
 void setValueConverter(ValueConverter converter)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValidatableFieldSupportImpl

public ValidatableFieldSupportImpl()
Method Detail

setValueConverter

public void setValueConverter(ValueConverter converter)

setThreadLocale

public void setThreadLocale(org.apache.hivemind.service.ThreadLocale threadLocale)

getValidatorsIterator

protected java.util.Iterator getValidatorsIterator(ValidatableField component)

render

public void render(ValidatableField component,
                   IMarkupWriter writer,
                   IRequestCycle cycle)
Description copied from interface: ValidatableFieldSupport
Called during render of the specified component. Determines form element value used to render element.

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

renderContributions

public void renderContributions(ValidatableField component,
                                IMarkupWriter writer,
                                IRequestCycle cycle)
Description copied from interface: ValidatableFieldSupport
Called during render of the specified component. Renders any contributions from translator and validators.

Specified by:
renderContributions in interface ValidatableFieldSupport
See Also:
ValidatableFieldSupport.renderContributions(org.apache.tapestry.form.ValidatableField, org.apache.tapestry.IMarkupWriter, org.apache.tapestry.IRequestCycle)

getTranslatedValue

protected java.lang.String getTranslatedValue(ValidatableField component)

bind

public void bind(ValidatableField component,
                 IMarkupWriter writer,
                 IRequestCycle cycle,
                 java.lang.String value)
Description copied from interface: ValidatableFieldSupport
Called during rewind of the specified component. Specified value is translated via the component's translator then validated using the component's validators.

Specified by:
bind in interface ValidatableFieldSupport
See Also:
ValidatableFieldSupport.bind(org.apache.tapestry.form.ValidatableField, org.apache.tapestry.IMarkupWriter, org.apache.tapestry.IRequestCycle, java.lang.String)