• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to call Javascript function from managed bean

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic