Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to do URL rewrite in JSF  RSS feed

 
Anjana Chowdary
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am very newbie to JSF. I am trying out one sample in which I had list of some messages, if I click on any message then it should populate
corresponding message information in new popwindow... I want to call up particular action method of bean through javascript!! Am I thinking in the right way??

Has any one, had worked on this sort of sample, If so can you let me know any ideas!!!

Thanks,
Anjana
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You want to invoke an UICommand action using JavaScript? The trick is to create a hidden commandButton or commandLink and then simulate a click using JS.

Here is a basic example:

JSF

JavaScript

When executing the clickHiddenButton() JavaScript, then the MyBean's action() method will be invoked.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!