0

"session" attribute in Composer

asked 2012-07-19 20:27:36 +0800

jj gravatar image jj
638 3

I found out that in the composer methods: doBeforeCompose() and doBeforeComposeChildren() , the "session" member variable is always null. It is not set until doAfterCompose() is called. Any practical reasons that the session is not set earlier? I need to do some preparation work before the component is composed, but it requires access to the session.

Thanks.

-JJ

delete flag offensive retag edit

2 Replies

Sort by ยป oldest newest

answered 2012-07-19 22:05:58 +0800

gekkio gravatar image gekkio flag of Finland
899 1
http://gekkio.fi/blog

You can access the current session with Sessions.getCurrent().

link publish delete flag offensive edit

answered 2012-07-20 17:55:12 +0800

jj gravatar image jj
638 3

Thanks, gekkio. That worked, the session is not null, but I do have another related question, which I will post in a separate thread.

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2012-07-19 20:27:36 +0800

Seen: 118 times

Last updated: Jul 20 '12

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More