Input - Hidden

Creates a hidden field on the page. A hidden field can contain data, but is not visible to the user. It is often used to pass information between pages and to hold system information.

 

Component at design time

Drag and drop an

Input - Hidden component onto the page:

The

Input - Hidden component looks like this on the page:

 

Component at runtime

The

Input - Hidden component has no visual rendering during runtime.

 

Properties and All Attributes views

The Properties view for a component shows the most common set of attributes you can set on a component, and, depending on the component, you might also see options for adding controls, actions, or other components. To open the Properties view, click

Window | Show View | Properties.

These common attributes for the Input - Hidden component display on the h:inputHidden and Validation tabs in the Properties view. See the All Input - Hidden attributes table for a complete list of attributes. Additional configuration options to validate input are on the h:inputHidden>Validation tab:

Table 1. Input - Hidden configuration options

Configuration option

Description

Click to create/edit custom validation code

Switches to the Quick Edit view so that scripts or snippets of code may be entered for various user initiated events.

Constraint

Limits the type of characters that can be entered into the component (for example, Digits Only or ASCII Alphabet Only). Adds hx:validateConstraint with the regex attribute to the All Attributes view.

Display validation error messages in an error message control

Inserts an error message component associated with the selected component. This will display an error message if the validation fails.

Maximum length

The maximum number of characters this component can contain when submitted on the server. Adds the function f:validateLength with a maximum attribute to the All Attributes view.

Minimum length

The minimum number of characters this component can contain when submitted on the server. Adds a function f:validateLength with a minimum attribute to the All Attributes view.

The All Attributes view shows a table of all the attributes you can set on a component, which includes those attributes you can access from the Properties view. To switch to the All Attributes view, click the

All Attributes icon in the upper right corner of the Properties view.

Table 2. All Input - Hidden attributes

Attribute name

Represented in Properties view by

Description

binding

Not represented

An expression that binds the component's instance (usually a user interface component) to a bean property (usually in the backing file).

converter

Not represented

Specifies the data type to which the value is converted. The JavaServer Faces implementation provides a set of Converter implementations that you can use to convert your component data to a type not supported by its renderer.

id

ID

Assigns a name to a component. Should be a unique name within a JSP.

immediate

Not represented

If true, skip straight to render phase of life cycle.

rendered

Not represented

Can be set to true or false:

  • false - Component will not be rendered to the browser at runtime.

  • true - Component will get rendered. This is the default value.

required

Validation>Value is Required

The component must be specified. Check this to require the user to enter a value.

validator

Not represented

A method (represented by a MethodBinding expression) that accepts FacesContext, UIComponent, and Object parameters. It is called during the validation process to ensure that value of the component is correct.

value

Value

Specifies the initial text value for the component displayed at runtime. Contains information to be displayed, in the form of a specified value or a pointer to a dynamic value.

valueChangeListener

Not represented

Method to be notified when value of component has changed.