Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to do URL rewrite in JSF

 
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic