JSF inputHidden Tag
This section describes the inputHidden JSF tag. This tag is used to create the field that is invisible to the user. This is the field that is used to pass the variables from one page to another. It renders the html input element with the type attribute set to "hidden".
Code Description :
|<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>|
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<h:inputHidden id="ih" value="hv"></h:inputHidden>
Rendered Output :
There is no rendered output for this tag . This gives invisible element as an output.
Html Scorce Code :
There is a list of all attributes that can be used in this inputHidden tag:
- id : This is set to uniquely identify the component. So this must be the unique value within the closest container.
- value : This is the current value of the component.
- binding : This is used to set the binding expression that is used to link the component to the backing bean's property.
- rendered : This is the boolean attribute that is set to describe that this component should be rendered or not at the time of render response phase.
- required : This is the boolean attribute. User is required to provide the value for the field or not at the time of submission of the form is indicated by this attribute.
- validator : It takes a method binding expression that represents validator method. This method is called to validate the value of the component.
- immediate : This is the boolean attribute. This is used to ensure that the events should be sent to the associated listener immediately. It should not be sent after validation phase.
- converter : It is used to register the converter instance to the component.
- valueChangeListener : It takes the method binding expression that notifies the value change listener method. It notifies this method when value is changed and new value is set for this component.