setPageRefreshOnBacktrackEnabled problem?
Ondřej Čada <[email protected]> Thu, 26 Apr 2012 15:17:19 +0200
| Newsgroups | gmane.comp.web.webobjects.devel |
|---|---|
| Message-ID | <[email protected]> |
Hello there,
either setPageRefreshOnBacktrackEnabled does not work, or I am missing =
something fundamental.
In my "class Application extends ERXApplication" I do =
"setPageRefreshOnBacktrackEnabled(true)". All the HTTP headers are =
generated all right, far as I can say:
=3D=3D=3D
12 ~P/WebObjects> curl -D - <my app URL>
HTTP/1.1 200 Apple
Date: Thu, 26 Apr 2012 13:05:20 GMT
Server: Apache/2.2.21 (Unix) mod_ssl/2.2.21 OpenSSL/0.9.8r
cache-control: private
cache-control: no-cache
cache-control: no-store
cache-control: must-revalidate
cache-control: max-age=3D0
expires: Sun, 22-Apr-2012 20:37:15 GMT
pragma: no-cache
set-cookie: wosid=3DYCGjnZm0l4GhkbB33k27C0; version=3D"1"; =
path=3D/cgi-bin/WebObjects/CEBOIS.woa
set-cookie: woinst=3D1; version=3D"1"; =
path=3D/cgi-bin/WebObjects/CEBOIS.woa
connection: close
content-length: 5452
MS-Author-Via: DAV
Content-Type: text/html; charset=3DUTF-8
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" =
"http://www.w3.org/TR/html4/loose.dtd">
...
=3D=3D=3D
In my session there is "SomeClass foo".
In one of my pages, there is (essentially) this:
=3D=3D=3D
<wo:if condition=3D$session.foo> OK <wo:str value=3D$session.foo.title/> =
</wo>
<wo:else>
<wo:hyperlink action=3D$selectFoo1>Foo1</wo>
<wo:hyperlink action=3D$selectFoo2>Foo2</wo>
</wo>
=3D=3D=3D
with the actions trivial "WOComponent selectFoo1() { session().foo=3Dfoo1;=
return null; }" and similar with Foo2. (There is also a "select Foo" =
action in the OK part which does session().foo=3Dnull, but that's not =
important here, it works perfectly.)
It works perfectly -- till I use backtrack. With backtrack, it goes all =
wrong :(
1. page is opened, shows "Foo1 Foo2"
2. "Foo1" is clicked, shows correctly the "OK Foo1.title" contents
3. back button is used --> oops, shows again "Foo1 Foo2"!
Here I probably am missing something -- given I have set =
pageRefreshOnBacktrackEnabled=3Dtrue, it should show still OK, since my =
session still contains non-null foo, should it not?
Anyway, seems no part of my application gets activated at this moment; =
not even appendToResponse logs anything.
4. "Foo2" is clicked --> oops, shows again "OK Foo1.title"
whilst none of the selectFoo1/selectFoo2 actions is ever called. =
appendToResponse is called, though.
What am I missing, and, more important, how to fix the problem? I don't =
care whether
(a) back keeps showing the "OK Foo1.title" contents (
(b) back goes to "Foo1 Foo2" AND selection works all right.
I've googled out a trick based on contextID comparation, but that one =
fails with automatic refresh (which it considers to be same as "back") =
:(
Thanks and all the best,
---
Ondra =C4=8Cada
OCSoftware: [email protected] http://www.ocs.cz
private [email protected] http://www.ocs.cz/oc