com.sun.rave.web.ui.component
Class FormBase

java.lang.Object
  extended byjavax.faces.component.UIComponent
      extended byjavax.faces.component.UIComponentBase
          extended byjavax.faces.component.UIForm
              extended bycom.sun.rave.web.ui.component.FormBase
All Implemented Interfaces:
javax.faces.component.NamingContainer, javax.faces.component.StateHolder
Direct Known Subclasses:
Form

public abstract class FormBase
extends javax.faces.component.UIForm

Use the ui:form tag to create an HTML <form> element. The form can be submitted via a button or hyperlink control (in which case an ActionEvent will be generated on the server), or via client side scripting.

The virtualFormsConfig attribute can be used to configure virtual forms. A virtual form defines a group of input components ("participants") and submission components ("submitters") on a page, such that when the user interacts with one of the submitters, the participants are processed exclusively while the remaining inputs on the page are ignored. An input component is any component that implements EditableValueHolder. A submission component is any component that causes the web page to be submitted (such as a button, hyperlink, or any input component that submits the page via the common_timeoutSubmitForm scripting function). Processing an input means converting and validating it, firing any value change events associated with the input, and mapping the input onto its binding target (if the component is bound). Virtual forms provide an alternative to the immediate property. They are more powerful than immediate because they let you specify multiple groups of inputs to be selectively processed (that is, you can specify multiple virtual forms on a page). They are also easier to use than immediate because they do not alter the JavaServer Faces lifecycle.


HTML Elements and Layout

The rendered HTML page contains an HTML <form> tag and its associated attributes. The rendered form includes a hidden field for use in determining which form submitted the page.


Client Side Javascript Functions

None.

Examples

Example 1: Using a Form

<ui:page>
    <ui:html>
        <ui:head id="head" title="Hyperlink Test Page" />
        <ui:body>
            <ui:form id="form1">
                <ui:hyperlink  id="hyperlinkSubmitsPage" 
                           label="#{HyperlinkBean.label}"
                           action="#{HyperlinkBean.determineWhatToDoFunction}" />
             </ui:form>
       </ui:body>
    </ui:html>
</ui:page>

Example 2: A Page with Three Virtual Forms

<ui:page>
    <ui:html>
        <ui:head id="head" title="Shipping and Billing Information" />
        <ui:body>
            <ui:form id="form1" virtualFormsConfig="shipping | shippingAddressTextField | updateShippingButton , creditCard | creditCardDropDown | creditCardDropDown , billing | billingAddressTextfield creditCardDropDown | updateBillingButton">
                <ui:label for="shippingAddressTextField" id="shippingAddressLabel" style="left: 48px; top: 48px; position: absolute" text="Shipping Address:"/>
                <ui:textField id="shippingAddressTextField" required="true" style="left: 48px; top: 72px; position: absolute"/>                
                <ui:button id="updateShippingButton" style="left: 48px; top: 120px; position: absolute" text="Update Shipping Address"/>
                <ui:label id="creditCardLabel" for="creditCardDropDown" style="left: 48px; top: 192px; position: absolute" text="Credit Card to Use:"/>
                <ui:dropDown id="creditCardDropDown" items="#{SessionBean1.creditCards}" style="left: 48px; top: 216px; position: absolute"/>
                <ui:label id="billingAddressLabel" for="billingAddressTextfield" style="left: 48px; top: 264px; position: absolute" text="Credit Card Billing Address:"/>
                <ui:textField id="billingAddressTextfield" required="true" style="left: 48px; top: 288px; position: absolute"/>
                <ui:button id="updateBillingButton" style="left: 48px; top: 336px; position: absolute" text="Update Billing Address"/>
                <ui:button id="updateAllButton" style="left: 48px; top: 432px; position: absolute" text="Update All Information"/>
             </ui:form>
       </ui:body>
    </ui:html>
</ui:page>

Auto-generated component class. Do NOT modify; all changes will be lost!


Field Summary
 
Fields inherited from class javax.faces.component.UIForm
COMPONENT_FAMILY, COMPONENT_TYPE
 
Fields inherited from interface javax.faces.component.NamingContainer
SEPARATOR_CHAR
 
Constructor Summary
FormBase()
          Construct a new FormBase.
 
Method Summary
 java.lang.String getEnctype()
          Use this attribute to set the content-type of the HTTP request generated by this form.
 java.lang.String getFamily()
          Return the family for this component.
 Form.VirtualFormDescriptor[] getInternalVirtualForms()
          The virtual forms used "internally" by components (such as Table).
 java.lang.String getOnClick()
          Scripting code executed when a mouse click occurs over this component.
 java.lang.String getOnDblClick()
          Scripting code executed when a mouse double click occurs over this component.
 java.lang.String getOnKeyDown()
          Scripting code executed when the user presses down on a key while the component has focus.
 java.lang.String getOnKeyPress()
          Scripting code executed when the user presses and releases a key while the component has focus.
 java.lang.String getOnKeyUp()
          Scripting code executed when the user releases a key while the component has focus.
 java.lang.String getOnMouseDown()
          Scripting code executed when the user presses a mouse button while the mouse pointer is on the component.
 java.lang.String getOnMouseMove()
          Scripting code executed when the user moves the mouse pointer while over the component.
 java.lang.String getOnMouseOut()
          Scripting code executed when a mouse out movement occurs over this component.
 java.lang.String getOnMouseOver()
          Scripting code executed when the user moves the mouse pointer into the boundary of this component.
 java.lang.String getOnMouseUp()
          Scripting code executed when the user releases a mouse button while the mouse pointer is on the component.
 java.lang.String getOnReset()
          Scripting code executed when this form is reset.
 java.lang.String getOnSubmit()
          Scripting code executed when this form is submitted.
 java.lang.String getStyle()
          CSS style(s) to be applied when this component is rendered.
 java.lang.String getStyleClass()
          CSS style class(es) to be applied when this component is rendered.
 java.lang.String getTarget()
          The form's target window.
 Form.VirtualFormDescriptor[] getVirtualForms()
          The virtual forms within this literal form, represented as an array of Form.VirtualFormDescriptor objects.
 java.lang.String getVirtualFormsConfig()
          The configuration of the virtual forms within this literal form, represented as a String.
 boolean isAutoComplete()
          Use this non-XHTML compliant boolean attribute to turn off autocompletion feature of Internet Explorer and Firefox browsers.
 boolean isVisible()
          Use the visible attribute to indicate whether the component should be viewable by the user in the rendered HTML page.
 void restoreState(javax.faces.context.FacesContext _context, java.lang.Object _state)
          Restore the state of this component.
 java.lang.Object saveState(javax.faces.context.FacesContext _context)
          Save the state of this component.
 void setAutoComplete(boolean autoComplete)
          Use this non-XHTML compliant boolean attribute to turn off autocompletion feature of Internet Explorer and Firefox browsers.
 void setEnctype(java.lang.String enctype)
          Use this attribute to set the content-type of the HTTP request generated by this form.
 void setInternalVirtualForms(Form.VirtualFormDescriptor[] internalVirtualForms)
          The virtual forms used "internally" by components (such as Table).
 void setOnClick(java.lang.String onClick)
          Scripting code executed when a mouse click occurs over this component.
 void setOnDblClick(java.lang.String onDblClick)
          Scripting code executed when a mouse double click occurs over this component.
 void setOnKeyDown(java.lang.String onKeyDown)
          Scripting code executed when the user presses down on a key while the component has focus.
 void setOnKeyPress(java.lang.String onKeyPress)
          Scripting code executed when the user presses and releases a key while the component has focus.
 void setOnKeyUp(java.lang.String onKeyUp)
          Scripting code executed when the user releases a key while the component has focus.
 void setOnMouseDown(java.lang.String onMouseDown)
          Scripting code executed when the user presses a mouse button while the mouse pointer is on the component.
 void setOnMouseMove(java.lang.String onMouseMove)
          Scripting code executed when the user moves the mouse pointer while over the component.
 void setOnMouseOut(java.lang.String onMouseOut)
          Scripting code executed when a mouse out movement occurs over this component.
 void setOnMouseOver(java.lang.String onMouseOver)
          Scripting code executed when the user moves the mouse pointer into the boundary of this component.
 void setOnMouseUp(java.lang.String onMouseUp)
          Scripting code executed when the user releases a mouse button while the mouse pointer is on the component.
 void setOnReset(java.lang.String onReset)
          Scripting code executed when this form is reset.
 void setOnSubmit(java.lang.String onSubmit)
          Scripting code executed when this form is submitted.
 void setStyle(java.lang.String style)
          CSS style(s) to be applied when this component is rendered.
 void setStyleClass(java.lang.String styleClass)
          CSS style class(es) to be applied when this component is rendered.
 void setTarget(java.lang.String target)
          The form's target window.
 void setVirtualForms(Form.VirtualFormDescriptor[] virtualForms)
          The virtual forms within this literal form, represented as an array of Form.VirtualFormDescriptor objects.
 void setVirtualFormsConfig(java.lang.String virtualFormsConfig)
          The configuration of the virtual forms within this literal form, represented as a String.
 void setVisible(boolean visible)
          Use the visible attribute to indicate whether the component should be viewable by the user in the rendered HTML page.
 
Methods inherited from class javax.faces.component.UIForm
isSubmitted, processDecodes, processUpdates, processValidators, setSubmitted
 
Methods inherited from class javax.faces.component.UIComponentBase
addFacesListener, broadcast, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacesContext, getFacesListeners, getFacet, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, isRendered, isTransient, processRestoreState, processSaveState, queueEvent, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FormBase

public FormBase()

Construct a new FormBase.

Method Detail

getFamily

public java.lang.String getFamily()

Return the family for this component.


isAutoComplete

public boolean isAutoComplete()

Use this non-XHTML compliant boolean attribute to turn off autocompletion feature of Internet Explorer and Firefox browsers. Set to "false" to turn off completion. The default is "true".


setAutoComplete

public void setAutoComplete(boolean autoComplete)

Use this non-XHTML compliant boolean attribute to turn off autocompletion feature of Internet Explorer and Firefox browsers. Set to "false" to turn off completion. The default is "true".

See Also:
isAutoComplete()

getEnctype

public java.lang.String getEnctype()

Use this attribute to set the content-type of the HTTP request generated by this form. You do not normally need to set this attribute. Its default value is application/x-www-form-urlencoded. If there is an upload tag inside the form, the upload tag will modify the form's enctype attribute to multipart/form-data.


setEnctype

public void setEnctype(java.lang.String enctype)

Use this attribute to set the content-type of the HTTP request generated by this form. You do not normally need to set this attribute. Its default value is application/x-www-form-urlencoded. If there is an upload tag inside the form, the upload tag will modify the form's enctype attribute to multipart/form-data.

See Also:
getEnctype()

getInternalVirtualForms

public Form.VirtualFormDescriptor[] getInternalVirtualForms()

The virtual forms used "internally" by components (such as Table). Component authors can manipulate this set of virtual forms independent of the set exposed to developers. This set is only consulted after the set exposed to developers is consulted. A participating or submitting id can end in ":*" to indicate descendants. For example, table1:* can be used as a participating or submitting id to indicate all the descendants of table1.


setInternalVirtualForms

public void setInternalVirtualForms(Form.VirtualFormDescriptor[] internalVirtualForms)

The virtual forms used "internally" by components (such as Table). Component authors can manipulate this set of virtual forms independent of the set exposed to developers. This set is only consulted after the set exposed to developers is consulted. A participating or submitting id can end in ":*" to indicate descendants. For example, table1:* can be used as a participating or submitting id to indicate all the descendants of table1.

See Also:
getInternalVirtualForms()

getOnClick

public java.lang.String getOnClick()

Scripting code executed when a mouse click occurs over this component.


setOnClick

public void setOnClick(java.lang.String onClick)

Scripting code executed when a mouse click occurs over this component.

See Also:
getOnClick()

getOnDblClick

public java.lang.String getOnDblClick()

Scripting code executed when a mouse double click occurs over this component.


setOnDblClick

public void setOnDblClick(java.lang.String onDblClick)

Scripting code executed when a mouse double click occurs over this component.

See Also:
getOnDblClick()

getOnKeyDown

public java.lang.String getOnKeyDown()

Scripting code executed when the user presses down on a key while the component has focus.


setOnKeyDown

public void setOnKeyDown(java.lang.String onKeyDown)

Scripting code executed when the user presses down on a key while the component has focus.

See Also:
getOnKeyDown()

getOnKeyPress

public java.lang.String getOnKeyPress()

Scripting code executed when the user presses and releases a key while the component has focus.


setOnKeyPress

public void setOnKeyPress(java.lang.String onKeyPress)

Scripting code executed when the user presses and releases a key while the component has focus.

See Also:
getOnKeyPress()

getOnKeyUp

public java.lang.String getOnKeyUp()

Scripting code executed when the user releases a key while the component has focus.


setOnKeyUp

public void setOnKeyUp(java.lang.String onKeyUp)

Scripting code executed when the user releases a key while the component has focus.

See Also:
getOnKeyUp()

getOnMouseDown

public java.lang.String getOnMouseDown()

Scripting code executed when the user presses a mouse button while the mouse pointer is on the component.


setOnMouseDown

public void setOnMouseDown(java.lang.String onMouseDown)

Scripting code executed when the user presses a mouse button while the mouse pointer is on the component.

See Also:
getOnMouseDown()

getOnMouseMove

public java.lang.String getOnMouseMove()

Scripting code executed when the user moves the mouse pointer while over the component.


setOnMouseMove

public void setOnMouseMove(java.lang.String onMouseMove)

Scripting code executed when the user moves the mouse pointer while over the component.

See Also:
getOnMouseMove()

getOnMouseOut

public java.lang.String getOnMouseOut()

Scripting code executed when a mouse out movement occurs over this component.


setOnMouseOut

public void setOnMouseOut(java.lang.String onMouseOut)

Scripting code executed when a mouse out movement occurs over this component.

See Also:
getOnMouseOut()

getOnMouseOver

public java.lang.String getOnMouseOver()

Scripting code executed when the user moves the mouse pointer into the boundary of this component.


setOnMouseOver

public void setOnMouseOver(java.lang.String onMouseOver)

Scripting code executed when the user moves the mouse pointer into the boundary of this component.

See Also:
getOnMouseOver()

getOnMouseUp

public java.lang.String getOnMouseUp()

Scripting code executed when the user releases a mouse button while the mouse pointer is on the component.


setOnMouseUp

public void setOnMouseUp(java.lang.String onMouseUp)

Scripting code executed when the user releases a mouse button while the mouse pointer is on the component.

See Also:
getOnMouseUp()

getOnReset

public java.lang.String getOnReset()

Scripting code executed when this form is reset.


setOnReset

public void setOnReset(java.lang.String onReset)

Scripting code executed when this form is reset.

See Also:
getOnReset()

getOnSubmit

public java.lang.String getOnSubmit()

Scripting code executed when this form is submitted.


setOnSubmit

public void setOnSubmit(java.lang.String onSubmit)

Scripting code executed when this form is submitted.

See Also:
getOnSubmit()

getStyle

public java.lang.String getStyle()

CSS style(s) to be applied when this component is rendered.


setStyle

public void setStyle(java.lang.String style)

CSS style(s) to be applied when this component is rendered.

See Also:
getStyle()

getStyleClass

public java.lang.String getStyleClass()

CSS style class(es) to be applied when this component is rendered.


setStyleClass

public void setStyleClass(java.lang.String styleClass)

CSS style class(es) to be applied when this component is rendered.

See Also:
getStyleClass()

getTarget

public java.lang.String getTarget()

The form's target window.


setTarget

public void setTarget(java.lang.String target)

The form's target window.

See Also:
getTarget()

getVirtualForms

public Form.VirtualFormDescriptor[] getVirtualForms()

The virtual forms within this literal form, represented as an array of Form.VirtualFormDescriptor objects. This property and the "virtualFormsConfig" property are automatically kept in-sync.


setVirtualForms

public void setVirtualForms(Form.VirtualFormDescriptor[] virtualForms)

The virtual forms within this literal form, represented as an array of Form.VirtualFormDescriptor objects. This property and the "virtualFormsConfig" property are automatically kept in-sync.

See Also:
getVirtualForms()

getVirtualFormsConfig

public java.lang.String getVirtualFormsConfig()

The configuration of the virtual forms within this literal form, represented as a String. Each virtual form is described by three parts, separated with pipe ("|") characters: the virtual form name, a space-separated list of component ids that participate in the virtual form, and a space-separated list of component ids that submit the virtual form. Multiple such virtual form "descriptors" are separated by commas. The component ids may be qualified (for instance, "table1:tableRowGroup1:tableColumn1:textField1").


setVirtualFormsConfig

public void setVirtualFormsConfig(java.lang.String virtualFormsConfig)

The configuration of the virtual forms within this literal form, represented as a String. Each virtual form is described by three parts, separated with pipe ("|") characters: the virtual form name, a space-separated list of component ids that participate in the virtual form, and a space-separated list of component ids that submit the virtual form. Multiple such virtual form "descriptors" are separated by commas. The component ids may be qualified (for instance, "table1:tableRowGroup1:tableColumn1:textField1").

See Also:
getVirtualFormsConfig()

isVisible

public boolean isVisible()

Use the visible attribute to indicate whether the component should be viewable by the user in the rendered HTML page.


setVisible

public void setVisible(boolean visible)

Use the visible attribute to indicate whether the component should be viewable by the user in the rendered HTML page.

See Also:
isVisible()

restoreState

public void restoreState(javax.faces.context.FacesContext _context,
                         java.lang.Object _state)

Restore the state of this component.


saveState

public java.lang.Object saveState(javax.faces.context.FacesContext _context)

Save the state of this component.