| Author |
How to change check box state
|
Priya Joshi
Greenhorn
Joined: Feb 24, 2008
Posts: 8
|
|
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
|
 |
Tim Holloway
Saloon Keeper
Joined: Jun 25, 2001
Posts: 14487
|
|
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.
|
Customer surveys are for companies who didn't pay proper attention to begin with.
|
 |
 |
|
|
subject: How to change check box state
|
|
|