Hi Richard,

I have a Managed Bean with Session scope. The following works as expected:

<tr:textInput value=#{myBean.myEntity.fieldName}/>

The managed bean has a member "myEntity" and the corresponding 
"getMyEntity" and "setMyEntity" methods. As expected, the value of 
"myField" is displayed in the textInput when the page loads and if a make 
any changes, the value of "myField" gets updated when I press Submit. So I 
expect the same behaviour if I use

<tr:selectBooleanCheckbox value=#{myBean.myEntity.booleanFieldName}/>

On page load the boolean value is displayed correctly. But when I press 
Submit, hte booleanField in my entity is not updated. Do I have to take 
extra action for a boolean field? Or is something else going wrong? 

Best regards,
Bart Kummel




"Richard Yee" <[EMAIL PROTECTED]> 
02-04-2008 15:27
Please respond to
"MyFaces Discussion" <[email protected]>


To
"MyFaces Discussion" <[email protected]>
cc

Subject
Re: [Trinidad] <tr:selectBooleanCheckbox> does not update Entity






Bart,
Is your entity bean configured in faces-config.xml to be a backing bean? 
Otherwise, you should have your boolean value field in your backing bean 
and copy its value to your entity bean in your action handler method that 
is invoked from your command button.

-R

On Wed, Apr 2, 2008 at 2:01 AM, <[EMAIL PROTECTED]> wrote:

Hi all, 

I'm having problems with the <tr:selectBooleanCheckbox> component. I have 
a page that updates an EJB3 Entity. If I make changes, alle values in the 
Entity get updated, except for the boolean values that are linked with the 
<tr:selectBooleanCheckbox> components. (Like this: 
<tr:selectBooleanCheckbox value=#{entity.booleanValue}/>.) It seems that 
selecting or deselecting a checkbox is not recognized as a change. If I 
only change boolean values, the Entity is not touched at all. I don't have 
a clue what is going wrong. Am I doing something wrong? Or is this a known 
issue? Any help would be appreciated! 

Best regards, 
Bart Kummel

Reply via email to