• 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: AjaxProxy doing page reload?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AjaxProxy doing page reload?


  • Subject: Re: AjaxProxy doing page reload?
  • From: Chuck Hill <email@hidden>
  • Date: Thu, 02 Aug 2012 17:45:41 -0700

That would not be ideal :-) but it would let you know if I am correct or if the problem is elsewhere.  The proper fix would be to get the JSONRpcClient to send this header.


Chuck


On 2012-08-02, at 5:32 PM, Pascal Robert wrote:

> How do I add it, by forcing it in Apache?
>
>> If that header is NOT there, the request will get processed like a normal /wo/ request.  That is probably why the entire page is getting processed again for  the proxy request to /ajax.
>>
>>
>> Chuck
>>
>>
>> On 2012-08-02, at 1:04 PM, Pascal Robert wrote:
>>
>>> Yes, it's in the request (for the /wo request handler, the proxy request to /ajax is not sending it).
>>>
>>> Request URL:http://localhost/cgi-bin/WebObjects/XXXX.woa/-52307/wo/azn4r2avrFesehL6Fre27g/0.0.11.1.0.9.0.1.1
>>> X-Requested-With:XMLHttpRequest
>>>
>>>> Is the client sending this header?
>>>>
>>>> 	public static boolean isAjaxRequest(WORequest request) {
>>>> 		String requestedWith = request.headerForKey("x-requested-with");
>>>> 		return "XMLHttpRequest".equals(requestedWith);
>>>> 	}
>>>>
>>>>
>>>> On 2012-08-02, at 11:41 AM, Pascal Robert wrote:
>>>>
>>>>> Well, it's quite rare that I ask question instead of answering questions, but anyway I have one. I just started using AjaxProxy because I need to take data coming from JavaScript and send that data to a NSDictionary.
>>>>>
>>>>> Problem is: when I call a method on the proxy, the whole page is reloaded, so every fetches to regenerate the page are done again. I was thinking it was because the original proxy was the parent page (e.g. "wopage") so I moved the proxy to a separate class but it's the same behavior. If I remove the call to the proxy (but the proxy is still being create), page is generated only once. The method I call in the proxy returns void.
>>>>> _______________________________________________
>>>>> 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
>>>>
>>>> --
>>>> Chuck Hill             Senior Consultant / VP Development
>>>>
>>>> Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
>>>> http://www.global-village.net/gvc/practical_webobjects
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>
>> --
>> Chuck Hill             Senior Consultant / VP Development
>>
>> Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
>> http://www.global-village.net/gvc/practical_webobjects
>>
>>
>>
>>
>>
>>
>>
>>
>

--
Chuck Hill             Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/gvc/practical_webobjects









 _______________________________________________
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: 
 >AjaxProxy doing page reload? (From: Pascal Robert <email@hidden>)
 >Re: AjaxProxy doing page reload? (From: Chuck Hill <email@hidden>)
 >Re: AjaxProxy doing page reload? (From: Pascal Robert <email@hidden>)
 >Re: AjaxProxy doing page reload? (From: Chuck Hill <email@hidden>)
 >Re: AjaxProxy doing page reload? (From: Pascal Robert <email@hidden>)

  • Prev by Date: Re: AjaxProxy doing page reload?
  • Next by Date: Re: Migrations and ERAttachment error
  • Previous by thread: Re: AjaxProxy doing page reload?
  • Next by thread: Re: AjaxProxy doing page reload?
  • Index(es):
    • Date
    • Thread