Meaningless Drivel is fun!*
The moose likes JSF and the fly likes How to  do URL rewrite in JSF Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "How to  do URL rewrite in JSF" Watch "How to  do URL rewrite in JSF" New topic
Author

How to do URL rewrite in JSF

Anjana Chowdary
Greenhorn

Joined: Oct 25, 2005
Posts: 8
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

Joined: Oct 08, 2006
Posts: 2458
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: How to do URL rewrite in JSF
 
Similar Threads
Samples Tutorials on JSF applications
Whether JSF supports I18N and access control
JAAS - JSF 1.1 to JSF 1.2
saving to database
using log4J