You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Ba...@Koopmanint.com on 2008/04/02 11:01:34 UTC

[Trinidad] does not update Entity

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

Re: [Trinidad] does not update Entity

Posted by Je...@Koopmanint.com.
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" <ra...@gmail.com> 
08-04-2008 11:59
Please respond to
"MyFaces Discussion" <us...@myfaces.apache.org>


To
"MyFaces Discussion" <us...@myfaces.apache.org>
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 <
Jeroen.Weijers@koopmanint.com> 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, Bart.Kummel@koopmanint.com <Ba...@koopmanint.com> 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" <ri...@gmail.com> 
02-04-2008 15:27 


Please respond to
"MyFaces Discussion" <us...@myfaces.apache.org>


To
"MyFaces Discussion" <us...@myfaces.apache.org> 
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, <Ba...@koopmanint.com> 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 




Re: [Trinidad] does not update Entity

Posted by Rafa Pérez <ra...@gmail.com>.
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 <
Jeroen.Weijers@koopmanint.com> 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  = getU*ixSelectBooleanObject*.isSelected();
>
> }
>
> Regards,
>
> Jeroen Weijers
>
>
> On 4/8/08, Bart.Kummel@koopmanint.com <Ba...@koopmanint.com> 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" <ri...@gmail.com>*
> >
> > 02-04-2008 15:27
> >   Please respond to
> > "MyFaces Discussion" <us...@myfaces.apache.org>
> >
> >    To
> > "MyFaces Discussion" <us...@myfaces.apache.org>  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, <*B...@koopmanint.com>>
> > 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
> >
> >
>

Re: [Trinidad] does not update Entity

Posted by Richard Yee <ri...@gmail.com>.
Bart,
The CoreSelectBooleanCheckbox has a lot more functionality than the
UIXSelectBoolean. All of the attributes available in a tr:selectBooleanTag
are available programmatically via methods in CoreSelectBooleanCheckbox.
I've been using the checkbox, radio button, selectOneChoice, and a lot of
the other controls extensively and I've found that they all work as expected
so I was pretty sure there was some small mistake in your usage that was
causing the problem.

-R

On Wed, Apr 9, 2008 at 3:10 AM, <Ba...@koopmanint.com> wrote:

>
> Hi Richard,
>
> Thanks for trying to help! We solved the problem in the meantime. We used
> a custom made Facelets component, which used the tr:selectBooleanCheckbox.
> There was a stupid bug in our facelets definition which caused our troubles.
> (We use autoSubmit, but the facelets definition "forgot" to set the
> autoSubmit value.) Once that was fixed, everything worked as expected. The
> reason we were trying to use bindings, was to work around the fact that
> boolean values were not updated in the first place. Now that's solved, we do
> not use binding anymore. And no, there was no particular reason for using
> UIXSelectBoolean. Just out of curiosity: are there good reasons to use
> CoreSelectBooleanCheckbox instead?
>
> Best regards,
> Bart
>
>
>
>  *"Richard Yee" <ri...@gmail.com>*
>
> 08-04-2008 21:23
>   Please respond to
>


> "MyFaces Discussion" <us...@myfaces.apache.org>
>
>   To
> "MyFaces Discussion" <us...@myfaces.apache.org>  cc
>   Subject
> Re: [Trinidad] <tr:selectBooleanCheckbox> does not update Entity
>
>
>
>
> Is there any particular reason you are using the UIXSelectBoolean as
> opposed to the CoreSelectBooleanCheckbox?
>
> -R
>
> On 4/8/08, *Jeroen Weijers* <*J...@koopmanint.com>>
> 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  = getU*ixSelectBooleanObject*.isSelected();
>
> }
>
> Regards,
>
> Jeroen Weijers
>
>
>
> On 4/8/08, *Bart.Kummel@koopmanint.com* <Ba...@koopmanint.com> <*
> Bart.Kummel@koopmanint.com* <Ba...@koopmanint.com>> 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" <**richard.k.yee@gmail.com* <ri...@gmail.com>*>*
>
> 02-04-2008 15:27
>   Please respond to
> "MyFaces Discussion" <*u...@myfaces.apache.org>
> >
>
>
>   To
> "MyFaces Discussion" <*u...@myfaces.apache.org>
> >  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, <*B...@koopmanint.com>>
> 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
>
>
>
>

Re: [Trinidad] does not update Entity

Posted by Ba...@Koopmanint.com.
Hi Richard,

Thanks for trying to help! We solved the problem in the meantime. We used 
a custom made Facelets component, which used the tr:selectBooleanCheckbox. 
There was a stupid bug in our facelets definition which caused our 
troubles. (We use autoSubmit, but the facelets definition "forgot" to set 
the autoSubmit value.) Once that was fixed, everything worked as expected. 
The reason we were trying to use bindings, was to work around the fact 
that boolean values were not updated in the first place. Now that's 
solved, we do not use binding anymore. And no, there was no particular 
reason for using UIXSelectBoolean. Just out of curiosity: are there good 
reasons to use CoreSelectBooleanCheckbox instead?

Best regards,
Bart 




"Richard Yee" <ri...@gmail.com> 
08-04-2008 21:23
Please respond to
"MyFaces Discussion" <us...@myfaces.apache.org>


To
"MyFaces Discussion" <us...@myfaces.apache.org>
cc

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






Is there any particular reason you are using the UIXSelectBoolean as 
opposed to the CoreSelectBooleanCheckbox? 
 
-R
 
On 4/8/08, Jeroen Weijers <Je...@koopmanint.com> 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, Bart.Kummel@koopmanint.com <Ba...@koopmanint.com> 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" <ri...@gmail.com> 
02-04-2008 15:27 

Please respond to
"MyFaces Discussion" <us...@myfaces.apache.org>



To
"MyFaces Discussion" <us...@myfaces.apache.org> 
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, <Ba...@koopmanint.com> 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 




Re: [Trinidad] does not update Entity

Posted by Richard Yee <ri...@gmail.com>.
Is there any particular reason you are using the UIXSelectBoolean as opposed
to the CoreSelectBooleanCheckbox?

-R

On 4/8/08, Jeroen Weijers <Je...@koopmanint.com> 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  = getU*ixSelectBooleanObject*.isSelected();
>
> }
>
> Regards,
>
> Jeroen Weijers
>
>
> On 4/8/08, Bart.Kummel@koopmanint.com <Ba...@koopmanint.com> 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" <ri...@gmail.com>*
> >
> > 02-04-2008 15:27   Please respond to
> > "MyFaces Discussion" <us...@myfaces.apache.org>
> >
> >    To
> > "MyFaces Discussion" <us...@myfaces.apache.org>  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, <*B...@koopmanint.com>>
> > 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
> >
> >
>

Re: [Trinidad] does not update Entity

Posted by Jeroen Weijers <Je...@Koopmanint.com>.
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  = getU*ixSelectBooleanObject*.isSelected();

}

Regards,

Jeroen Weijers


On 4/8/08, Bart.Kummel@koopmanint.com <Ba...@koopmanint.com> 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" <ri...@gmail.com>*
>
> 02-04-2008 15:27   Please respond to
> "MyFaces Discussion" <us...@myfaces.apache.org>
>
>    To
> "MyFaces Discussion" <us...@myfaces.apache.org>  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, <*B...@koopmanint.com>>
> 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
>
>

Re: [Trinidad] does not update Entity

Posted by Ba...@Koopmanint.com.
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" <ri...@gmail.com> 
02-04-2008 15:27
Please respond to
"MyFaces Discussion" <us...@myfaces.apache.org>


To
"MyFaces Discussion" <us...@myfaces.apache.org>
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, <Ba...@koopmanint.com> 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


Re: [Trinidad] does not update Entity

Posted by Richard Yee <ri...@gmail.com>.
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, <Ba...@koopmanint.com> 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