• 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Resetting bean value in JSF

 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In my jsf I am reading a bean value and executing java script if its set to true:



Is there any way in the jsf or in the javascript I can set to false?

Thanks
 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
With a4j library you could do that: http://www.jboss.org/community/wiki/Ajax4jsf

Something like:



The event parameter is the javascript event that will cause the method specified by action to be executed. Instead of onclick, you could also use onsubmit, onload, onchange, etc. depending on the jsf-component in which you've embedded the a4j:support section
setNeedToPrintToFalse works as the name suggests. The reRender value lists all id's of jsf components, areas or forms that need to be rererended after the javascript event fired.

 
Evil is afoot. But this tiny ad is just an ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic