This tag is used to create the field that is hidden for 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".
This tag is used to create the field that is
hidden for 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".
component also has the capability to render the id for the component just the
same as we have mentioned in the id attribute of the tag. Normally the naming
system of JSF renders the id for the component with some additional text,
typically with id of the form as prefix. But this component has an attribute
forceId which forces the component to render the same id mentioned in the id
Rendered Output : The code above creates a hidden field in the page that doesn't
appear to the user but is used to pass the value from one page to the
other escaping from the users view. We can see the blank figure below :
id : This is the value which is used to
uniquely identify the component within the closest container like form or
subview. The main thing to remember is that its value must be a static
binding : This attribute is used to specify
the property of the backing bean with which this component instance is to be
rendered : Its default value is true.
If this attribute is set to true then this component is presented in
the page to the user. If false, then this component is not rendered.
value : The initial value of the component is
set to this attribute.
converter : This attribute is used to specify
the converter for the component.
immediate : This attribute is a boolean
attribute that is used to identify the phase during which the value change
event should be fired. In normal processing of the event, if immediate
attribute is not set to true, the value change event is fired during the
invoke application phase but if immediate attribute is set to true then the
event is fired at the end of apply request value phase.
required : This is a boolean attribute. If it
is set to true then it is necessary for the component to have the value
otherwise an error message is rendered to the user for the
validator : It takes the method binding
expression. This expression represents the validator method. This method is
called at the time of validation of the component.
valueChangeListener : This also takes a
method binding expression. This expression represents value change listener
method. This method will be called when new value is set for this component.
you can change the phase of the life cycle when this method should be fired
by the use of immediate attribute discussed above.
forceId : This is a boolean attribute with
default value false. If this attribute is set to true, the tag is forced to
render the id for the component exactly as mentioned in the id attribute of
the tag. The benefit of this attribute is that we can reference component by
then the id for the component is presented in different format.
forceIdIndex : This is a boolean attribute
with default value true. If this value is true then the the component
displays the index number in its id value if the component is in a list. If
this attribute is set to false then this component will not append index
number as suffix . If forcrId is set to false then its value is ignored.