com.primix.tapestry
Interface IForm

All Superinterfaces:
IAction, IComponent, IRender
All Known Implementing Classes:
Form

public interface IForm
extends IAction

A generic way to access a component which defines an HTML form. This interface exists so that the IRequestCycle can invoke the rewind(IResponseWriter, IRequestCycle) method (which is used to deal with a Form that uses the direct service). In release 1.0.5, more responsibility for forms was moved here.

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

Field Summary
static java.lang.String ATTRIBUTE_NAME
          Attribute name used with the request cycle; allows other components to locate the IForm.
 
Method Summary
 void addEventHandler(FormEventType type, java.lang.String functionName)
          Adds an additional event handler.
 java.lang.String getElementId(IComponent component)
          Constructs a unique identifier (within the Form).
 java.lang.String getElementId(java.lang.String baseId)
          Constructs a unique identifier from the base id.
 java.lang.String getName()
          Returns the name of the form.
 boolean isRewinding()
          Returns true if the form is rewinding (meaning, the form was the subject of the request cycle).
 void rewind(IResponseWriter writer, IRequestCycle cycle)
          Invoked by the IRequestCycle to allow a form that uses the direct service, to respond to the form submission.
 
Methods inherited from interface com.primix.tapestry.IAction
getRequiresSession
 
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
 

Field Detail

ATTRIBUTE_NAME

public static final java.lang.String ATTRIBUTE_NAME
Attribute name used with the request cycle; allows other components to locate the IForm.
Since:
1.0.5
Method Detail

rewind

public void rewind(IResponseWriter writer,
                   IRequestCycle cycle)
            throws RequestCycleException
Invoked by the IRequestCycle to allow a form that uses the direct service, to respond to the form submission.

addEventHandler

public void addEventHandler(FormEventType type,
                            java.lang.String functionName)
Adds an additional event handler. The type determines when the handler will be invoked, FormEventType.SUBMIT is most typical.
Since:
1.0.5

getElementId

public java.lang.String getElementId(IComponent component)
Constructs a unique identifier (within the Form). The identifier consists of the component's id, with an index number added to ensure uniqueness.

Simply invokes getElementId(String) with the component's id.

Since:
1.0.5

getElementId

public java.lang.String getElementId(java.lang.String baseId)
Constructs a unique identifier from the base id. If possible, the id is used as-is. Otherwise, a unique identifier is appended to the id.

This method is provided simply so that some components (ImageSubmit) have more specific control over their names.

Since:
1.0.5

getName

public java.lang.String getName()
Returns the name of the form.
Since:
1.0.5

isRewinding

public boolean isRewinding()
Returns true if the form is rewinding (meaning, the form was the subject of the request cycle).
Since:
1.0.5