• 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
DirectAction + Session restoration
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: DirectAction + Session restoration
      • From: LD <email@hidden>
References: 
 >WOComponent.hasSession() (From: Kieran Kelleher <email@hidden>)
 >Re: WOComponent.hasSession() (From: Chuck Hill <email@hidden>)

  • Prev by Date: JavaCast wants a speaker on WebObjects
  • Next by Date: Re: JavaCast wants a speaker on WebObjects
  • Previous by thread: Re: WOComponent.hasSession()
  • Next by thread: Re: DirectAction + Session restoration
  • Index(es):
    • Date
    • Thread