Hi Rafa,

Thank you for your help. It appeared that the strange behaviour was caused 
by a bug in one custom defined interface element. The binding in my mail 
was used to try and workaround the bug Bart encountered. Solving the bug 
in the interface element definition solved the problem for Bart and me.

Regards,

Jeroen Weijers




"Rafa Pérez" <[EMAIL PROTECTED]> 
08-04-2008 11:59
Please respond to
"MyFaces Discussion" <[email protected]>


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

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






Hi Bart,

can you post more code of the jsp, bean and the entity?

Hi Jeroen,

why are you using binding? Depending on the scope of the backing bean, it 
is possible that it does not store the correct values. If you make use of 
component binding, you should make your backing bean request scoped.



On Tue, Apr 8, 2008 at 10:08 AM, Jeroen Weijers <
[EMAIL PROTECTED]> wrote:
Hi all,
I'm working on the same problem as Bart Kummel. Another problem, but 
similar to the problem of Bart Kummel (it is actually on the same page and 
with the same bean) is the following:
I bind my booleancheckbox to a 
UIXSelectBoolean object in my bean (it is configured as a backing bean in 
the xml file). 
 
binding
="#{myBean.uixSelectBooleanObject}"
In the action listener coupled to the submit button I try to read this 
value but get a Null pointer exception.
public void actionMethod(ActionEvent action){
value  = getUixSelectBooleanObject.isSelected();
}
Regards,
Jeroen Weijers


On 4/8/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: 

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