In order to inject a property into an ASO, you need to implement a custom org.apache.tapestry.engine.state.StateObjectFactory. (There are numerous post in the archive on this.)
The following in the wiki has an example. http://wiki.apache.org/tapestry/InjectPropertyIntoASO The above example does not do exactly what you wanted. But it is a start. HTH Shing --- Cyrille37 <[EMAIL PROTECTED]> wrote: > Hi, > > I know I'm noisy on this list with my beginner's > questions. Sorry for > that, but it is not so easy to swallow all > Tapestry's stuff. > by the way, here is my new question: > > I would like to add a Session object. This config > wroks nice. > <contribution > configuration-id="tapestry.state.ApplicationObjects"> > <state-object name="hangmanStateObject" > scope="session" > > <create-instance > class="games.hangman.service.Hangman" /> > </state-object> > </contribution> > Now I would like to pass a parameter or set a > property to that object > (like i use to do with Spring). > In the object's class > (games.hangman.service.Hangman) I would like to > inject the ServletContext. > With Annotation I could do like : > > @InjectObject("service:tapestry.globals.ServletContext") > public abstract ServletContext > getServletContext(); > But I do not want to use Annotation. > > so I would like to add this ServletContext in the > previous > state-object/create-instance definition. I'd a look > at documentation > (http://hivemind.apache.org/descriptor.html) but I > did not find the > right way. > > Thanks for your help. > cyrille > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > Home page : http://uk.geocities.com/matmsh/index.html Send instant messages to your online friends http://uk.messenger.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]