File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to call Javascript function from managed bean

 
Pattamuthu Aru
Greenhorn
Posts: 13
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have managed bean called register bean , actionListener is invoked and from there i need to call a java script function, from the bean method.

I know how to do that in ICEFACES (JAVASCRIPTCONTEXT), is that some thing similar available in JSF?
Please help me how to do that.
 
Adrian Mitev
Greenhorn
Posts: 10
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you explain the exact use case. In general you can't directly execute a client side script from server side. The only thing you can do is render javascript as result of server side action and this script will be executed after the response is rendered.
 
Pattamuthu Aru
Greenhorn
Posts: 13
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Adrian.

Yes we cannot execute Client side script from server side, but ICEFACES provides a way to do that.


Ok if it is not available in JSF, then i think rendering the script calling function will do.
 
Adrian Mitev
Greenhorn
Posts: 10
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The so called IceFaces way does exaclty the same - adds a javascript to the response so the browser can execute it after it receives the response. The only thing you gain is that the script rendering is out of the box with Icefaces.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic