Re: Handling Session timeout with ajax

2009-02-02 Thread Chuck Hill
On Feb 2, 2009, at 7:02 AM, Robert Tupelo-Schneck wrote: It doesn't seem to work correctly when I click an AjaxTabbedPanelTab. In that case the tab fills with something that looks like the normal WebObjects session timeout page with a bit of javascript tacked on the end; in fact, if I pe

Re: Handling Session timeout with ajax

2009-02-02 Thread Robert Tupelo-Schneck
On Jan 30, 2009, at 6:12 PM, Chuck Hill wrote: On Jan 30, 2009, at 2:29 PM, Robert Tupelo-Schneck wrote: On Jan 30, 2009, at 5:03 PM, Chuck Hill wrote: On Jan 30, 2009, at 1:14 PM, Robert Tupelo-Schneck wrote: It doesn't seem to work correctly when I click an AjaxTabbedPanelTab. In that case

Re: Handling Session timeout with ajax

2009-01-30 Thread Chuck Hill
On Jan 30, 2009, at 2:29 PM, Robert Tupelo-Schneck wrote: On Jan 30, 2009, at 5:03 PM, Chuck Hill wrote: On Jan 30, 2009, at 1:14 PM, Robert Tupelo-Schneck wrote: It doesn't seem to work correctly when I click an AjaxTabbedPanelTab. In that case the tab fills with something that looks lik

Re: Handling Session timeout with ajax

2009-01-30 Thread Robert Tupelo-Schneck
On Jan 30, 2009, at 5:03 PM, Chuck Hill wrote: On Jan 30, 2009, at 1:14 PM, Robert Tupelo-Schneck wrote: It doesn't seem to work correctly when I click an AjaxTabbedPanelTab. In that case the tab fills with something that looks like the normal WebObjects session timeout page with a bit of

Re: Handling Session timeout with ajax

2009-01-30 Thread Chuck Hill
On Jan 30, 2009, at 1:14 PM, Robert Tupelo-Schneck wrote: On Wed, 28 Jan 2009 09:38:43 -0800, Chuck Hill > wrote: if (AjaxUtils.isAjaxRequest(aContext.request())) { // Create redirect to return to break out of Ajax AjaxUtils.redirectTo(errorPage); WOResponse redirect = e

Re: Handling Session timeout with ajax

2009-01-30 Thread Robert Tupelo-Schneck
On Wed, 28 Jan 2009 09:38:43 -0800, Chuck Hill village.net> wrote: if (AjaxUtils.isAjaxRequest(aContext.request())) { // Create redirect to return to break out of Ajax AjaxUtils.redirectTo(errorPage); WOResponse redirect = errorPage.context().response(); // Generat

Re: Handling Session timeout with ajax

2009-01-28 Thread Chuck Hill
On Jan 28, 2009, at 6:10 PM, Paul Hoadley wrote: On 29/01/2009, at 12:13 PM, Chuck Hill wrote: The fix is in. Revision 8864. Please let me know how that works. It works. SessionID in URL, errorPage displayed. Excellent. Thank you! Thanks a _lot_. (As a really quick aside, since we

Re: Handling Session timeout with ajax

2009-01-28 Thread Paul Hoadley
On 29/01/2009, at 12:13 PM, Chuck Hill wrote: The fix is in. Revision 8864. Please let me know how that works. It works. SessionID in URL, errorPage displayed. Thanks a _lot_. (As a really quick aside, since we're all here and having so much fun: how can I build just a single Wonder fra

Re: Handling Session timeout with ajax

2009-01-28 Thread Chuck Hill
On Jan 28, 2009, at 5:33 PM, Paul Hoadley wrote: On 29/01/2009, at 11:54 AM, Chuck Hill wrote: Hold on now, that is just a work around, not a solution. After this marathon, a work around is looking good to me... The question now is why ERXRedirect is not putting the session ID in the URL

Re: Handling Session timeout with ajax

2009-01-28 Thread Paul Hoadley
On 29/01/2009, at 11:54 AM, Chuck Hill wrote: Hold on now, that is just a work around, not a solution. After this marathon, a work around is looking good to me... The question now is why ERXRedirect is not putting the session ID in the URL for you And, it is a bug. I have a fix, do you

Re: Handling Session timeout with ajax

2009-01-28 Thread Chuck Hill
On Jan 28, 2009, at 5:08 PM, Paul Hoadley wrote: On 29/01/2009, at 11:13 AM, Chuck Hill wrote: Both of these still produce the same result for me: a redirect to something like AM.woa/wo/4.0, which it presumably can't find and so returns Main. I've got logging in Session.terminate(), and

Re: Handling Session timeout with ajax

2009-01-28 Thread Paul Hoadley
On 29/01/2009, at 11:13 AM, Chuck Hill wrote: Both of these still produce the same result for me: a redirect to something like AM.woa/wo/4.0, which it presumably can't find and so returns Main. I've got logging in Session.terminate(), and it's not being called. Using the second variant,

Re: Handling Session timeout with ajax

2009-01-28 Thread Chuck Hill
On Jan 28, 2009, at 3:52 PM, Paul Hoadley wrote: On 29/01/2009, at 4:08 AM, Chuck Hill wrote: Score WebObjects: 1, Chuck: 0 Score Paul: 0, because... The defect is mine. The correct code is: if (AjaxUtils.isAjaxRequest(aContext.request())) { // Create redirect to return to break

Re: Handling Session timeout with ajax

2009-01-28 Thread Paul Hoadley
On 29/01/2009, at 4:08 AM, Chuck Hill wrote: Score WebObjects: 1, Chuck: 0 Score Paul: 0, because... The defect is mine. The correct code is: if (AjaxUtils.isAjaxRequest(aContext.request())) { // Create redirect to return to break out of Ajax AjaxUtils.redirectTo(errorPage)

Re: Handling Session timeout with ajax

2009-01-28 Thread David Avendasora
But, but.. Where's the Purple Moose? I still don't see it... What? Huh? Oh. On Jan 28, 2009, at 12:38 PM, Chuck Hill wrote: On Jan 27, 2009, at 10:03 PM, Chuck Hill wrote: On Jan 27, 2009, at 8:38 PM, Paul Hoadley wrote: On 28/01/2009, at 1:40 PM, Chuck Hill wrote: If not, follow Anjo's

Re: Handling Session timeout with ajax

2009-01-28 Thread Chuck Hill
On Jan 27, 2009, at 10:03 PM, Chuck Hill wrote: On Jan 27, 2009, at 8:38 PM, Paul Hoadley wrote: On 28/01/2009, at 1:40 PM, Chuck Hill wrote: If not, follow Anjo's suggestion of overriding dispatchRequest() and logging out the response before returning it. Jan 28 13:23:08 AM[50121] WARN N

Re: Handling Session timeout with ajax

2009-01-27 Thread Paul Hoadley
On 28/01/2009, at 4:33 PM, Chuck Hill wrote: It looks like WO is not saving errorPage in the page cache when handleException is called. I thought it did, maybe this is a 5.4 change. I am going to stick this on my To Do stack for now. No problem. Thanks for looking at it, Chuck. -- Paul

Re: Handling Session timeout with ajax

2009-01-27 Thread Paul Hoadley
On 28/01/2009, at 4:05 PM, Chuck Hill wrote: On Jan 27, 2009, at 8:38 PM, Paul Hoadley wrote: I'm not using ERXRedirect directly, but in Application.handleException() I have this: @Override public WOResponse handleException(Exception anException, WOContext aContext) { AMErrorPa

Re: Handling Session timeout with ajax

2009-01-27 Thread Chuck Hill
On Jan 27, 2009, at 8:38 PM, Paul Hoadley wrote: On 28/01/2009, at 1:40 PM, Chuck Hill wrote: If not, follow Anjo's suggestion of overriding dispatchRequest() and logging out the response before returning it. Jan 28 13:23:08 AM[50121] WARN NSLog - : Exception occurred while handling

Re: Handling Session timeout with ajax

2009-01-27 Thread Chuck Hill
On Jan 27, 2009, at 9:41 PM, Anjo Krank wrote: Am 28.01.2009 um 06:23 schrieb Mike Schrag: Thanks for taking a look. I'm glad it's not just me... Honestly, I wish it was just you. ;-) This stuff makes my head hurt sometimes. I'll trade you my current set of issues :) Me too! Gladly.

Re: Handling Session timeout with ajax

2009-01-27 Thread Anjo Krank
Am 28.01.2009 um 06:23 schrieb Mike Schrag: Thanks for taking a look. I'm glad it's not just me... Honestly, I wish it was just you. ;-) This stuff makes my head hurt sometimes. I'll trade you my current set of issues :) Me too! Gladly. Cheers, Anjo

Re: Handling Session timeout with ajax

2009-01-27 Thread Chuck Hill
On Jan 27, 2009, at 8:38 PM, Paul Hoadley wrote: On 28/01/2009, at 1:40 PM, Chuck Hill wrote: If not, follow Anjo's suggestion of overriding dispatchRequest() and logging out the response before returning it. Jan 28 13:23:08 AM[50121] WARN NSLog - : Exception occurred while handling

Re: Handling Session timeout with ajax

2009-01-27 Thread Mike Schrag
Thanks for taking a look. I'm glad it's not just me... Honestly, I wish it was just you. ;-) This stuff makes my head hurt sometimes. I'll trade you my current set of issues :) ms ___ Do not post admin requests to the list. They will be ignored.

Re: Handling Session timeout with ajax

2009-01-27 Thread Chuck Hill
On Jan 27, 2009, at 9:12 PM, Paul Hoadley wrote: On 28/01/2009, at 3:37 PM, Chuck Hill wrote: How are you using that ERXRedirect again? I'm not using ERXRedirect directly, but in Application.handleException() I have this: @Override public WOResponse handleException(Exception an

Re: Handling Session timeout with ajax

2009-01-27 Thread Paul Hoadley
On 28/01/2009, at 3:37 PM, Chuck Hill wrote: How are you using that ERXRedirect again? I'm not using ERXRedirect directly, but in Application.handleException() I have this: @Override public WOResponse handleException(Exception anException, WOContext aContext) { AMErrorPage err

Re: Handling Session timeout with ajax

2009-01-27 Thread Chuck Hill
On Jan 27, 2009, at 8:38 PM, Paul Hoadley wrote: On 28/01/2009, at 1:40 PM, Chuck Hill wrote: If not, follow Anjo's suggestion of overriding dispatchRequest() and logging out the response before returning it. Jan 28 13:23:08 AM[50121] WARN NSLog - : Exception occurred while handling

Re: Handling Session timeout with ajax

2009-01-27 Thread Paul Hoadley
On 28/01/2009, at 1:40 PM, Chuck Hill wrote: If not, follow Anjo's suggestion of overriding dispatchRequest() and logging out the response before returning it. Jan 28 13:23:08 AM[50121] WARN NSLog - : Exception occurred while handling request: java.lang.NullPointerException Jan 28 13:2

Re: Handling Session timeout with ajax

2009-01-27 Thread Chuck Hill
On Jan 27, 2009, at 6:59 PM, Paul Hoadley wrote: On 28/01/2009, at 10:59 AM, Chuck Hill wrote: On Jan 27, 2009, at 4:18 PM, Paul Hoadley wrote: On 28/01/2009, at 10:08 AM, Chuck Hill wrote: On Jan 26, 2009, at 11:17 PM, Paul Hoadley wrote: On 27/01/2009, at 5:11 PM, Chuck Hill wrote: F

Re: Handling Session timeout with ajax

2009-01-27 Thread Paul Hoadley
On 28/01/2009, at 10:59 AM, Chuck Hill wrote: On Jan 27, 2009, at 4:18 PM, Paul Hoadley wrote: On 28/01/2009, at 10:08 AM, Chuck Hill wrote: On Jan 26, 2009, at 11:17 PM, Paul Hoadley wrote: On 27/01/2009, at 5:11 PM, Chuck Hill wrote: FireBug and FireFox. Take a look at the Net log. Yo

Re: Handling Session timeout with ajax

2009-01-27 Thread Chuck Hill
On Jan 27, 2009, at 4:18 PM, Paul Hoadley wrote: On 28/01/2009, at 10:08 AM, Chuck Hill wrote: On Jan 26, 2009, at 11:17 PM, Paul Hoadley wrote: On 27/01/2009, at 5:11 PM, Chuck Hill wrote: FireBug and FireFox. Take a look at the Net log. You can see all the traffic back and forth. Of

Re: Handling Session timeout with ajax

2009-01-27 Thread Paul Hoadley
On 28/01/2009, at 10:08 AM, Chuck Hill wrote: On Jan 26, 2009, at 11:17 PM, Paul Hoadley wrote: On 27/01/2009, at 5:11 PM, Chuck Hill wrote: FireBug and FireFox. Take a look at the Net log. You can see all the traffic back and forth. Often these things came in an Ajax update and so don

Re: Handling Session timeout with ajax

2009-01-27 Thread Chuck Hill
On Jan 26, 2009, at 11:17 PM, Paul Hoadley wrote: On 27/01/2009, at 5:11 PM, Chuck Hill wrote: FireBug and FireFox. Take a look at the Net log. You can see all the traffic back and forth. Often these things came in an Ajax update and so don't show up in the page source (as originally

Re: Handling Session timeout with ajax

2009-01-27 Thread Anjo Krank
One can also override dispatchRequest() and log (or use the ERXApp logger that already does this) Cheers, Anjo Am 27.01.2009 um 19:22 schrieb Mike Schrag: There is a trick and I am wondering, does anyone remember it? It is hard to search for in archives, google, etc. One can call tcpdump

Re: Handling Session timeout with ajax

2009-01-27 Thread Mike Schrag
There is a trick and I am wondering, does anyone remember it? It is hard to search for in archives, google, etc. One can call tcpdump with a set of options and see just the html of the web communications going back and forth from or to an app. Alternatively, just the HTML and HTTP traffic w

Re: Handling Session timeout with ajax

2009-01-27 Thread Ray Kiddy
On Jan 26, 2009, at 10:41 PM, Chuck Hill wrote: On Jan 26, 2009, at 10:37 PM, Paul Hoadley wrote: I can't find it anywhere. It's not on the page where the exception was generated, and I've pared down AMErrorPage to essentially nothing. I've searched with Safari's Web Inspector whic

Re: Handling Session timeout with ajax

2009-01-27 Thread Paul Hoadley
On 27/01/2009, at 5:11 PM, Chuck Hill wrote: FireBug and FireFox. Take a look at the Net log. You can see all the traffic back and forth. Often these things came in an Ajax update and so don't show up in the page source (as originally loaded). This might be a good time to mention that th

Re: Handling Session timeout with ajax

2009-01-26 Thread Paul Hoadley
On 27/01/2009, at 5:11 PM, Chuck Hill wrote: FireBug and FireFox. Take a look at the Net log. You can see all the traffic back and forth. Often these things came in an Ajax update and so don't show up in the page source (as originally loaded). Look at the response content in FireBug and

Re: Handling Session timeout with ajax

2009-01-26 Thread Chuck Hill
On Jan 26, 2009, at 10:37 PM, Paul Hoadley wrote: On 27/01/2009, at 1:10 PM, Chuck Hill wrote: On Jan 26, 2009, at 5:25 PM, Paul Hoadley wrote: On 27/01/2009, at 7:55 AM, Chuck Hill wrote: Should this also work in Application.handleException()? I've got this: public WOResponse handl

Re: Handling Session timeout with ajax

2009-01-26 Thread Paul Hoadley
On 27/01/2009, at 1:10 PM, Chuck Hill wrote: On Jan 26, 2009, at 5:25 PM, Paul Hoadley wrote: On 27/01/2009, at 7:55 AM, Chuck Hill wrote: Should this also work in Application.handleException()? I've got this: public WOResponse handleException(Exception anException, WOContext aContex

Re: Handling Session timeout with ajax

2009-01-26 Thread Chuck Hill
On Jan 26, 2009, at 5:25 PM, Paul Hoadley wrote: On 27/01/2009, at 7:55 AM, Chuck Hill wrote: Should this also work in Application.handleException()? I've got this: public WOResponse handleException(Exception anException, WOContext aContext) { AMErrorPage errorPage = (AMErrorPage)

Re: Handling Session timeout with ajax

2009-01-26 Thread Paul Hoadley
On 27/01/2009, at 7:55 AM, Chuck Hill wrote: Should this also work in Application.handleException()? I've got this: public WOResponse handleException(Exception anException, WOContext aContext) { AMErrorPage errorPage = (AMErrorPage) pageWithName(AMErrorPage.class

Re: Handling Session timeout with ajax

2009-01-26 Thread Chuck Hill
On Jan 23, 2009, at 7:15 PM, Paul Hoadley wrote: Hi Chuck, On 20/01/2009, at 7:09 AM, Chuck Hill wrote: ... if (AjaxUtils.isAjaxRequest(aContext.request())) { AjaxUtils.redirectTo(errorPage); return errorPage.context().response(); } r

Re: Handling Session timeout with ajax

2009-01-23 Thread Paul Hoadley
Hi Chuck, On 20/01/2009, at 7:09 AM, Chuck Hill wrote: ... if (AjaxUtils.isAjaxRequest(aContext.request())) { AjaxUtils.redirectTo(errorPage); return errorPage.context().response(); } return errorPage.generateResponse(); Should this al

Re: Handling Session timeout with ajax

2009-01-20 Thread Amedeo Mantica
Thank you very much :-) ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/

Re: Handling Session timeout with ajax

2009-01-19 Thread Chuck Hill
On Jan 19, 2009, at 9:17 AM, Amedeo Mantica wrote: Hello, I just noticed that If we got a Session timeout the error page get place inside our AjaxUpdateContainer, can we avoid this and go to a full error page? ... if (AjaxUtils.isAjaxRequest(aContext.request()))

Re: Handling Session timeout with ajax

2009-01-19 Thread Mike Schrag
yeah, you can check if AjaxUtils.isAjaxRequest(..) in your handleSessionRestoration and send a javascript redirect instead ... I think AjaxExample2 shows this. ms On Jan 19, 2009, at 12:17 PM, Amedeo Mantica wrote: Hello, I just noticed that If we got a Session timeout the error page get

Handling Session timeout with ajax

2009-01-19 Thread Amedeo Mantica
Hello, I just noticed that If we got a Session timeout the error page get place inside our AjaxUpdateContainer, can we avoid this and go to a full error page? Thanks Amedeo ___ Do not post admin requests to the list. They will be ignored. Webobject