Another way is to use <f:action type="org.host.MyClass"> or
<f:actionListener type="org.host.MyClass"> tag.
But be aware of that only the ActionListener has access to the context
whereas only the Action can be used for dynamic navigation.
Jeffrey Porter wrote:
What is the correct way to pass a value into a method when a button is
pressed.
I have the situation where I have a table rendered, via h:dataTable, and
I want to add button for each row.
So that when the button is pressed, an action starts, loads some data &
redirects to a new page.
Do create a hidden textfield that’s contains the value or is there
another way?
Thanks
Jeff
- Re: commandButton & passing a value? Marius Kreis
-