|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IForm
A generic way to access a component which defines an HTML form. This interface
exists so that the IRequestCycle
can invoke the
rewind(IMarkupWriter, 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.
Field Summary | |
---|---|
static String |
ATTRIBUTE_NAME
Attribute name used with the request cycle; allows other components to locate the IForm. |
Method Summary | |
---|---|
void |
addEventHandler(FormEventType type,
String functionName)
Adds an additional event handler. |
void |
addHiddenValue(String name,
String value)
Adds a hidden field value to be stored in the form. |
void |
addHiddenValue(String name,
String id,
String value)
Adds a hidden field value to be stored in the form. |
IValidationDelegate |
getDelegate()
Returns the validation delegate for the form. |
String |
getElementId(IFormComponent component)
Constructs a unique identifier (within the Form). |
String |
getElementId(IFormComponent component,
String baseId)
Constructs a unique identifier from the base id. |
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(IMarkupWriter writer,
IRequestCycle cycle)
Invoked by the IRequestCycle to allow a form that uses
the direct service, to respond to the form submission. |
void |
setEncodingType(String encodingType)
May be invoked by a component to force the encoding type of the form to a particular value. |
Methods inherited from interface org.apache.tapestry.IAction |
---|
getRequiresSession |
Methods inherited from interface org.apache.tapestry.IComponent |
---|
addAsset, addBody, addComponent, finishLoad, getAsset, getAssets, getBinding, getBindingNames, getBindings, getComponent, getComponents, getContainer, getExtendedId, getId, getIdPath, getMessage, getMessages, getNamespace, getPage, getProperty, getSpecification, getString, renderBody, setBinding, setContainer, setId, setNamespace, setPage, setProperty, setSpecification |
Methods inherited from interface org.apache.tapestry.IRender |
---|
render |
Methods inherited from interface org.apache.tapestry.ILocationHolder |
---|
setLocation |
Methods inherited from interface org.apache.tapestry.ILocatable |
---|
getLocation |
Field Detail |
---|
static final String ATTRIBUTE_NAME
Method Detail |
---|
void rewind(IMarkupWriter writer, IRequestCycle cycle)
IRequestCycle
to allow a form that uses
the direct service, to respond to the form submission.
void addEventHandler(FormEventType type, String functionName)
FormEventType.SUBMIT
is most typical.
String getElementId(IFormComponent component)
Simply invokes getElementId(IFormComponent, String)
with the component's id.
String getElementId(IFormComponent component, String baseId)
This method is provided simply so that some components
(ImageSubmit
) have more specific control over
their names.
Invokes IFormComponent.setName(String)
with the result, as well
as returning it.
StaleLinkException
- if, when the form itself is rewinding, the
element id allocated does not match the expected id (as allocated when the form rendered).
This indicates that the state of the application has changed between the time the
form renderred and the time it was submitted.String getName()
boolean isRewinding()
IValidationDelegate getDelegate()
void setEncodingType(String encodingType)
ApplicationRuntimeException
- if the current encoding type is not null
and doesn't match the suggested encoding typeUpload
void addHiddenValue(String name, String value)
It is acceptible to add multiple hidden fields with the same name. They will be written in the order they are received.
void addHiddenValue(String name, String id, String value)
It is acceptible to add multiple hidden fields with the same name. They will be written in the order they are received.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |