users@woodstock.java.net

Re: Two listbox and method refresh

From: Dan Labrecque <Dan.Labrecque_at_Sun.COM>
Date: Mon, 28 Apr 2008 23:13:16 -0400

Are you certain a valid HTML element was obtained (i.e., domNode is not
null)? Perhaps you have the wrong ID?

endrinas wrote:
> Hello,
>
> I have problems with listbox component and the method refresh.
> I'm trying to do this:
>
> I want to have 2 listbox components in the same page. When I select one item
> in the first lisbox, I want to refresh de second one with a bakinbean.
>
> I tryed to implement it like the examples in the TLD but I always obtain a
> javascript error
>
> 'null' is null or isn't an object
>
> My jsp code is like this
>
>
>
> <webuijsf:listbox binding="#{EditaDatos.list}" id="list"
> items="#{EditaDatos.informes}" />
>
> <webuijsf:listbox binding="#{EditaDatos.listbox1}" id="listbox1"
>
> items="#{EditaDatos.listbox1DefaultOptions.options}"
> onChange="refreshList()"
>
> valueChangeListenerExpression="#{EditaDatos.obtenerInformes}"/>
>
> <webuijsf:script>
> function refreshList() {
> var domNode = document.getElementById("form1:list");
> return domNode.refresh("form1:listbox1");
>
> }
> </webuijsf:script>
>
> Can anybody help me?
>
> Thanks
>