You are viewing a plain text version of this content. The canonical link for it is here.
Posted to adffaces-dev@incubator.apache.org by Piyush Hari <pi...@oracle.com> on 2006/11/09 22:25:49 UTC

valueChangeListener of a selectBooleanCheckbox

I run into a problem where my checkbox seems to lose its ValueChangeListener 
on a mobile browser like Pocket IE, IE Mobile.
Here is what I have on my JSF page:

<tr:form>
    <tr:panelGroupLayout>
    <tr:selectBooleanCheckbox text="selectBooleanCheckbox 1"
                                               label="Label 1"
                                               valueChangeListener="#{bean.valueChange}"
                                               id="check1"
                                              autoSubmit="true"
      />
</tr:form>

I have a backing bean 'Bean' in 'session' scope that looks like this:

public class Bean {
   public Bean() {    }
   public void valueChange(ValueChangeEvent valueChangeEvent) {
       // Add event code here...
       System.out.println("valueChange event is being called !");
  }
}

When the page first comes up, I click on the checkbox. I DON'T see the 
message "valueChange event is being called". But when
I click again, the same ValueChangeListener gets invoked and displays the 
message "valueChange event is being called".
Does anybody know what I did wrong?

BTW, this works fine on Desktop applications. I am wondering why it does not 
for mobile browsers. Does valueChangeListener for a checkBox has a 
dependence on the type of Browser ? 


Re: Re: Re: Re: Re: Re: valueChangeListener of a selectBooleanCheckbox

Posted by Adam Winer <aw...@gmail.com>.
Fixed.

-- Adam


On 11/12/06, piyush hari <pi...@gmail.com> wrote:
> Yes. It is.
>
> -Piyush
>
> On 11/12/06, Adam Winer <aw...@gmail.com> wrote:
> >
> > That does look wrong, but is that the cause of this bug?
> >
> > -- Adam
> >
> > On 11/10/06, Piyush Hari <pi...@oracle.com> wrote:
> > > I dug up the mountain and found this mouse:
> > >
> > > There was a typo while building request string:
> > >
> > > do you see it ?
> > >
> > > else if (element.type == "checkbox" && element.checked == true)
> > >             datatosend += ( element.name + "=" + escape(element.value) +
> > "&
> > > ");
> > >
> > > No...? Look at the space after '&'  and before the closing brackets :-)
> > >
> > > -Piyush
> > >
> > > ----- Original Message -----
> > > From: "Piyush Hari" <pi...@oracle.com>
> > > To: <ad...@incubator.apache.org>
> > > Sent: Friday, November 10, 2006 4:26 PM
> > > Subject: Re: Re: Re: Re: valueChangeListener of a selectBooleanCheckbox
> > >
> > >
> > > > When I remove the code that would submit the value each time it is
> > checked
> > > > (check1=t) from the Core.js  , the valueChangeListener gets called
> > > > properly. But, this is obviously not the right thing to do since the
> > user
> > > > might need to submit a value.
> > > >
> > > > -Piyush
> > > > ----- Original Message -----
> > > > From: "Adam Winer" <aw...@gmail.com>
> > > > To: <ad...@incubator.apache.org>
> > > > Sent: Friday, November 10, 2006 4:15 PM
> > > > Subject: Re: Re: Re: Re: valueChangeListener of a
> > selectBooleanCheckbox
> > > >
> > > >
> > > >> On 11/10/06, piyush hari <pi...@gmail.com> wrote:
> > > >>> Upon checking a check Box, getSubmittedValue() does not get called.
> > Upon
> > > >>> unchecking it does get called.
> > > >>
> > > >> That should be investigated.
> > > >>
> > > >>> HTTP request differs in t.o the attribute check1 (check1 being the
> > > >>> user-assigned ID of the checkBox). It does not get passed upon
> > > >>> unchecking.
> > > >>> It gets passed with a value 't' upon checking.
> > > >>>
> > > >>> Upon checking:
> > > >>>
> > > >>> check1=t
> > > >>> &org.apache.myfaces.trinidad.faces.FORM=_id1
> > > >>> &org.apache.myfaces.trinidad.faces.STATE=%2138234b14
> > > >>> &source=check1
> > > >>> &event=check1
> > > >>> &partialTargets=
> > > >>> &partial=true
> > > >>>
> > > >>> Upon Unchecking:
> > > >>>
> > > >>> org.apache.myfaces.trinidad.faces.FORM=_id1
> > > >>> &org.apache.myfaces.trinidad.faces.STATE=%2138234b14
> > > >>> &source=check1
> > > >>> &event=check1
> > > >>> &partialTargets=
> > > >>> &partial=true
> > > >>
> > > >> Those look fine.
> > > >>
> > > >> -- Adam
> > > >>
> > > >
> > > >
> > >
> > >
> >
>
>

Re: Re: Re: Re: Re: valueChangeListener of a selectBooleanCheckbox

Posted by piyush hari <pi...@gmail.com>.
Yes. It is.

-Piyush

On 11/12/06, Adam Winer <aw...@gmail.com> wrote:
>
> That does look wrong, but is that the cause of this bug?
>
> -- Adam
>
> On 11/10/06, Piyush Hari <pi...@oracle.com> wrote:
> > I dug up the mountain and found this mouse:
> >
> > There was a typo while building request string:
> >
> > do you see it ?
> >
> > else if (element.type == "checkbox" && element.checked == true)
> >             datatosend += ( element.name + "=" + escape(element.value) +
> "&
> > ");
> >
> > No...? Look at the space after '&'  and before the closing brackets :-)
> >
> > -Piyush
> >
> > ----- Original Message -----
> > From: "Piyush Hari" <pi...@oracle.com>
> > To: <ad...@incubator.apache.org>
> > Sent: Friday, November 10, 2006 4:26 PM
> > Subject: Re: Re: Re: Re: valueChangeListener of a selectBooleanCheckbox
> >
> >
> > > When I remove the code that would submit the value each time it is
> checked
> > > (check1=t) from the Core.js  , the valueChangeListener gets called
> > > properly. But, this is obviously not the right thing to do since the
> user
> > > might need to submit a value.
> > >
> > > -Piyush
> > > ----- Original Message -----
> > > From: "Adam Winer" <aw...@gmail.com>
> > > To: <ad...@incubator.apache.org>
> > > Sent: Friday, November 10, 2006 4:15 PM
> > > Subject: Re: Re: Re: Re: valueChangeListener of a
> selectBooleanCheckbox
> > >
> > >
> > >> On 11/10/06, piyush hari <pi...@gmail.com> wrote:
> > >>> Upon checking a check Box, getSubmittedValue() does not get called.
> Upon
> > >>> unchecking it does get called.
> > >>
> > >> That should be investigated.
> > >>
> > >>> HTTP request differs in t.o the attribute check1 (check1 being the
> > >>> user-assigned ID of the checkBox). It does not get passed upon
> > >>> unchecking.
> > >>> It gets passed with a value 't' upon checking.
> > >>>
> > >>> Upon checking:
> > >>>
> > >>> check1=t
> > >>> &org.apache.myfaces.trinidad.faces.FORM=_id1
> > >>> &org.apache.myfaces.trinidad.faces.STATE=%2138234b14
> > >>> &source=check1
> > >>> &event=check1
> > >>> &partialTargets=
> > >>> &partial=true
> > >>>
> > >>> Upon Unchecking:
> > >>>
> > >>> org.apache.myfaces.trinidad.faces.FORM=_id1
> > >>> &org.apache.myfaces.trinidad.faces.STATE=%2138234b14
> > >>> &source=check1
> > >>> &event=check1
> > >>> &partialTargets=
> > >>> &partial=true
> > >>
> > >> Those look fine.
> > >>
> > >> -- Adam
> > >>
> > >
> > >
> >
> >
>

Re: Re: Re: Re: Re: valueChangeListener of a selectBooleanCheckbox

Posted by Adam Winer <aw...@gmail.com>.
That does look wrong, but is that the cause of this bug?

-- Adam

On 11/10/06, Piyush Hari <pi...@oracle.com> wrote:
> I dug up the mountain and found this mouse:
>
> There was a typo while building request string:
>
> do you see it ?
>
> else if (element.type == "checkbox" && element.checked == true)
>             datatosend += ( element.name + "=" + escape(element.value) + "&
> ");
>
> No...? Look at the space after '&'  and before the closing brackets :-)
>
> -Piyush
>
> ----- Original Message -----
> From: "Piyush Hari" <pi...@oracle.com>
> To: <ad...@incubator.apache.org>
> Sent: Friday, November 10, 2006 4:26 PM
> Subject: Re: Re: Re: Re: valueChangeListener of a selectBooleanCheckbox
>
>
> > When I remove the code that would submit the value each time it is checked
> > (check1=t) from the Core.js  , the valueChangeListener gets called
> > properly. But, this is obviously not the right thing to do since the user
> > might need to submit a value.
> >
> > -Piyush
> > ----- Original Message -----
> > From: "Adam Winer" <aw...@gmail.com>
> > To: <ad...@incubator.apache.org>
> > Sent: Friday, November 10, 2006 4:15 PM
> > Subject: Re: Re: Re: Re: valueChangeListener of a selectBooleanCheckbox
> >
> >
> >> On 11/10/06, piyush hari <pi...@gmail.com> wrote:
> >>> Upon checking a check Box, getSubmittedValue() does not get called. Upon
> >>> unchecking it does get called.
> >>
> >> That should be investigated.
> >>
> >>> HTTP request differs in t.o the attribute check1 (check1 being the
> >>> user-assigned ID of the checkBox). It does not get passed upon
> >>> unchecking.
> >>> It gets passed with a value 't' upon checking.
> >>>
> >>> Upon checking:
> >>>
> >>> check1=t
> >>> &org.apache.myfaces.trinidad.faces.FORM=_id1
> >>> &org.apache.myfaces.trinidad.faces.STATE=%2138234b14
> >>> &source=check1
> >>> &event=check1
> >>> &partialTargets=
> >>> &partial=true
> >>>
> >>> Upon Unchecking:
> >>>
> >>> org.apache.myfaces.trinidad.faces.FORM=_id1
> >>> &org.apache.myfaces.trinidad.faces.STATE=%2138234b14
> >>> &source=check1
> >>> &event=check1
> >>> &partialTargets=
> >>> &partial=true
> >>
> >> Those look fine.
> >>
> >> -- Adam
> >>
> >
> >
>
>

Re: Re: Re: Re: valueChangeListener of a selectBooleanCheckbox

Posted by Piyush Hari <pi...@oracle.com>.
I dug up the mountain and found this mouse:

There was a typo while building request string:

do you see it ?

else if (element.type == "checkbox" && element.checked == true)
            datatosend += ( element.name + "=" + escape(element.value) + "& 
");

No...? Look at the space after '&'  and before the closing brackets :-)

-Piyush

----- Original Message ----- 
From: "Piyush Hari" <pi...@oracle.com>
To: <ad...@incubator.apache.org>
Sent: Friday, November 10, 2006 4:26 PM
Subject: Re: Re: Re: Re: valueChangeListener of a selectBooleanCheckbox


> When I remove the code that would submit the value each time it is checked 
> (check1=t) from the Core.js  , the valueChangeListener gets called 
> properly. But, this is obviously not the right thing to do since the user 
> might need to submit a value.
>
> -Piyush
> ----- Original Message ----- 
> From: "Adam Winer" <aw...@gmail.com>
> To: <ad...@incubator.apache.org>
> Sent: Friday, November 10, 2006 4:15 PM
> Subject: Re: Re: Re: Re: valueChangeListener of a selectBooleanCheckbox
>
>
>> On 11/10/06, piyush hari <pi...@gmail.com> wrote:
>>> Upon checking a check Box, getSubmittedValue() does not get called. Upon
>>> unchecking it does get called.
>>
>> That should be investigated.
>>
>>> HTTP request differs in t.o the attribute check1 (check1 being the
>>> user-assigned ID of the checkBox). It does not get passed upon 
>>> unchecking.
>>> It gets passed with a value 't' upon checking.
>>>
>>> Upon checking:
>>>
>>> check1=t
>>> &org.apache.myfaces.trinidad.faces.FORM=_id1
>>> &org.apache.myfaces.trinidad.faces.STATE=%2138234b14
>>> &source=check1
>>> &event=check1
>>> &partialTargets=
>>> &partial=true
>>>
>>> Upon Unchecking:
>>>
>>> org.apache.myfaces.trinidad.faces.FORM=_id1
>>> &org.apache.myfaces.trinidad.faces.STATE=%2138234b14
>>> &source=check1
>>> &event=check1
>>> &partialTargets=
>>> &partial=true
>>
>> Those look fine.
>>
>> -- Adam
>>
>
> 


Re: Re: Re: Re: valueChangeListener of a selectBooleanCheckbox

Posted by Piyush Hari <pi...@oracle.com>.
When I remove the code that would submit the value each time it is checked 
(check1=t) from the Core.js  , the valueChangeListener gets called properly. 
But, this is obviously not the right thing to do since the user might need 
to submit a value.

-Piyush
----- Original Message ----- 
From: "Adam Winer" <aw...@gmail.com>
To: <ad...@incubator.apache.org>
Sent: Friday, November 10, 2006 4:15 PM
Subject: Re: Re: Re: Re: valueChangeListener of a selectBooleanCheckbox


> On 11/10/06, piyush hari <pi...@gmail.com> wrote:
>> Upon checking a check Box, getSubmittedValue() does not get called. Upon
>> unchecking it does get called.
>
> That should be investigated.
>
>> HTTP request differs in t.o the attribute check1 (check1 being the
>> user-assigned ID of the checkBox). It does not get passed upon 
>> unchecking.
>> It gets passed with a value 't' upon checking.
>>
>> Upon checking:
>>
>> check1=t
>> &org.apache.myfaces.trinidad.faces.FORM=_id1
>> &org.apache.myfaces.trinidad.faces.STATE=%2138234b14
>> &source=check1
>> &event=check1
>> &partialTargets=
>> &partial=true
>>
>> Upon Unchecking:
>>
>> org.apache.myfaces.trinidad.faces.FORM=_id1
>> &org.apache.myfaces.trinidad.faces.STATE=%2138234b14
>> &source=check1
>> &event=check1
>> &partialTargets=
>> &partial=true
>
> Those look fine.
>
> -- Adam
> 


Re: Re: Re: Re: valueChangeListener of a selectBooleanCheckbox

Posted by Adam Winer <aw...@gmail.com>.
On 11/10/06, piyush hari <pi...@gmail.com> wrote:
> Upon checking a check Box, getSubmittedValue() does not get called. Upon
> unchecking it does get called.

That should be investigated.

> HTTP request differs in t.o the attribute check1 (check1 being the
> user-assigned ID of the checkBox). It does not get passed upon unchecking.
> It gets passed with a value 't' upon checking.
>
> Upon checking:
>
> check1=t
> &org.apache.myfaces.trinidad.faces.FORM=_id1
> &org.apache.myfaces.trinidad.faces.STATE=%2138234b14
> &source=check1
> &event=check1
> &partialTargets=
> &partial=true
>
> Upon Unchecking:
>
> org.apache.myfaces.trinidad.faces.FORM=_id1
> &org.apache.myfaces.trinidad.faces.STATE=%2138234b14
> &source=check1
> &event=check1
> &partialTargets=
> &partial=true

Those look fine.

-- Adam

Re: Re: Re: valueChangeListener of a selectBooleanCheckbox

Posted by piyush hari <pi...@gmail.com>.
Upon checking a check Box, getSubmittedValue() does not get called. Upon
unchecking it does get called.

HTTP request differs in t.o the attribute check1 (check1 being the
user-assigned ID of the checkBox). It does not get passed upon unchecking.
It gets passed with a value 't' upon checking.

Upon checking:

check1=t
&org.apache.myfaces.trinidad.faces.FORM=_id1
&org.apache.myfaces.trinidad.faces.STATE=%2138234b14
&source=check1
&event=check1
&partialTargets=
&partial=true

Upon Unchecking:

org.apache.myfaces.trinidad.faces.FORM=_id1
&org.apache.myfaces.trinidad.faces.STATE=%2138234b14
&source=check1
&event=check1
&partialTargets=
&partial=true

I am investigating this further but if you have any suggestions, let me
know. Kindly note that Desktop browsers have the same HTTP requests and it
works there.

-Piyush

On 11/10/06, Adam Winer <aw...@gmail.com> wrote:
> Puzzling.  I'd suggest you have a look at what HTTP parameters
> are getting sent, and what the Renderer's getSubmittedValue()
> method returns.
>
> -- Adam
>
> On 11/10/06, piyush hari <pi...@gmail.com> wrote:
> > Hi Adam,
> >
> > Please note that valueChangeListener is called when it is UNCHECKED
> > and not called when it is CHECKED (reverse of what you wrote). This
> > happens consistently provided my bean is in SESSION scope.
> >
> > -Piyush
> >
> > On 11/10/06, Adam Winer <aw...@gmail.com> wrote:
> > > Is it consistently that you don't get it when it's
> > > unchecked, but do get it when it's checked?
> > >
> > > -- Adam
> > >
> > >
> > > On 11/9/06, Piyush Hari <pi...@oracle.com> wrote:
> > > > I am using Sun's implementation of JSF here and not MyFaces, if that
makes
> > > > any difference ?
> > > >
> > > > -Piyush
> > > >
> > > > ----- Original Message -----
> > > > From: "Piyush Hari" <pi...@oracle.com>
> > > > To: <ad...@incubator.apache.org>
> > > > Sent: Thursday, November 09, 2006 2:25 PM
> > > > Subject: valueChangeListener of a selectBooleanCheckbox
> > > >
> > > >
> > > > >I run into a problem where my checkbox seems to lose its
> > > > >ValueChangeListener on a mobile browser like Pocket IE, IE Mobile.
> > > > > Here is what I have on my JSF page:
> > > > >
> > > > > <tr:form>
> > > > >    <tr:panelGroupLayout>
> > > > >    <tr:selectBooleanCheckbox text="selectBooleanCheckbox 1"
> > > > >                                               label="Label 1"
> > > > >
> > > > > valueChangeListener="#{bean.valueChange}"
> > > > >                                               id="check1"
> > > > >                                              autoSubmit="true"
> > > > >      />
> > > > > </tr:form>
> > > > >
> > > > > I have a backing bean 'Bean' in 'session' scope that looks like
this:
> > > > >
> > > > > public class Bean {
> > > > >   public Bean() {    }
> > > > >   public void valueChange(ValueChangeEvent valueChangeEvent) {
> > > > >       // Add event code here...
> > > > >       System.out.println("valueChange event is being called !");
> > > > >  }
> > > > > }
> > > > >
> > > > > When the page first comes up, I click on the checkbox. I DON'T see
the
> > > > > message "valueChange event is being called". But when
> > > > > I click again, the same ValueChangeListener gets invoked and
displays the
> > > > > message "valueChange event is being called".
> > > > > Does anybody know what I did wrong?
> > > > >
> > > > > BTW, this works fine on Desktop applications. I am wondering why
it does
> > > > > not for mobile browsers. Does valueChangeListener for a checkBox
has a
> > > > > dependence on the type of Browser ?
> > > > >
> > > >
> > > >
> > >
> >
>

Re: Re: Re: valueChangeListener of a selectBooleanCheckbox

Posted by Adam Winer <aw...@gmail.com>.
Puzzling.  I'd suggest you have a look at what HTTP parameters
are getting sent, and what the Renderer's getSubmittedValue()
method returns.

-- Adam

On 11/10/06, piyush hari <pi...@gmail.com> wrote:
> Hi Adam,
>
> Please note that valueChangeListener is called when it is UNCHECKED
> and not called when it is CHECKED (reverse of what you wrote). This
> happens consistently provided my bean is in SESSION scope.
>
> -Piyush
>
> On 11/10/06, Adam Winer <aw...@gmail.com> wrote:
> > Is it consistently that you don't get it when it's
> > unchecked, but do get it when it's checked?
> >
> > -- Adam
> >
> >
> > On 11/9/06, Piyush Hari <pi...@oracle.com> wrote:
> > > I am using Sun's implementation of JSF here and not MyFaces, if that makes
> > > any difference ?
> > >
> > > -Piyush
> > >
> > > ----- Original Message -----
> > > From: "Piyush Hari" <pi...@oracle.com>
> > > To: <ad...@incubator.apache.org>
> > > Sent: Thursday, November 09, 2006 2:25 PM
> > > Subject: valueChangeListener of a selectBooleanCheckbox
> > >
> > >
> > > >I run into a problem where my checkbox seems to lose its
> > > >ValueChangeListener on a mobile browser like Pocket IE, IE Mobile.
> > > > Here is what I have on my JSF page:
> > > >
> > > > <tr:form>
> > > >    <tr:panelGroupLayout>
> > > >    <tr:selectBooleanCheckbox text="selectBooleanCheckbox 1"
> > > >                                               label="Label 1"
> > > >
> > > > valueChangeListener="#{bean.valueChange}"
> > > >                                               id="check1"
> > > >                                              autoSubmit="true"
> > > >      />
> > > > </tr:form>
> > > >
> > > > I have a backing bean 'Bean' in 'session' scope that looks like this:
> > > >
> > > > public class Bean {
> > > >   public Bean() {    }
> > > >   public void valueChange(ValueChangeEvent valueChangeEvent) {
> > > >       // Add event code here...
> > > >       System.out.println("valueChange event is being called !");
> > > >  }
> > > > }
> > > >
> > > > When the page first comes up, I click on the checkbox. I DON'T see the
> > > > message "valueChange event is being called". But when
> > > > I click again, the same ValueChangeListener gets invoked and displays the
> > > > message "valueChange event is being called".
> > > > Does anybody know what I did wrong?
> > > >
> > > > BTW, this works fine on Desktop applications. I am wondering why it does
> > > > not for mobile browsers. Does valueChangeListener for a checkBox has a
> > > > dependence on the type of Browser ?
> > > >
> > >
> > >
> >
>

Re: Re: valueChangeListener of a selectBooleanCheckbox

Posted by piyush hari <pi...@gmail.com>.
Hi Adam,

Please note that valueChangeListener is called when it is UNCHECKED
and not called when it is CHECKED (reverse of what you wrote). This
happens consistently provided my bean is in SESSION scope.

-Piyush

On 11/10/06, Adam Winer <aw...@gmail.com> wrote:
> Is it consistently that you don't get it when it's
> unchecked, but do get it when it's checked?
>
> -- Adam
>
>
> On 11/9/06, Piyush Hari <pi...@oracle.com> wrote:
> > I am using Sun's implementation of JSF here and not MyFaces, if that makes
> > any difference ?
> >
> > -Piyush
> >
> > ----- Original Message -----
> > From: "Piyush Hari" <pi...@oracle.com>
> > To: <ad...@incubator.apache.org>
> > Sent: Thursday, November 09, 2006 2:25 PM
> > Subject: valueChangeListener of a selectBooleanCheckbox
> >
> >
> > >I run into a problem where my checkbox seems to lose its
> > >ValueChangeListener on a mobile browser like Pocket IE, IE Mobile.
> > > Here is what I have on my JSF page:
> > >
> > > <tr:form>
> > >    <tr:panelGroupLayout>
> > >    <tr:selectBooleanCheckbox text="selectBooleanCheckbox 1"
> > >                                               label="Label 1"
> > >
> > > valueChangeListener="#{bean.valueChange}"
> > >                                               id="check1"
> > >                                              autoSubmit="true"
> > >      />
> > > </tr:form>
> > >
> > > I have a backing bean 'Bean' in 'session' scope that looks like this:
> > >
> > > public class Bean {
> > >   public Bean() {    }
> > >   public void valueChange(ValueChangeEvent valueChangeEvent) {
> > >       // Add event code here...
> > >       System.out.println("valueChange event is being called !");
> > >  }
> > > }
> > >
> > > When the page first comes up, I click on the checkbox. I DON'T see the
> > > message "valueChange event is being called". But when
> > > I click again, the same ValueChangeListener gets invoked and displays the
> > > message "valueChange event is being called".
> > > Does anybody know what I did wrong?
> > >
> > > BTW, this works fine on Desktop applications. I am wondering why it does
> > > not for mobile browsers. Does valueChangeListener for a checkBox has a
> > > dependence on the type of Browser ?
> > >
> >
> >
>

Re: Re: valueChangeListener of a selectBooleanCheckbox

Posted by Adam Winer <aw...@gmail.com>.
Is it consistently that you don't get it when it's
unchecked, but do get it when it's checked?

-- Adam


On 11/9/06, Piyush Hari <pi...@oracle.com> wrote:
> I am using Sun's implementation of JSF here and not MyFaces, if that makes
> any difference ?
>
> -Piyush
>
> ----- Original Message -----
> From: "Piyush Hari" <pi...@oracle.com>
> To: <ad...@incubator.apache.org>
> Sent: Thursday, November 09, 2006 2:25 PM
> Subject: valueChangeListener of a selectBooleanCheckbox
>
>
> >I run into a problem where my checkbox seems to lose its
> >ValueChangeListener on a mobile browser like Pocket IE, IE Mobile.
> > Here is what I have on my JSF page:
> >
> > <tr:form>
> >    <tr:panelGroupLayout>
> >    <tr:selectBooleanCheckbox text="selectBooleanCheckbox 1"
> >                                               label="Label 1"
> >
> > valueChangeListener="#{bean.valueChange}"
> >                                               id="check1"
> >                                              autoSubmit="true"
> >      />
> > </tr:form>
> >
> > I have a backing bean 'Bean' in 'session' scope that looks like this:
> >
> > public class Bean {
> >   public Bean() {    }
> >   public void valueChange(ValueChangeEvent valueChangeEvent) {
> >       // Add event code here...
> >       System.out.println("valueChange event is being called !");
> >  }
> > }
> >
> > When the page first comes up, I click on the checkbox. I DON'T see the
> > message "valueChange event is being called". But when
> > I click again, the same ValueChangeListener gets invoked and displays the
> > message "valueChange event is being called".
> > Does anybody know what I did wrong?
> >
> > BTW, this works fine on Desktop applications. I am wondering why it does
> > not for mobile browsers. Does valueChangeListener for a checkBox has a
> > dependence on the type of Browser ?
> >
>
>

Re: valueChangeListener of a selectBooleanCheckbox

Posted by Piyush Hari <pi...@oracle.com>.
I am using Sun's implementation of JSF here and not MyFaces, if that makes 
any difference ?

-Piyush

----- Original Message ----- 
From: "Piyush Hari" <pi...@oracle.com>
To: <ad...@incubator.apache.org>
Sent: Thursday, November 09, 2006 2:25 PM
Subject: valueChangeListener of a selectBooleanCheckbox


>I run into a problem where my checkbox seems to lose its 
>ValueChangeListener on a mobile browser like Pocket IE, IE Mobile.
> Here is what I have on my JSF page:
>
> <tr:form>
>    <tr:panelGroupLayout>
>    <tr:selectBooleanCheckbox text="selectBooleanCheckbox 1"
>                                               label="Label 1"
> 
> valueChangeListener="#{bean.valueChange}"
>                                               id="check1"
>                                              autoSubmit="true"
>      />
> </tr:form>
>
> I have a backing bean 'Bean' in 'session' scope that looks like this:
>
> public class Bean {
>   public Bean() {    }
>   public void valueChange(ValueChangeEvent valueChangeEvent) {
>       // Add event code here...
>       System.out.println("valueChange event is being called !");
>  }
> }
>
> When the page first comes up, I click on the checkbox. I DON'T see the 
> message "valueChange event is being called". But when
> I click again, the same ValueChangeListener gets invoked and displays the 
> message "valueChange event is being called".
> Does anybody know what I did wrong?
>
> BTW, this works fine on Desktop applications. I am wondering why it does 
> not for mobile browsers. Does valueChangeListener for a checkBox has a 
> dependence on the type of Browser ?
>