You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Michał 'Gandalf' Stawicki <st...@gmail.com> on 2007/02/08 15:49:40 UTC

tc:selectOneListbox onchange bug?

The onchange attribute doesn't seem to work

I have this code:

<tc:selectOneListbox
onchange="Tobago.submitAction(':overview:placeOrder');"
value="#{clientManagedBean.clientOrderBrowserController.selectedOrder}">
<f:selectItems value="#{clientManagedBean.orders.orders}" />
</tc:selectOneListbox>


But when I look at the source of generated page I get:

<select name="overview:_idJsp106:_idJsp107"
id="overview:_idJsp106:_idJsp107" style="height:393px; width:374px; "
class="tobago-selectOneListbox-default " size="2"
onchange="Tobago.selectOneListboxChange(this)"
onclick="Tobago.selectOneListboxClick(this)"
>
...

and my onchange action never happens...

Anyone has a solution for this?

regards
michael

-- 
stawicki@gmail.com
http://stawicki.jasliska.pl
GG: 3691111
JID: stawicki@gmail.com

Re: tc:selectOneListbox onchange bug?

Posted by Michał 'Gandalf' Stawicki <st...@gmail.com>.
This did the trick, thanks once again

regards,
michael

On 08/02/07, Volker Weber <v....@inexso.de> wrote:
> Hi Michael,
>
> please don't use the onchange attributes.
>
> you can add a facet 'change' with a tc:command inside:
>
> <tc:selectOneListbox
>     value="#{clientManagedBean.clientOrderBrowserController.selectedOrder}">
>   <f:facet name="change">
>     <tc:command action=#{...} />
>   </f:facet>
>   <f:selectItems value="#{clientManagedBean.orders.orders}" />
> </tc:selectOneListbox>
>
> see discussion on https://issues.apache.org/jira/browse/TOBAGO-272
>
> Regards,
>   Volker
>
> 2007/2/8, Michał 'Gandalf' Stawicki <st...@gmail.com>:
> > The onchange attribute doesn't seem to work
> >
> > I have this code:
> >
> > <tc:selectOneListbox
> > onchange="Tobago.submitAction(':overview:placeOrder');"
> > value="#{clientManagedBean.clientOrderBrowserController.selectedOrder}">
> > <f:selectItems value="#{clientManagedBean.orders.orders}" />
> > </tc:selectOneListbox>
> >
> >
> > But when I look at the source of generated page I get:
> >
> > <select name="overview:_idJsp106:_idJsp107"
> > id="overview:_idJsp106:_idJsp107" style="height:393px; width:374px; "
> > class="tobago-selectOneListbox-default " size="2"
> > onchange="Tobago.selectOneListboxChange(this)"
> > onclick="Tobago.selectOneListboxClick(this)"
> > >
> > ...
> >
> > and my onchange action never happens...
> >
> > Anyone has a solution for this?
> >
> > regards
> > michael
> >
> > --
> > stawicki@gmail.com
> > http://stawicki.jasliska.pl
> > GG: 3691111
> > JID: stawicki@gmail.com
> >
>


-- 
stawicki@gmail.com
http://stawicki.jasliska.pl
GG: 3691111
JID: stawicki@gmail.com

Re: tc:selectOneListbox onchange bug?

Posted by Volker Weber <v....@inexso.de>.
Hi Michael,

please don't use the onchange attributes.

you can add a facet 'change' with a tc:command inside:

<tc:selectOneListbox
    value="#{clientManagedBean.clientOrderBrowserController.selectedOrder}">
  <f:facet name="change">
    <tc:command action=#{...} />
  </f:facet>
  <f:selectItems value="#{clientManagedBean.orders.orders}" />
</tc:selectOneListbox>

see discussion on https://issues.apache.org/jira/browse/TOBAGO-272

Regards,
  Volker

2007/2/8, Michał 'Gandalf' Stawicki <st...@gmail.com>:
> The onchange attribute doesn't seem to work
>
> I have this code:
>
> <tc:selectOneListbox
> onchange="Tobago.submitAction(':overview:placeOrder');"
> value="#{clientManagedBean.clientOrderBrowserController.selectedOrder}">
> <f:selectItems value="#{clientManagedBean.orders.orders}" />
> </tc:selectOneListbox>
>
>
> But when I look at the source of generated page I get:
>
> <select name="overview:_idJsp106:_idJsp107"
> id="overview:_idJsp106:_idJsp107" style="height:393px; width:374px; "
> class="tobago-selectOneListbox-default " size="2"
> onchange="Tobago.selectOneListboxChange(this)"
> onclick="Tobago.selectOneListboxClick(this)"
> >
> ...
>
> and my onchange action never happens...
>
> Anyone has a solution for this?
>
> regards
> michael
>
> --
> stawicki@gmail.com
> http://stawicki.jasliska.pl
> GG: 3691111
> JID: stawicki@gmail.com
>