• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Triggering AjaxObserveField through javascript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

taylorchadden.com
@drizztmainsword





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


2013/5/7 Taylor Hadden <email@hidden>
Hi Tobias,

Do I literally call "<myAjaxID>Update()"?

Does the AjaxUpdateContainer need to be within a WOForm, or can it exist outside of it?

Thanks,
-Taylor

taylorchadden.com
@drizztmainsword





On May 6, 2013, at 3:17 AM, Tobias Janz <email@hidden> wrote:

Hi,

AjaxUpdateContainer with fullsubmit=true and id=yourUpdateContainerId
_javascript_ to call yourUpdateContainerIdUpdate()

Tobias

2013/5/2 Taylor Hadden <email@hidden>
Hi there,

I've got a series of WOPopUpButtons each with their own AjaxObserveField. They all have the same options and related to different objects. When manually manipulating pop-ups, everything works perfectly.

I've also got another WOPopPupButton that is used to set the other pop-ups all at once. I set the values through _javascript_, and the <selection> fields on the page update, however their values are not submitted through AjaxObserveField. I have tried manually firing the "onchange" event in _javascript_, but it doesn't work.

I had previously used the "observeFieldFrequency" attribute of AjaxObserveField to bypass this problem, but that causes issues with text fields (which are set up in the same manner).

So, how can I get the _javascript_ behind AjaxObserveField to update and submit these values?

Thanks,
-Taylor


taylorchadden.com
@drizztmainsword






 _______________________________________________
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





 _______________________________________________
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

References: 
 >Triggering AjaxObserveField through javascript (From: Taylor Hadden <email@hidden>)
 >Re: Triggering AjaxObserveField through javascript (From: Tobias Janz <email@hidden>)
 >Re: Triggering AjaxObserveField through javascript (From: Taylor Hadden <email@hidden>)
 >Re: Triggering AjaxObserveField through javascript (From: Tobias Janz <email@hidden>)

  • Prev by Date: WOMetaRefresh anyone?
  • Next by Date: Re: WOMetaRefresh anyone?
  • Previous by thread: Re: Triggering AjaxObserveField through javascript
  • Next by thread: D2W Design Question
  • Index(es):
    • Date
    • Thread