org.apache.tapestry.form
Class AbstractRequirableField

java.lang.Object
  extended by org.apache.hivemind.impl.BaseLocatable
      extended by org.apache.tapestry.AbstractComponent
          extended by org.apache.tapestry.form.AbstractFormComponent
              extended by org.apache.tapestry.form.AbstractRequirableField
All Implemented Interfaces:
org.apache.hivemind.Locatable, org.apache.hivemind.LocationHolder, IFormComponent, RequirableField, IComponent, IRender
Direct Known Subclasses:
PropertySelection, RadioGroup, Select, Upload

public abstract class AbstractRequirableField
extends AbstractFormComponent
implements RequirableField

Abstract requirable field implementation that delegates render and rewind logic to an implementation of RequirableFieldSupport.

Since:
4.0
Author:
Paul Ferraro

Constructor Summary
AbstractRequirableField()
           
 
Method Summary
abstract  RequirableFieldSupport getRequirableFieldSupport()
          Injected.
 java.lang.String getSubmittedValue(IRequestCycle cycle)
          Retrieves a simplified view of the value submitted for this component.
protected  void renderFormComponent(IMarkupWriter writer, IRequestCycle cycle)
           
protected  void rewindFormComponent(IMarkupWriter writer, IRequestCycle cycle)
           
abstract  void setRequiredMessage(java.lang.String message)
          May by used by required fields to override the default required message pattern.
 
Methods inherited from class org.apache.tapestry.form.AbstractFormComponent
getForm, getIdParameter, getName, renderComponent, renderDelegateAttributes, renderDelegatePrefix, renderDelegateSuffix, renderIdAttribute, select, setClientId, setForm, setName, setName
 
Methods inherited from class org.apache.tapestry.AbstractComponent
addAsset, addBody, addComponent, checkActiveLock, cleanupAfterRender, enterActiveState, finishLoad, finishLoad, format, format, format, format, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getBody, getBodyCount, getComponent, getComponents, getContainer, getExtendedId, getId, getIdPath, getListeners, getMessage, getMessages, getNamespace, getPage, getProperty, getSpecification, isInActiveState, isParameterBound, isRendering, pageEndRender, prepareForRender, render, renderBody, renderInformalParameters, setBinding, setContainer, setId, setNamespace, setPage, setProperty, toString
 
Methods inherited from class org.apache.hivemind.impl.BaseLocatable
getLocation, setLocation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.tapestry.form.RequirableField
bind, getRequiredMessage, isRequired
 
Methods inherited from interface org.apache.tapestry.form.IFormComponent
getClientId, getDisplayName, getForm, getName, isDisabled, setName
 
Methods inherited from interface org.apache.tapestry.IComponent
addAsset, addBody, addComponent, enterActiveState, finishLoad, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getComponent, getComponents, getContainer, getExtendedId, getId, getIdPath, getListeners, getMessage, getMessages, getNamespace, getPage, getProperty, getSpecification, isRendering, renderBody, setBinding, setContainer, setId, setNamespace, setPage, setProperty
 
Methods inherited from interface org.apache.tapestry.IRender
render
 
Methods inherited from interface org.apache.hivemind.LocationHolder
setLocation
 
Methods inherited from interface org.apache.hivemind.Locatable
getLocation
 

Constructor Detail

AbstractRequirableField

public AbstractRequirableField()
Method Detail

getRequirableFieldSupport

public abstract RequirableFieldSupport getRequirableFieldSupport()
Injected.


setRequiredMessage

public abstract void setRequiredMessage(java.lang.String message)
May by used by required fields to override the default required message pattern.

Parameters:
message -

rewindFormComponent

protected void rewindFormComponent(IMarkupWriter writer,
                                   IRequestCycle cycle)
Specified by:
rewindFormComponent in class AbstractFormComponent
See Also:
org.apache.tapestry.form.AbstractFormComponent#rewindFormComponent(org.apache.tapestry.IRequestCycle)

getSubmittedValue

public java.lang.String getSubmittedValue(IRequestCycle cycle)
Description copied from interface: RequirableField
Retrieves a simplified view of the value submitted for this component. Used during required field checking.

Specified by:
getSubmittedValue in interface RequirableField
See Also:
RequirableField.getSubmittedValue(org.apache.tapestry.IRequestCycle)

renderFormComponent

protected void renderFormComponent(IMarkupWriter writer,
                                   IRequestCycle cycle)
Specified by:
renderFormComponent in class AbstractFormComponent
See Also:
AbstractFormComponent.renderFormComponent(org.apache.tapestry.IMarkupWriter, org.apache.tapestry.IRequestCycle)