• 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
Fwd: Ajax Framework Bug?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fwd: Ajax Framework Bug?


  • Subject: Fwd: Ajax Framework Bug?
  • From: Johnny Miller <email@hidden>
  • Date: Tue, 27 Nov 2012 10:15:54 -1000

OK.

I found where that convenience method (partialFormSenderID) is used:

ERXAjaxContext's private method _wasFormSubmitted()

This also appears to be the same except it's been deprecated...

Johnny


Begin forwarded message:

From: Johnny Miller <email@hidden>
Subject: Re: Ajax Framework Bug?
Date: November 27, 2012 10:00:46 AM HST
To: Farrukh Ijaz <email@hidden>
Cc: Amedeo Mantica <email@hidden>, WebObjects Development <email@hidden>

Hi Farrukh,

In my "real" component I had set fullSubmit to false but I omitted it in the example.  I just tried it anyway and unfortunately it still calls the method someOtherArrayOfStrings.

If you track it down the difference between fullSubmit true and false is that the _javascript_ submit function for the Ajax Request is generated by the method ASB.partial(updateContainerID, formFieldID, options)

Which has this interesting little note on top of it:

// We need to cheat and make the WOForm that contains the form action appear to have been
// submitted. So we grab the action url, pull off the element ID from its action URL
// and pass that in as FORCE_FORM_SUBMITTED_KEY, which is processed by ERXWOForm just like
// senderID is on the real WOForm. Unfortunately we can't hook into the real WOForm to do
// this :(

I checked that function against an older version of Wonder on my computer and it doesn't appear to have been changed.  An interesting part of this function is the following line of code:

queryParams[AjaxSubmitButton.PartialFormSenderIDKey] = formField.name;

in ERAjaxApplication there is this final variable:

public static final String KEY_PARTIAL_FORM_SENDER_ID = "_partialSenderID";

Which corresponds to what is in the _javascript_ file.  But I can't find anywhere where this variable is referenced other than in this convenience method in ERAjaxApplication:

/**
* Returns the form name of the partial form submission.
* 
* @param request
*            the request
* @return the form name of the partial form submission
*/
public static String partialFormSenderID(WORequest request) {
return request.stringFormValueForKey(ERXAjaxApplication.KEY_PARTIAL_FORM_SENDER_ID);
}

So, I'm kind of lost at this point.  If anyone has an idea I sure would appreciate hearing it.

Aloha,

Johnny


On Nov 27, 2012, at 2:01 AM, Farrukh Ijaz <email@hidden> wrote:

Hi Johnny,

There is a binding called fullSubmit for AjaxObserveField. Set it to false. That should solve the problem I believe.

http://jenkins.wocommunity.org/job/WonderIntegration/lastBuild/javadoc/er/ajax/AjaxObserveField.html

Farrukh

On Nov 17, 2012, at 8:42 PM, Johnny Miller <email@hidden> wrote:

Hi Amedeo,

Actually, I think they were work the same way.  But I tried for sanity's sake and it still is doing the same thing.

Johnny

On Nov 16, 2012, at 10:06 PM, Amedeo Mantica <email@hidden> wrote:

I'm on iPhone now btw

<wo:AjaxUpdateContainer observeFieldID

Is weird. You should use AjaxObserveField

Amedeo

Sent from my iPhone

On 17/nov/2012, at 03:13, Johnny Miller <email@hidden> wrote:

Hi,

I recently updated my Wonder Frameworks and I have a question about something I am seeing.

One of my components broke and I'm thinking that either I misunderstand something or something in Ajax Framework has now changed.

Given the following example:

<wo:form>
<wo:popUpButton list = "$arrayOfStrings" selection = "$selectedString" id = "StringSelector"></wo:popUpButton>
<wo:AjaxUpdateContainer observeFieldID = "StringSelector">
<wo:WOKeyValueConditional key = "selectedString" value = "String Two">
String Two Is Selected
</wo:WOKeyValueConditional>
</wo:AjaxUpdateContainer>
</wo:form>
<wo:repetition list = "$someOtherArrayOfStrings" item = "$aString"><br/>
<wo:str value = "$aString" />
</wo:repetition>


I would assume that when the value of the pop up button changes only the contents of the AjaxUpdateContainer would get touched.  However, if I put a logging statement on someOtherArrayOfStrings I can see that it gets called.  It's like it is processing the whole component all over again.

Is that the way it is supposed to work or has a bug been introduced?

Aloha,
Mr. Johnny Miller
Web Development Manager
Kahalawai Media Company
Lahaina, HI 96761
tel: (808) 661-7962 | mobile: (808) 283-0791
website | e-mail
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: 
 >Re: Ajax Framework Bug? (From: Johnny Miller <email@hidden>)

  • Prev by Date: Re: Ajax Framework Bug?
  • Next by Date: Partials and prototype boolean
  • Previous by thread: Re: Ajax Framework Bug?
  • Next by thread: Re: Ajax Framework Bug?
  • Index(es):
    • Date
    • Thread