Home » tapestry-src-5.0.19 » org.apache.tapestry5.corelib.base » [javadoc | source]
org.apache.tapestry5.corelib.base
abstract public class: AbstractTextField [javadoc | source]
java.lang.Object
   org.apache.tapestry5.corelib.base.AbstractField
      org.apache.tapestry5.corelib.base.AbstractTextField

All Implemented Interfaces:
    Field

Direct Known Subclasses:
    TextArea, TextField, PasswordField

Abstract class for a variety of components that render some variation of a text field. Most of the hooks for user input validation are in this class.

In particular, all subclasses support the "toclient" and "parseclient" events. These two events allow the normal Translator (specified by the translate parameter, but often automatically derived by Tapestry) to be augmented.

If the component container (i.e., the page) provides an event handler method for the "toclient" event, and that handler returns a non-null string, that will be the string value sent to the client. The context passed to the event handler method is t he current value of the value parameter.

Likewise, on a form submit, the "parseclient" event handler method will be passed the string provided by the client, and may provide a non-null value as the parsed value. Returning null allows the normal translator to operate. The event handler may also throw org.apache.tapestry5.ValidationException .
Method from org.apache.tapestry5.corelib.base.AbstractTextField Summary:
begin,   defaultAnnotationProvider,   defaultTranslate,   defaultValidate,   defaultValue,   getWidth,   ignoreBlankInput,   isRequired,   processSubmission,   writeFieldTag
Methods from org.apache.tapestry5.corelib.base.AbstractField:
afterDecorator,   beforeDecorator,   createDefaultParameterBinding,   decorateInsideField,   defaultLabel,   getClientId,   getControlName,   getLabel,   isDisabled,   isRequired,   processSubmission,   setDecorator,   setFormSupport,   setup
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.tapestry5.corelib.base.AbstractTextField Detail:
  void begin(MarkupWriter writer) 
 final AnnotationProvider defaultAnnotationProvider() 
 final Binding defaultTranslate() 
 final Binding defaultValidate() 
 final Binding defaultValue() 
Deprecated! Likely - to be removed in the future, use org.apache.tapestry5.annotations.Parameter#autoconnect() instead

    The default value is a property of the container whose name matches the component's id. May return null if the container does not have a matching property.
 protected final String getWidth() 
 protected boolean ignoreBlankInput() 
 public boolean isRequired() 
 protected  void processSubmission(String elementName) 
 abstract protected  void writeFieldTag(MarkupWriter writer,
    String value)