com.primix.tapestry.form
Class AbstractFormComponent

java.lang.Object
  |
  +--com.primix.tapestry.AbstractComponent
        |
        +--com.primix.tapestry.form.AbstractFormComponent
All Implemented Interfaces:
IComponent, IFormComponent, IRender
Direct Known Subclasses:
AbstractTextField, Checkbox, Hidden, ImageSubmit, MultiplePropertySelection, PropertySelection, RadioGroup, Select, Submit, Text

public abstract class AbstractFormComponent
extends AbstractComponent
implements IFormComponent

A base class for building components that correspond to HTML form elements. All such components must be wrapped (directly or indirectly) by a Form component.

Since:
1.0.3
Version:
$Id: AbstractFormComponent.java,v 1.7 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
AbstractFormComponent()
           
 
Method Summary
 IForm getForm()
          Returns the Form which contains the component.
 IForm getForm(IRequestCycle cycle)
          Returns the Form wrapping this component.
abstract  java.lang.String getName()
          Returns the name of the component, which is automatically generated during renderring.
 
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
 
Methods inherited from interface com.primix.tapestry.IRender
render
 

Constructor Detail

AbstractFormComponent

public AbstractFormComponent()
Method Detail

getForm

public IForm getForm(IRequestCycle cycle)
              throws RequestCycleException
Returns the Form wrapping this component.
Throws:
RequestCycleException - if the component is not wrapped by a Form.

getForm

public IForm getForm()
Description copied from interface: IFormComponent
Returns the Form which contains the component.
Specified by:
getForm in interface IFormComponent

getName

public abstract 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.

Specified by:
getName in interface IFormComponent