Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

CheckBox bound to Bean value

843844Oct 29 2007 — edited Nov 12 2007
I am using Java studio creator to develop a simple web application. Being a great Java fan, both standard and entreprise edition, I gave JSF a go - even if, in the end, I spent a tremendous amount of time working around technical limitation. Probably a problem of design by my side.

I have a page that updates record in a database, using CachedRowSetDataProviders. I used the tutorial as an example, and it works well enough.

Except that I can't have my CheckBox Component working as intended. Since my DB store this boolean value as an int, I used the indications in the page http://developers.sun.com/jscreator/reference/techart/2/checkbox_component.html , and bound my checkbox to a page's bean value, whose getter and setter in turn retrieve & set the value in the DataProvider.

This is not working as intended. I have lazyly "logged" my getter/setter methods, and while the getter is called whenever the page is rendered, the setter never get called when I submit my form. The component is part of a virtual form and I double checked it was properly configured.
I have bound the 'selected' property of the checkbox to the bean's boolean, although the JSC bound the 'selectedValue' property if I happen to use the "Bind to data..." contextual menu.

I was previously successfull in using a methodBinding to the valueChange event for Checkboxes (out of ignorance of better method to use), but I would like to use the built in ability to map a component to a property, because this would simplify my code.

thanks in advance,
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 10 2007
Added on Oct 29 2007
10 comments
326 views