• Post Reply Bookmark Topic Watch Topic
  • New Topic

My checkbox will not stay checked

 
Davie Lin
Ranch Hand
Posts: 294
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi guys, I have a checkbox like



The above code is enclosed in richface modal panel. However, only when I open the window the first time, the check box is pre-checked and on subsequent window opening, the checkbox is no longer checked. I have try to replace "true" with "#(variableFromBean}" and set that variableFromBean everytime someone click a button to open that modal panel. That just simply don't even check the box at all. I am using JSF 1.1, very frustrated with the stupid crap this framework keep throwing me. Please, if you know something that can help me solve this issue, greatly appreciated.
 
Tim Holloway
Bartender
Posts: 18417
58
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Blanking out of values usually comes from defining a property's scope too narrowly. Generally that means giving "request" scope, since request scope objects get destroyed and re-created between postbacks.

Interesting that the hard-coded constant "true" would blank out, but not impossible. You're supposed to use a read/write property when using input controls.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!