This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to call Javascript function from managed bean

 
Pattamuthu Aru
Greenhorn
Posts: 13
  • 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
  • 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
  • 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
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic