| |||||||
FRAMES NO FRAMES |
Use the webuijsf: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
webui.suntheme.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.<webuijsf:page>
<webuijsf:html>
<webuijsf:head id="head"
title="Hyperlink Test Page" />
<webuijsf:body>
<webuijsf:form id="form1">
<webuijsf:hyperlink
id="hyperlinkSubmitsPage"
label="#{HyperlinkBean.label}"
action="#{HyperlinkBean.determineWhatToDoFunction}" />
</webuijsf:form>
</webuijsf:body>
</webuijsf:html>
</webuijsf:page>
<webuijsf:page>
<webuijsf:html>
<webuijsf:head id="head"
title="Shipping and Billing Information" />
<webuijsf:body>
<webuijsf:form id="form1" virtualFormsConfig="shipping | shippingAddressTextField
| updateShippingButton , creditCard | creditCardDropDown | creditCardDropDown ,
billing | billingAddressTextfield creditCardDropDown | updateBillingButton">
<webuijsf:label for="shippingAddressTextField" id="shippingAddressLabel"
style="left: 48px; top: 48px; position: absolute" text="Shipping Address:"/>
<webuijsf:textField id="shippingAddressTextField" required="true"
style="left: 48px; top: 72px; position: absolute"/>
<webuijsf:button id="updateShippingButton" style="left: 48px; top: 120px;
position: absolute" text="Update Shipping Address"/>
<webuijsf:label id="creditCardLabel" for="creditCardDropDown"
style="left: 48px; top: 192px; position: absolute"
text="Credit Card to Use:"/>
<webuijsf:dropDown id="creditCardDropDown"
items="#{SessionBean1.creditCards}" style="left: 48px; top: 216px;
position: absolute"/>
<webuijsf:label id="billingAddressLabel" for="billingAddressTextfield"
style="left: 48px; top: 264px; position: absolute"
text="Credit Card Billing Address:"/>
<webuijsf:textField id="billingAddressTextfield" required="true"
style="left: 48px; top: 288px; position: absolute"/>
<webuijsf:button id="updateBillingButton" style="left: 48px; top: 336px;
position: absolute" text="Update Billing Address"/>
<webuijsf:button id="updateAllButton" style="left: 48px; top: 432px; position:
absolute" text="Update All Information"/>
</webuijsf:form>
</webuijsf:body>
</webuijsf:html>
</webuijsf:page>
Tag Information | |
Tag Class | com.sun.webui.jsf.component.FormTag |
TagExtraInfo Class | None |
Body Content | JSP |
Display Name | None |
Attributes | ||||
Name | Required | Request-time | Type | Description |
binding | false | false | java.lang.String | A ValueExpression that resolves to the UIComponent that corresponds to this tag. This binding allows the Java bean that contains the UIComponent to manipulate the UIComponent, its properties, and its children. |
onMouseDown | false | false | java.lang.String | Scripting code executed when the user presses a mouse button while the mouse pointer is on the component. |
onDblClick | false | false | java.lang.String | Scripting code executed when a mouse double click occurs over this component. |
enctype | false | false | java.lang.String | 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. |
virtualFormsConfig | false | false | java.lang.String | 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"). |
onKeyPress | false | false | java.lang.String | Scripting code executed when the user presses and releases a key while the component has focus. |
target | false | false | java.lang.String | Use this attribute to set the target of the XHTML form tag. |
onMouseOut | false | false | java.lang.String | Scripting code executed when a mouse out movement occurs over this component. |
rendered | false | false | java.lang.String | Use the rendered attribute to indicate whether the HTML code for the component should be included in the rendered HTML page. If set to false, the rendered HTML page does not include the HTML for the component. If the component is not rendered, it is also not processed on any subsequent form submission. |
autoComplete | false | false | java.lang.String | 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". |
id | false | true | java.lang.String | No Description |
onMouseOver | false | false | java.lang.String | Scripting code executed when the user moves the mouse pointer into the boundary of this component. |
onKeyUp | false | false | java.lang.String | Scripting code executed when the user releases a key while the component has focus. |
onMouseMove | false | false | java.lang.String | Scripting code executed when the user moves the mouse pointer while over the component. |
onMouseUp | false | false | java.lang.String | Scripting code executed when the user releases a mouse button while the mouse pointer is on the component. |
styleClass | false | false | java.lang.String | CSS style class(es) to be applied to the outermost HTML element when this component is rendered. |
onSubmit | false | false | java.lang.String | Scripting code executed when this form is submitted. |
onReset | false | false | java.lang.String | Scripting code executed when this form is reset. |
visible | false | false | java.lang.String | Use the visible attribute to indicate whether the component should be viewable by the user in the rendered HTML page. |
style | false | false | java.lang.String | CSS style(s) to be applied to the outermost HTML element when this component is rendered. |
onKeyDown | false | false | java.lang.String | Scripting code executed when the user presses down on a key while the component has focus. |
onClick | false | false | java.lang.String | Scripting code executed when a mouse click occurs over this component. |
Variables | No Variables Defined. |
| |||||||
FRAMES NO FRAMES |