I also use a session facade on most of my apps, but I don't make it available outside the controllers. if for example a view needs the user object from session the event will broadcast needCurrentUser and a controller will listen for that and get the user from the session facade and place it in the event

-Chris



On 22 Jan 2010, at 01:14, django radonich-camp <[email protected]> wrote:

hey all, in short, I am looking for any suggestions/best practices for
accessing data stored in the session scope and using it in a view
template

to explain the specifics a little more in depth, in this particular
application, we are using a session facade service to access the
session scope.  in the controller layer and beneath, we simply use
coldspring to inject this service wherever its needed.  some of the
objects we are putting in the session scope will need to be accessible
in the viewstate as well though.  to do this, we have been using an On
Request Start listener (and method) to set the session facade service
to the viewstate.  this makes it available, so far, everywhere we've
needed it within the viewstate.

i'm wondering if folks out there have any other preferred methods or
better ideas?  or even feedback on the approach we are using?  i've
also seen a suggestion to make the session facade service available
via the application.cfc, but have not tried that route.

thanks.

django

--
Model-Glue Sites:
Home Page: http://www.model-glue.com
Documentation: http://docs.model-glue.com
Bug Tracker: http://bugs.model-glue.com
Blog: http://www.model-glue.com/blog

You received this message because you are subscribed to the Google
Groups "model-glue" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/model-glue?hl=en

--
Model-Glue Sites:
Home Page: http://www.model-glue.com
Documentation: http://docs.model-glue.com
Bug Tracker: http://bugs.model-glue.com
Blog: http://www.model-glue.com/blog

You received this message because you are subscribed to the Google
Groups "model-glue" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/model-glue?hl=en

Reply via email to