RE: invoking session with Direct Action

"Tsang, Victor YF" <[email protected]>
Newsgroups gmane.comp.web.webobjects.devel
Message-ID <87567B21B6BC0B4FA91671B4C13A43E54316DC@HKPCWM01.corphq.hk.pccw.com>
WOComponent class only provides WOcomponent.session() method. Is this your
getSession() method's problem?

Regards,

Victor Tsang
IT&T Solution Development 
PCCW 電訊盈科
[email protected]
[email protected]




> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]]On Behalf Of 
> Yamuna Vallipuram
> Sent: Wednesday, July 26, 2006 7:41 PM
> To: [email protected]
> Cc: yamuna Vallipuram
> Subject: invoking session with Direct Action
> 
> 
> Hi....
> 
> I am still struggling with accessing Session information in  
> DirectAction. The Session information seem to disappear in Direct  
> Action class.
> 
>   public WOActionResults personimport1Action() {
>      	if ( getSessionIDForRequest(request()) != null &&  
> existingSession() != null ) {
>      		System.out.println("session found");
>      		System.out.println(getSession().valgtBrukerInstitusjon);
>      		PersonImport1 nesteSide = (PersonImport1) pageWithName 
> ("PersonImport1");
>      		return nesteSide;
>      	 } else {
>      		 System.out.println("no session");
>      		 Main nesteSide = (Main) pageWithName("Main");
>      		 return nesteSide;
>      	 }
>      }
> 
> The WO Component page (PersonImport1) is opened, but
> System.out.println(getSession().valgtBrukerInstitusjon) 
> returns null,  
> but up to this point it returns the correct value.
> ( getSessionIDForRequest(request()) != null && existingSession() !=  
> null ) seems to return true.
> 
> So I gather there is a session, but probably a new one???
> 
> Can anybody explain what I am doing wrong here??
> cheers Yamuna
> _______________________________________________
> WebObjects-dev mailing list
> [email protected]
> http://www.omnigroup.com/mailman/listinfo/webobjects-dev
>

_______________________________________________
WebObjects-dev mailing list
[email protected]
http://www.omnigroup.com/mailman/listinfo/webobjects-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.