[prev in list] [next in list] [prev in thread] [next in thread] 

List:       tapestry-user
Subject:    Re: Accessing a Session from a Service?
From:       "Martin Strand" <martin.strand () entcap ! se>
Date:       2006-03-30 16:13:48
Message-ID: op.s68h1ad6yku7ip () mihnpc ! ad ! arelion ! se
[Download RAW message or body]

This should be helpful:
http://www.mail-archive.com/tapestry-user@jakarta.apache.org/msg12250.html

I'm not sure, but I believe this approach instantiates the ASO even if it's not used \
(unlike @InjectState).

Martin

On Wed, 29 Mar 2006 18:43:41 +0200, Stanczak Group <justin@stanczakgroup.com> wrote:

> I have a IEngineService that I've created and I'd like to access the
> login session session to check permissions. How do I do this?
> 
> I have to following config in hivemodule.xml.
> 
> This is the service I want to inject the session state object
> login_session into:
> 
> <service-point id="fileDownloadService"
> interface="org.apache.tapestry.engine.IEngineService">
> <invoke-factory>
> <construct class="com.collegevitae.vitae.FileDownloadService">
> <set-object property="response"
> value="infrastructure:response"/>
> <set-object property="linkFactory"
> value="infrastructure:linkFactory"/>
> <set-object property="loginSession"
> value="app-property:login_session"/>## This was what I added, but
> returns null object.
> </construct>
> </invoke-factory>
> </service-point>
> 
> 
> This is what I want access to for that users session:
> 
> <contribution configuration-id="tapestry.state.ApplicationObjects">
> <state-object name="login_session" scope="session">
> <create-instance class="com.collegevitae.LoginSession"/>
> </state-object>
> </contribution>
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic