Thanks for replying, I tried my best to understand what i should do, but im afraid i cant follow you. I never used ApplicationStateManager directly and i dont know where to find an example. Also i don't know where the lines you posted should be added.
What i started from is something like <contribution configuration-id="tapestry.state.ApplicationObjects"> <state-object name="sessionInfo" scope="session"> <create-instance class="mypackage.SessionInfo"/> </state-object> </contribution> I can access this via getSessionInfo inside a page, as i said: but not in another class. Do you mean that i should create a new service that returns this object? Paolo Igor Drobiazko wrote: > > Hi, > > you can inject the ApplicationStateManager in your DAO and access your ASO > by using it. > > http://tapestry.apache.org/tapestry4.1/apidocs/org/apache/tapestry/engine/state/ApplicationStateManager.html > http://tapestry.apache.org/tapestry4.1/tapestry-framework/hivedoc/service/tapestry.state.ApplicationStateManager.html > > Just add a field and the following line into your service construction: > > <set-service property="applicationStateManager" > service-id="tapestry.state. > ApplicationStateManager"/> > </construct> > > On 7/5/07, Paolo Scopa <[EMAIL PROTECTED]> wrote: >> >> >> Hi experts, >> I have a bit of troule storing/retrieving info in the session. >> >> I followed the eshop example, adding a contribution in hivemind module to >> store the user name in the session. >> I want my dao to store this information every time that an object is >> updated >> in the database (the user who last changed the object). >> >> However I can't find a way to access the session from my dao, because to >> use >> @injectState I must make my dao abstract (and obviously it cant be). >> So it looks like I can access the session info only from a BasePage, >> which >> is actually abstract. >> >> My question is: do I really have to retrieve that information in the Page >> and pass it around to the service, then to the dao to store it? Is there >> no >> way to access it directly from the dao? >> The main reason is that i wanted to include to a BaseDao class, so all my >> daos will do the same thing while saving. >> >> Any ideas? >> Thanks >> Paolo >> >> -- >> View this message in context: >> http://www.nabble.com/4.1.1-Session-issue-tf4028256.html#a11442438 >> Sent from the Tapestry - User mailing list archive at Nabble.com. >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > -- View this message in context: http://www.nabble.com/4.1.1-Session-issue-tf4028256.html#a11446435 Sent from the Tapestry - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]