| |
|
| com.sun.rave.web.ui.component.FormBase
All known Subclasses: com.sun.rave.web.ui.component.Form,
FormBase | abstract public class FormBase extends javax.faces.component.UIForm (Code) | | 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!
|
Method Summary | |
public String | getEnctype() Use this attribute to set the content-type of the HTTP request
generated by this form. | public String | getFamily() Return the identifier of the component family to which this
component belongs. | public com.sun.rave.web.ui.component.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. | public String | getOnClick() | public String | getOnDblClick() | public String | getOnKeyDown() | public String | getOnKeyPress() | public String | getOnKeyUp() | public String | getOnMouseDown() | public String | getOnMouseMove() | public String | getOnMouseOut() | public String | getOnMouseOver() | public String | getOnMouseUp() | public String | getOnReset() | public String | getOnSubmit() | public String | getStyle() | public String | getStyleClass() | public String | getTarget() | public com.sun.rave.web.ui.component.Form.VirtualFormDescriptor[] | getVirtualForms() The virtual forms within this literal form, represented as an
array of Form.VirtualFormDescriptor objects. | public 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. | public boolean | isAutoComplete() Use this non-XHTML compliant boolean attribute to turn off autocompletion
feature of Internet Explorer and Firefox browsers. | public boolean | isVisible() | public void | restoreState(FacesContext _context, Object _state) | public Object | saveState(FacesContext _context) | public void | setAutoComplete(boolean autoComplete) Use this non-XHTML compliant boolean attribute to turn off autocompletion
feature of Internet Explorer and Firefox browsers. | public void | setEnctype(String enctype) Use this attribute to set the content-type of the HTTP request
generated by this form. | public void | setInternalVirtualForms(com.sun.rave.web.ui.component.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. | public void | setOnClick(String onClick) | public void | setOnDblClick(String onDblClick) | public void | setOnKeyDown(String onKeyDown) | public void | setOnKeyPress(String onKeyPress) | public void | setOnKeyUp(String onKeyUp) | public void | setOnMouseDown(String onMouseDown) | public void | setOnMouseMove(String onMouseMove) | public void | setOnMouseOut(String onMouseOut) | public void | setOnMouseOver(String onMouseOver) | public void | setOnMouseUp(String onMouseUp) | public void | setOnReset(String onReset) | public void | setOnSubmit(String onSubmit) | public void | setStyle(String style) | public void | setStyleClass(String styleClass) | public void | setTarget(String target) | public void | setVirtualForms(com.sun.rave.web.ui.component.Form.VirtualFormDescriptor[] virtualForms) The virtual forms within this literal form, represented as an
array of Form.VirtualFormDescriptor objects. | public void | setVirtualFormsConfig(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. | public void | setVisible(boolean visible) |
FormBase | public FormBase()(Code) | | Construct a new FormBase .
|
getEnctype | public String getEnctype()(Code) | | 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.
|
getFamily | public String getFamily()(Code) | | Return the identifier of the component family to which this
component belongs. This identifier, in conjunction with the value
of the rendererType property, may be used to select
the appropriate
Renderer for this component instance.
|
getInternalVirtualForms | public com.sun.rave.web.ui.component.Form.VirtualFormDescriptor[] getInternalVirtualForms()(Code) | | 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.
|
getOnClick | public String getOnClick()(Code) | | Scripting code executed when a mouse click
occurs over this component.
|
getOnDblClick | public String getOnDblClick()(Code) | | Scripting code executed when a mouse double click
occurs over this component.
|
getOnKeyDown | public String getOnKeyDown()(Code) | | Scripting code executed when the user presses down on a key while the
component has focus.
|
getOnKeyPress | public String getOnKeyPress()(Code) | | Scripting code executed when the user presses and releases a key while
the component has focus.
|
getOnKeyUp | public String getOnKeyUp()(Code) | | Scripting code executed when the user releases a key while the
component has focus.
|
getOnMouseDown | public String getOnMouseDown()(Code) | | Scripting code executed when the user presses a mouse button while the
mouse pointer is on the component.
|
getOnMouseMove | public String getOnMouseMove()(Code) | | Scripting code executed when the user moves the mouse pointer while
over the component.
|
getOnMouseOut | public String getOnMouseOut()(Code) | | Scripting code executed when a mouse out movement
occurs over this component.
|
getOnMouseOver | public String getOnMouseOver()(Code) | | Scripting code executed when the user moves the mouse pointer into
the boundary of this component.
|
getOnMouseUp | public String getOnMouseUp()(Code) | | Scripting code executed when the user releases a mouse button while
the mouse pointer is on the component.
|
getOnReset | public String getOnReset()(Code) | | Scripting code executed when this form is reset.
|
getOnSubmit | public String getOnSubmit()(Code) | | Scripting code executed when this form is submitted.
|
getStyle | public String getStyle()(Code) | | CSS style(s) to be applied when this component is rendered.
|
getStyleClass | public String getStyleClass()(Code) | | CSS style class(es) to be applied when this component is rendered.
|
getTarget | public String getTarget()(Code) | | The form's target window.
|
getVirtualForms | public com.sun.rave.web.ui.component.Form.VirtualFormDescriptor[] getVirtualForms()(Code) | | 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.
|
getVirtualFormsConfig | public String getVirtualFormsConfig()(Code) | | 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").
|
isAutoComplete | public boolean isAutoComplete()(Code) | | 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".
|
isVisible | public boolean isVisible()(Code) | | Use the visible attribute to indicate whether the component should be
viewable by the user in the rendered HTML page.
|
restoreState | public void restoreState(FacesContext _context, Object _state)(Code) | | Restore the state of this component.
|
saveState | public Object saveState(FacesContext _context)(Code) | | Save the state of this component.
|
setAutoComplete | public void setAutoComplete(boolean autoComplete)(Code) | | 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: FormBase.isAutoComplete() |
setEnctype | public void setEnctype(String enctype)(Code) | | 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: FormBase.getEnctype() |
setInternalVirtualForms | public void setInternalVirtualForms(com.sun.rave.web.ui.component.Form.VirtualFormDescriptor[] internalVirtualForms)(Code) | | 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: FormBase.getInternalVirtualForms() |
setOnKeyDown | public void setOnKeyDown(String onKeyDown)(Code) | | Scripting code executed when the user presses down on a key while the
component has focus.
See Also: FormBase.getOnKeyDown() |
setOnKeyPress | public void setOnKeyPress(String onKeyPress)(Code) | | Scripting code executed when the user presses and releases a key while
the component has focus.
See Also: FormBase.getOnKeyPress() |
setOnKeyUp | public void setOnKeyUp(String onKeyUp)(Code) | | Scripting code executed when the user releases a key while the
component has focus.
See Also: FormBase.getOnKeyUp() |
setOnMouseDown | public void setOnMouseDown(String onMouseDown)(Code) | | Scripting code executed when the user presses a mouse button while the
mouse pointer is on the component.
See Also: FormBase.getOnMouseDown() |
setOnMouseMove | public void setOnMouseMove(String onMouseMove)(Code) | | Scripting code executed when the user moves the mouse pointer while
over the component.
See Also: FormBase.getOnMouseMove() |
setOnMouseOver | public void setOnMouseOver(String onMouseOver)(Code) | | Scripting code executed when the user moves the mouse pointer into
the boundary of this component.
See Also: FormBase.getOnMouseOver() |
setOnMouseUp | public void setOnMouseUp(String onMouseUp)(Code) | | Scripting code executed when the user releases a mouse button while
the mouse pointer is on the component.
See Also: FormBase.getOnMouseUp() |
setVirtualForms | public void setVirtualForms(com.sun.rave.web.ui.component.Form.VirtualFormDescriptor[] virtualForms)(Code) | | 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: FormBase.getVirtualForms() |
setVirtualFormsConfig | public void setVirtualFormsConfig(String virtualFormsConfig)(Code) | | 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: FormBase.getVirtualFormsConfig() |
setVisible | public void setVisible(boolean visible)(Code) | | Use the visible attribute to indicate whether the component should be
viewable by the user in the rendered HTML page.
See Also: FormBase.isVisible() |
|
|
|