com.primix.tapestry.form
Class AbstractTextField

java.lang.Object
  |
  +--com.primix.tapestry.AbstractComponent
        |
        +--com.primix.tapestry.form.AbstractFormComponent
              |
              +--com.primix.tapestry.form.AbstractTextField
All Implemented Interfaces:
IComponent, IFormComponent, IRender
Direct Known Subclasses:
AbstractValidatingTextField, TextField

public abstract class AbstractTextField
extends AbstractFormComponent

Base class for implementing various types of text input fields. This includes TextField but also forms the base for AbstractValidatingTextField.

Since:
1.0.2
Version:
$Id: AbstractTextField.java,v 1.4 2001/08/28 20:33:41 hship Exp $
Author:
Howard Ship

Fields inherited from class com.primix.tapestry.AbstractComponent
id, page, specification, wrapped, wrappedCount
 
Constructor Summary
AbstractTextField()
           
 
Method Summary
protected  void beforeCloseTag(IResponseWriter writer, IRequestCycle cycle)
          Invoked from render(IResponseWriter, IRequestCycle) just before the tag is closed.
 IBinding getDisabledBinding()
           
 IBinding getDisplayWidthBinding()
           
 IBinding getHiddenBinding()
           
 IBinding getMaximumLengthBinding()
           
 java.lang.String getName()
          Returns the name of the component, which is automatically generated during renderring.
protected abstract  java.lang.String readValue()
          Invoked by render(IResponseWriter writer, IRequestCycle cycle) when rendering a response.
 void render(IResponseWriter writer, IRequestCycle cycle)
          Renders the form element, or responds when the form containing the element is submitted (by checking Form.isRewinding().
 void setDisabledBinding(IBinding value)
           
 void setDisplayWidthBinding(IBinding value)
           
 void setHiddenBinding(IBinding value)
           
 void setMaximumLengthBinding(IBinding value)
           
protected abstract  void updateValue(java.lang.String value)
          Invoked by render(IResponseWriter writer, IRequestCycle cycle) when a value is obtained from the HttpServletRequest.
 
Methods inherited from class com.primix.tapestry.form.AbstractFormComponent
getForm, getForm
 
Methods inherited from class com.primix.tapestry.AbstractComponent
addAsset, addComponent, addWrapped, cleanupAfterRender, cleanupComponent, finishLoad, finishLoad, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, generateAttributes, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getChangeObserver, getComponent, getComponents, getContainer, getExtendedId, getId, getIdPath, getListeners, getPage, getSpecification, prepareForRender, renderWrapped, reset, setBinding, setContainer, setId, setPage, setSpecification, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.primix.tapestry.IComponent
addAsset, addComponent, addWrapped, finishLoad, getAsset, getAssets, getBinding, getBindingNames, getBindings, getComponent, getComponents, getContainer, getExtendedId, getId, getIdPath, getPage, getSpecification, renderWrapped, setBinding, setContainer, setId, setPage, setSpecification
 

Constructor Detail

AbstractTextField

public AbstractTextField()
Method Detail

getName

public java.lang.String getName()
Description copied from interface: IFormComponent
Returns the name of the component, which is automatically generated during renderring.

This value is set inside the component's render method and is not cleared. If the component is inside a Foreach, the value returned is the most recent name generated for the component.

This property is made available to facilitate writing JavaScript that allows components (in the client web browser) to interact.

In practice, a Script component works with the Body component to get the JavaScript code inserted and referenced.

Overrides:
getName in class AbstractFormComponent

getDisabledBinding

public IBinding getDisabledBinding()

getDisplayWidthBinding

public IBinding getDisplayWidthBinding()

getHiddenBinding

public IBinding getHiddenBinding()

render

public void render(IResponseWriter writer,
                   IRequestCycle cycle)
            throws RequestCycleException
Renders the form element, or responds when the form containing the element is submitted (by checking Form.isRewinding().

beforeCloseTag

protected void beforeCloseTag(IResponseWriter writer,
                              IRequestCycle cycle)
                       throws RequestCycleException
Invoked from render(IResponseWriter, IRequestCycle) just before the tag is closed. This implementation does nothing, subclasses may override.

updateValue

protected abstract void updateValue(java.lang.String value)
Invoked by render(IResponseWriter writer, IRequestCycle cycle) when a value is obtained from the HttpServletRequest.

readValue

protected abstract java.lang.String readValue()
Invoked by render(IResponseWriter writer, IRequestCycle cycle) when rendering a response.

setDisabledBinding

public void setDisabledBinding(IBinding value)

setDisplayWidthBinding

public void setDisplayWidthBinding(IBinding value)

setHiddenBinding

public void setHiddenBinding(IBinding value)

setMaximumLengthBinding

public void setMaximumLengthBinding(IBinding value)

getMaximumLengthBinding

public IBinding getMaximumLengthBinding()