Re: Ajax request, ERXRedirect and ERXThreadStorage
Re: Ajax request, ERXRedirect and ERXThreadStorage
- Subject: Re: Ajax request, ERXRedirect and ERXThreadStorage
- From: Chuck Hill <email@hidden>
- Date: Tue, 12 Jul 2016 16:11:11 +0000
- Thread-topic: Ajax request, ERXRedirect and ERXThreadStorage
As long as you have more than one worker thread, there is no guarantee which will process which request. Do you have a session you can stash it in?
Chuck
From:
<webobjects-dev-bounces+chill=email@hidden> on behalf of Lon Varscsak <email@hidden>
Date: Tuesday, July 12, 2016 at 8:58 AM
To: Paul Hoadley <email@hidden>
Cc: WebObjects-Dev <email@hidden>
Subject: Re: Ajax request, ERXRedirect and ERXThreadStorage
I believe the the thread storage is reset for each request, and the Ajax request and the redirect are two different requests.
On Mon, Jul 11, 2016 at 11:52 PM, Paul Hoadley <email@hidden> wrote:
Hello,
I’m working on an app where some page-level informational messages (such as validation problems) are stored in ERXThreadStorage, and displayed by the page wrapper. This works great for full page loads.
In a few places, I’m doing some Ajax submissions with AjaxSubmitButton. In the usual case, nothing goes wrong and an AjaxUpdateContainer displays some new information. I figured that a reasonable way to display validation errors from these
Ajax submissions would be to stash the messages in ERXThreadStorage in the usual way, and then use ERXRedirect and its setComponentToPage() to just force a full page reload. This all works except (critically) the _retrieval_ of the messages from ERXThreadStorage—there’s
nothing there. Is this expected? Is the invocation of the action method by the Ajax submission on a different thread?
_______________________________________________
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