|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.faces.component.UIComponent javax.faces.component.UIComponentBase javax.faces.component.UIForm com.sun.rave.web.ui.component.FormBase
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.
<form>
tag and its associated
attributes. The rendered
form includes a hidden field for use in
determining which form submitted the page.<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>
<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 |
public FormBase()
Construct a new FormBase
.
Method Detail |
public java.lang.String getFamily()
Return the family for this component.
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".
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".
isAutoComplete()
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.
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.
getEnctype()
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.
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.
getInternalVirtualForms()
public java.lang.String getOnClick()
Scripting code executed when a mouse click occurs over this component.
public void setOnClick(java.lang.String onClick)
Scripting code executed when a mouse click occurs over this component.
getOnClick()
public java.lang.String getOnDblClick()
Scripting code executed when a mouse double click occurs over this component.
public void setOnDblClick(java.lang.String onDblClick)
Scripting code executed when a mouse double click occurs over this component.
getOnDblClick()
public java.lang.String getOnKeyDown()
Scripting code executed when the user presses down on a key while the component has focus.
public void setOnKeyDown(java.lang.String onKeyDown)
Scripting code executed when the user presses down on a key while the component has focus.
getOnKeyDown()
public java.lang.String getOnKeyPress()
Scripting code executed when the user presses and releases a key while the component has focus.
public void setOnKeyPress(java.lang.String onKeyPress)
Scripting code executed when the user presses and releases a key while the component has focus.
getOnKeyPress()
public java.lang.String getOnKeyUp()
Scripting code executed when the user releases a key while the component has focus.
public void setOnKeyUp(java.lang.String onKeyUp)
Scripting code executed when the user releases a key while the component has focus.
getOnKeyUp()
public java.lang.String getOnMouseDown()
Scripting code executed when the user presses a mouse button while the mouse pointer is on the component.
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.
getOnMouseDown()
public java.lang.String getOnMouseMove()
Scripting code executed when the user moves the mouse pointer while over the component.
public void setOnMouseMove(java.lang.String onMouseMove)
Scripting code executed when the user moves the mouse pointer while over the component.
getOnMouseMove()
public java.lang.String getOnMouseOut()
Scripting code executed when a mouse out movement occurs over this component.
public void setOnMouseOut(java.lang.String onMouseOut)
Scripting code executed when a mouse out movement occurs over this component.
getOnMouseOut()
public java.lang.String getOnMouseOver()
Scripting code executed when the user moves the mouse pointer into the boundary of this component.
public void setOnMouseOver(java.lang.String onMouseOver)
Scripting code executed when the user moves the mouse pointer into the boundary of this component.
getOnMouseOver()
public java.lang.String getOnMouseUp()
Scripting code executed when the user releases a mouse button while the mouse pointer is on the component.
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.
getOnMouseUp()
public java.lang.String getOnReset()
Scripting code executed when this form is reset.
public void setOnReset(java.lang.String onReset)
Scripting code executed when this form is reset.
getOnReset()
public java.lang.String getOnSubmit()
Scripting code executed when this form is submitted.
public void setOnSubmit(java.lang.String onSubmit)
Scripting code executed when this form is submitted.
getOnSubmit()
public java.lang.String getStyle()
CSS style(s) to be applied when this component is rendered.
public void setStyle(java.lang.String style)
CSS style(s) to be applied when this component is rendered.
getStyle()
public java.lang.String getStyleClass()
CSS style class(es) to be applied when this component is rendered.
public void setStyleClass(java.lang.String styleClass)
CSS style class(es) to be applied when this component is rendered.
getStyleClass()
public java.lang.String getTarget()
The form's target window.
public void setTarget(java.lang.String target)
The form's target window.
getTarget()
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.
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.
getVirtualForms()
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").
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").
getVirtualFormsConfig()
public boolean isVisible()
Use the visible attribute to indicate whether the component should be viewable by the user in the rendered HTML page.
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.
isVisible()
public void restoreState(javax.faces.context.FacesContext _context, java.lang.Object _state)
Restore the state of this component.
public java.lang.Object saveState(javax.faces.context.FacesContext _context)
Save the state of this component.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |