users@woodstock.java.net

Re: Client side update

From: Dan Labrecque <Dan.Labrecque_at_Sun.COM>
Date: Sun, 14 Oct 2007 23:01:39 -0400

Right now, the best examples are provided with the TLD docs -- included
in the component jar download. In particular, take a look at the
get/setSelectedValue() functions of listbox and dropdown. There are also
get/setProps() functions you can use to retrieve and set widget
properties.||||

In addition to being able to update widgets client-side, there is also a
feature to asynchronously refresh (redraw) the listbox. Basically, you
call the listbox's refresh() function and provide the id of the dropDown
menu. Like a typical page submit, you may retrieve the dropDown value
during JSF's invoke application phase, for example. This gives you the
opportunity to update the listbox, via a backing bean, before it is
redrawn client-side.

Both approaches are documented in examples #3 and #5 of the listbox TLD.

Dan

Stephan Bardubitzki wrote:
> Hi,
>
> I'm using some woodstock components which ship with NB 6.0 Beta1. I
> have a page with a drop down list and a listbox. My problem is to
> understand how to update the listbox component on the client side when
> the user select an option in the drop down. I suppose I have to use
> javascript, but I'm not good at that.
>
> Is there a tutorial or some sample code available on how to do that?
>
> Thanks in advance for any help.
>
> Stephan