Re: Triggering AjaxObserveField through javascript
Re: Triggering AjaxObserveField through javascript
- Subject: Re: Triggering AjaxObserveField through javascript
- From: Taylor Hadden <email@hidden>
- Date: Wed, 08 May 2013 10:12:12 -0400
Hi Tobias,
I ended up using a workaround that is basically your second solution. The "master" pop-up has an AjaxObserveField that both updates the objects behind the scenes and manually updates their AjaxUpdateContainers.
Thanks for the assistance! -Taylor
On May 8, 2013, at 1:03 AM, Tobias Janz < email@hidden> wrote: Hi Taylor,
i was wrong, sorry. the problem with the "myAjaxIDUpdate()" is that it will do a "get" not a "post". 2 other solutions:
1. Add an AjaxObserveField to the List, which is updating all. At the AOF set fullSubmit=true. Add an onChange to the List, where you call your _javascript_ to set the values.
Something like this:
ListForAll: <wo:popUpButton id="list3" list = "$myList" item = "$listItem" selection = "$listForAllSelection" _onChange_ = "document.getElementById('list1').setValue('2'); document.getElementById('list2').setValue('2');" noSelectionString = "---"/>
<wo:AjaxObserveField observeFieldID = "list3" updateContainerID = "myAjaxID" fullSubmit = "$true" />
2. And this is what I would do: Add an AjaxObserveField like above, but with an action then you can set the value in your JavaCode. Example:
ListForAll: <wo:popUpButton id="list3" list = "$myList" item = "$listItem" selection = "$listForAllSelection" noSelectionString = "---"/> <wo:AjaxObserveField action = "" observeFieldID = "list3" updateContainerID = "myAjaxID" fullSubmit = "$true" />
public WOActionResults setValuesFromListForAll() { setList1Selection("SelectForAll"); setList2Selection("SelectForAll"); return null; }
Hope this helps.
Tobias
|
_______________________________________________
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