• 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: WOApplication and pageRefreshOnBacktrackEnabled
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: WOApplication and pageRefreshOnBacktrackEnabled


  • Subject: Re: WOApplication and pageRefreshOnBacktrackEnabled
  • From: Michael Hast <email@hidden>
  • Date: Fri, 20 Jan 2012 10:51:26 -0700

According to my testing this is not quite true. If set it to false, indeed there are no cache headers returned in the response. In addition to that the action method in my component for the hyperlink is being called. If I use the default setPageRefreshOnBacktrackEnabled(true) setting and remove the cache control headers in the response, when the hyperlink is clicked a second time the action method is not being called. So something else must be going on with that setting in WOApplication.

So how are you handling it? Use this.setPageRefreshOnBacktrackEnabled(false); and then add the cache control headers manually?

Michael.

On 1/19/12 8:39 PM, John Huss wrote:
this.setPageRefreshOnBacktrackEnabled(false);

All this setting actually does is change the response headers like Expires and Cache-Control, etc which browsers use to determine whether a page from the cache can be used instead of contacting the server.  You can set these headers on the response yourself and do it different for each page or action based on your needs.

On Thursday, January 19, 2012, Michael Hast <email@hidden> wrote:
> Hi:
>
> We have an application that has been running for many years. In the application class' constructor we called:
>
> this.setPageRefreshOnBacktrackEnabled(false);
>
> We discovered an issue that caused data loss. The issue was that when a user saved a form and then pressed the browsers refresh button, the form was resubmitted without any form values. Removing the above call in the constructor solved that problem.
>
> But now we have another issue. We have tables that contain WOHyperlinks which open a new window (via target=blank) to display a summary report. The first time the user clicks on the WOHyperlink, the action gets called and everything is fine. The seconds time the user clicks on the WOHyperlink, the action does not get called, but the new window opens and the some report displays fine, other reports throw an exception because the action method did not get called initializing the report right.
>
> What are you guys doing in that instance? Wrap the hyperlink in a AjaxUpdateContainer? Or maybe there is a Wonder property that prevents a form from being submitted twice, but a hyperlink can be clicked twice.
>
> Michael.
> _______________________________________________
> 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

  • Follow-Ups:
    • Re: WOApplication and pageRefreshOnBacktrackEnabled
      • From: Michael Hast <email@hidden>
References: 
 >Re: What wonder branch is what? (From: Patrick Robinson <email@hidden>)
 >Re: What wonder branch is what? (From: Pascal Robert <email@hidden>)
 >Re: What wonder branch is what? (From: Kieran Kelleher <email@hidden>)

  • Prev by Date: Re: clearing the d2w cache?
  • Next by Date: setIncludeEditingContextChanges gotchas?
  • Previous by thread: Re: What wonder branch is what?
  • Next by thread: Re: WOApplication and pageRefreshOnBacktrackEnabled
  • Index(es):
    • Date
    • Thread