Re: Update multiple AjaxUpdateContainers at once
Re: Update multiple AjaxUpdateContainers at once
- Subject: Re: Update multiple AjaxUpdateContainers at once
- From: Paul Hoadley <email@hidden>
- Date: Wed, 17 Jun 2009 13:27:02 +0930
On 16/06/2009, at 9:10 PM, Gustavo Adolfo Pizano wrote:
I need to update an AjaxSelectionList and a WOString, which are in
different places in my html, I wrapped the WOString within an
AJaxUpdateContainer, and when I click an AjaxSubmitButton, I set the
UpdateContainerID to the one wrapping the WOString.
I wonder what can I do in order to update now the AjaxSelectionList
also at the same time?
One way would be to use an AjaxUpdateTrigger. Inside one of the
AjaxUpdateContainers, place an AjaxUpdateTrigger. Bind to
"updateContainerIDs" an NSArray<String> containing the ID (or IDs) of
the other container(s) that should update when the trigger fires.
Updating the container containing the AjaxUpdateTrigger will cause the
other containers to update.
Another way would be to use a binding like "onComplete" or "onSuccess"
on the AjaxSubmitButton. Recall that every AjaxUpdateContainer sets
up a JavaScript function called <containerID>Update(), where
<containerID> is literally the container's ID. (So if your AUC's ID
was "foo", there will be a function fooUpdate() which you can call to
update the AUC.) So you can bind that function name to one of those.
Watch out though, as some of those bindings want a function name
("fooUpdate"), and others want a JavaScript expression ("fooUpdate();").
--
Paul.
w http://logicsquad.net/
h http://paul.hoadley.name/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden