users@woodstock.java.net

Re: Update multiple fields through AJAX

From: Dan Labrecque <Dan.Labrecque_at_Sun.COM>
Date: Sat, 16 Feb 2008 12:59:53 -0500

The textField has a submit feature, which allows multiple component
values to be submitted during an Ajax transaction. (See the TLD docs at
http://webdev2.sun.com/woodstock-tlddocs.) However, if you want to
refresh multiple components, I recommend using JSF Extensions (i.e.,
DynaFaces).

Note that Woodstock uses JSF Extensions under the covers. In fact, the
textField submit feature supports the same "execute" argument of
DynaFaces.fireAjaxTransaction -- a comma separated list of component
IDs. However, I'm thinking we could add the "rendered" argument as a
pass through to JSF Extensions. That way, you could use this feature to
submit and refresh multiple components via one request. Perhaps as a 4.3
feature?

That said, if you are using DynaFaces or Prototype APIs directly, use
the JSF Extensions |<jsfx:scripts>| tag to include this resource when
the page is loaded. And please read the Woodstock release notes on this
topic.

Dan

Lking wrote:
> Hello all,
>
> I just got the WoodStock 4.2 b2 and prior that I was still with the
> 4.1 one.
> I was used to "DynamicFaces.fireAjaxTransaction" but I'm wondering if
> there's a better way to update multiple fields through AJAX. Let's say
> I submit the value of a TextField and I want 3 others one to be
> updated when the process finishes. The only way I got it work 'till
> now was with DynamicFaces.fireAjaxTransaction but I'm eager to know if
> there's something better at 4.2 release as DynaFaces is not working
> properly.
>
> Thanks in advance.