org.apache.tapestry.form
Interface FormSupport

All Superinterfaces:
FormBehavior
All Known Implementing Classes:
FormSupportImpl, GoFormSupportImpl

public interface FormSupport
extends FormBehavior

Interface for a utility object that encapsulates the majority of the Form's behavior.

Since:
4.0
Author:
Howard M. Lewis Ship

Method Summary
 IForm getForm()
          Gets a reference to the previously stored IForm.
 void render(String method, IRender informalParametersRenderer, ILink link, String scheme, Integer port)
          Invoked when the form is rendering.
 String rewind()
          Invoked to rewind the form, which renders the body of the form, allowing form element components to pull data from the request and update page properties.
 
Methods inherited from interface org.apache.tapestry.FormBehavior
addDeferredRunnable, addEventHandler, addHiddenValue, addHiddenValue, getElementId, getElementId, getProfile, isFormFieldUpdating, isRewinding, peekClientId, prerenderField, registerForFocus, setEncodingType, setFormFieldUpdating, wasPrerendered, wasPrerendered
 

Method Detail

render

void render(String method,
            IRender informalParametersRenderer,
            ILink link,
            String scheme,
            Integer port)
Invoked when the form is rendering. This should only be invoked by the Form component.

Parameters:
method - the HTTP method ("get" or "post")
informalParametersRenderer - object that will render informal parameters
link - The link to which the form will submit (encapsulating the URL and the query parameters)
scheme - the desired scheme for the generated URL, typically "http" or "https". If non-null, and the scheme does not match the current request's scheme, then an absolute URL with the specified scheme will be generated, rather than a URI.
port - the desired port for the generated URL, typically "80", "443". If non-null, and the port does not match the current request's port, then an absolute URL with the specified port will be generated, rather than a URI.

rewind

String rewind()
Invoked to rewind the form, which renders the body of the form, allowing form element components to pull data from the request and update page properties. This should only be invoked by the Form component.

Returns:
a code indicating why the form was submitted: FormConstants.SUBMIT_NORMAL, FormConstants.SUBMIT_CANCEL or FormConstants.SUBMIT_REFRESH.

getForm

IForm getForm()
Gets a reference to the previously stored IForm.

Returns:
The form this object is managing/supporting.
Since:
4.1


Copyright © 2006-2008 Apache Software Foundation. All Rights Reserved.