On Fri, 16 Sep 2011 17:14:58 -0300, Dimitri <dimitri.cano...@gmail.com> wrote:

Hi all,

Hi!

I m using the new PageRenderLinkTransformer thing, very helpful but, in the decodePageRenderRequest i would like to set up some things for others pages. I can do it either by injecting page and call the appropriate methods one
those, or use a session state object.

You could also set data in a per thread service and make your pages use it to read this data, avoiding using the session for something that is just for a request. That's what I'd do.

Unfortunately, the SessionState object does always result as null in the
next pages.
Injected pages are not injected as well, and throw NPE when calling the
appropriate method on those.

@SessionState only works in pages, component and mixin classes. To read or set session state objects in other classes, use the ApplicationStateManager service.

Looks like i have to use the context, yes, that is why the EventContext
stands for, but i don't understand why such a mechanism

Are you asking why the page event context exists?

and why i can't use SessionState

You can, but there are better alternatives.

or page injection.

I'm not following you.

--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to