File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes passing parameter on button click 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 "passing parameter on button click" Watch "passing parameter on button click" New topic
Author

passing parameter on button click

Rajeev Ravindran
Ranch Hand

Joined: Aug 27, 2002
Posts: 455
hi,

i want to pass parameter to the backing bean on button click. it works good on <h:command link, but when i tried passing <f:param / f:attribute inside <hx:commandExButton, its not getting value in backing bean. im using ibm-jsf.jar

my code :
<hx:commandExButton type="submit" value="Archive"
styleClass="commandExButton" id="buttonArchive"
action="#{pc_Home.doButtonArchiveAction}" >
<f:param value="hello" name="certID" />
</hx:commandExButton>


doButtonArchiveAction of backigbean is getting invoked but im not able to ge the certID using request.getParameter("certID"). it returns null.
Any ideas or suggestions are welcome.

Thanks,
Rajeev
Richard Green
Ranch Hand

Joined: Aug 25, 2005
Posts: 536
hope this example helps...

i have a datatable that lists the authorities. Every authority row has an "Edit" button next to it. In my backing bean, I coded to logic to workout which authority row needs to be edited.



and in my backing bean,



MCSD, SCJP, SCWCD, SCBCD, SCJD (in progress - URLybird 1.2.1)
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: passing parameter on button click
 
Similar Threads
Dynamic Component in JSF
parameter passing to Seam backing bean method
JSF - SelectManyListBox doesnt populate on valeChangeevent
Commandlink not calling method in the bean
CommandLink Vs OutputLink in JSF