Re: WOApplication and pageRefreshOnBacktrackEnabled
Re: WOApplication and pageRefreshOnBacktrackEnabled
- Subject: Re: WOApplication and pageRefreshOnBacktrackEnabled
- From: Michael Hast <email@hidden>
- Date: Fri, 20 Jan 2012 11:19:44 -0700
Ok, to answer my own question, reading the WO documentation over
again and getting an explanation from here
http://markmail.org/message/f7f3hzjpcpg5fq6y#query:+page:1+mid:6porbbha6ojwa5ut+state:results
I will continue using the default WOApplication behavior which is
setPageRefreshOnBacktrackEnabled(true). Now in my report page I need
to make sure that all the report initialization is done in the
components appendToResponse, rather than in the action method that
led to the page.
Michael.
On 1/20/12 10:51 AM, Michael Hast wrote:
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
|
_______________________________________________
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