• 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 change check box state

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am very new to JSF.
I am facing one problem, I want to change the state of check box (want to uncheckd it).
Even though I am setting value to false but its not working, it is getting its state from the root view.
Below is the simle jsf code i am using and setting employer field's value in controller as false.
I debuge it the value is changing for the field but when it start executing JSF stuff and its value reset to true.

<html:selectBooleanCheckbox id="employerAndIncomeID" value="#{PersonBSO.employer}" />

I struggling with this. If anybody tell me how to change a JSF components value programatically will be great help for me.



Thanks and Regards,
Priya
 
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That's not enough to actually indicate what the problem is. My guess is that your backing bean is in request scope and it's getting destroyed and recreated on each page request. It would need to be in session scope to avoid that.
 
reply
    Bookmark Topic Watch Topic
  • New Topic