aspose file tools
The moose likes JSF and the fly likes How to give a h:inputHidden element an initial value and bind it to a backing bean? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "How to give a h:inputHidden element an initial value and bind it to a backing bean?" Watch "How to give a h:inputHidden element an initial value and bind it to a backing bean?" New topic
Author

How to give a h:inputHidden element an initial value and bind it to a backing bean?

Dave Alvarado
Ranch Hand

Joined: Jul 02, 2008
Posts: 434
Hi,

I'm using MyFaces 1.1.5 with Tomahawk 1.1.7. I have a dataTable and each row contains a commandLink that submits to a page requiring a single value. I have chosen to put this value in a hidden field, but I don't know how to bind the hidden field's value to to the backing bean's field. Here's what I have so far ...



Here, I want to bind the inputHidden to the backing bean field, "#{DriverTransactionReportController..licenseNumber}". Any ideas how I do this?

Thanks, - Dave
yun hu
Greenhorn

Joined: Feb 18, 2010
Posts: 13

<h:commandLink action="#{DriverTransactionReportController.submit}">
<f:param name="param" value="#{currentRow.name}" />
</h:commandLink>


Get parameter from backing bean :

String obj = (String) context.getExternalContext().getRequestParameterMap().get(
"param");
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: How to give a h:inputHidden element an initial value and bind it to a backing bean?
 
Similar Threads
Question on how to fix error on inputHidden field
how to get the value which changed by javascript in pagecode?
selectBooleanCheckbox
inputText in dataTable
passing hidden field value to backing bean