wood burning stoves 2.0*
The moose likes JSF and the fly likes How to access JSF hidden field value? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "How to access JSF hidden field value? " Watch "How to access JSF hidden field value? " New topic

How to access JSF hidden field value?

Gautam Ry
Ranch Hand

Joined: Dec 30, 2008
Posts: 41
i am very new to JSF. My question
say a form has the following JSF component
<h:inputHidden id= "emp_id_val" value="AX"/>

How can I access the hidden field value using request scope?.

As we know, if the component is as below instead of the above.
<input type="hidden" name="emp_id_val" value="AX"/>
we can use <%=request.getParameter("emp_id_val")%>

I am looking for the similar kind of thing for JSF component.


Brajendra Mathema
Ranch Hand

Joined: Jun 02, 2009
Posts: 39

you can use value=#{requestScope['managed bean in requestscope'].attribute}

Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4968

You could even bind the hidden field to an instance of a JSF HtmlInputHidden and extract it that way, although I prefer the previous posters approach:


-Cameron McKenzie

I agree. Here's the link: http://aspose.com/file-tools
subject: How to access JSF hidden field value?
Similar Threads
passing hidden field value to backing bean
Example to make JSF work with DWR
Dynamic class type declaration
How to get the managed bean property value inside the javascript method in facelets?
javascript value to JSF