Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

passing parameter on button click  RSS feed

 
Rajeev Ravindran
Ranch Hand
Posts: 455
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 536
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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,

 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!