DirectAction + Session restoration
DirectAction + Session restoration
- Subject: DirectAction + Session restoration
- From: Gavin Eadie <email@hidden>
- Date: Tue, 30 Aug 2005 23:06:54 -0400
It's not quite the same as a recent thread related to DirectActions
and Sessions, but in researching a behavior I didn't understand, I
seem to have hit on an anomaly. OR, I've hit on my ignorance, again.
This arose when a colleague and I were each using the same logout
action from a framework -- mine worked, his didn't; mine was
triggered by a text hyperlink, his by an image.
Demonstration:
Make a new application from the basic WebObjects application
template. On the Main page put a WOHyperink and a WOActiveImage ...
bind them both to the same DirectAction method, say "test" for
example. In the testAction method log the values of expiredSession()
and session(), in that order:
public WOActionResults testAction() {
NSLog.out.appendln(existingSession());
NSLog.out.appendln(session());
return pageWithName("Main");
}
Fire up the application and click on the hyperlink:
expiredSession() returns the session [and so does session(), obviously]
Click on the active image:
expiredSession() returns null, and session() makes a fresh session
The "WebObjects Dynamic Elements Reference" describes the purpose of
these bindings of these two elements as identical, the words are
different, the meaning is the same.
The generated HTML has exactly the same href= in the anchor for both:
href="/cgi-bin/WebObjects/DASessionTest.woa/wa/test?wosid=5Ncc[...]H5M"
Why do they behave differently?
_______________________________________________
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