org.apache.tapestry.form
Interface FormSupport

All Superinterfaces:
FormBehavior
All Known Implementing Classes:
FormSupportImpl

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
 void render(java.lang.String method, IRender informalParametersRenderer, ILink link, java.lang.String scheme)
          Deprecated. To be removed in 4.1, see new render method that adds the Port parameter.
 void render(java.lang.String method, IRender informalParametersRenderer, ILink link, java.lang.String scheme, java.lang.Integer port)
          Invoked when the form is rendering.
 java.lang.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, isRewinding, prerenderField, registerForFocus, setEncodingType, wasPrerendered
 

Method Detail

render

public void render(java.lang.String method,
                   IRender informalParametersRenderer,
                   ILink link,
                   java.lang.String scheme,
                   java.lang.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.

render

public void render(java.lang.String method,
                   IRender informalParametersRenderer,
                   ILink link,
                   java.lang.String scheme)
Deprecated. To be removed in 4.1, see new render method that adds the Port parameter.

Old interface left around for backwards compatibility. Please use the second render method.

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.

rewind

public java.lang.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.