You can drag the Standard JavaServer Faces Hidden Field component from
the Palette to the Visual Designer to create a hidden text field.
A hidden field is a form field that is not visible, but can
be used to pass form data to the server. A typical use of a
hidden field is to pass parameters between pages in applications
that use multiple pages. Hidden Field components render as
<input
type='hidden'>
in HTML. The value of the field is the
data the field stores and passes back to the server when the
form is submitted.
Since the field is hidden, the component does not appear on the page, but it does appear in the . You can select the hidden field in the Navigator window and right-click it to open its pop-up menu.
After adding a hidden field to a Visual Web JSF page, you can do a number of things with it:
id
attribute. In the page bean, this property's value is
the name of the HtmlInputHidden
object.validate
method so you can insert code to validate the value
of the component.processValueChange
method so you can insert code that executes when the
value of this component changes (for example, the user
changes the value of another component that is controlling
the value of this component).value
property to a data provider or an object so your application can evaluate it when the page is submitted. For more information, see Bind to Data Dialog Box.common_timeoutSubmitForm(this.form, 'component-id');
. At runtime, this code causes the form to be automatically submitted if the component value changes. Once the form is submitted, conversion and validation occur on the server and any value change listener methods execute, and then the page is redisplayed.
A component configured to Auto-Submit on Change can use virtual forms to limit the input fields that are processed when the form is submitted. If the auto-submit component is defined to submit a virtual form, only the participants in that virtual form will be processed when the auto-submit occurs.