[Lift] Re: Is it legal to update a SessionVar in LiftRules.rewrite?

2009-02-08 Thread Alex Boisvert
Ok, makes sense. I'll use a RequestVar instead. thanks! alex On Sat, Feb 7, 2009 at 9:07 PM, David Pollak wrote: > Alex, > The session is not in scope during the rewrite phase, so SessionVars are > not available. This is because the rewrite happens before dispatching > begins and dispatching

[Lift] Re: Is it legal to update a SessionVar in LiftRules.rewrite?

2009-02-07 Thread David Pollak
Alex, The session is not in scope during the rewrite phase, so SessionVars are not available. This is because the rewrite happens before dispatching begins and dispatching can be done to a stateless/sessionless dispatch. However, the default value of a SessionVar is not calculated until the Sessi

[Lift] Re: Is it legal to update a SessionVar in LiftRules.rewrite?

2009-02-07 Thread Alex Boisvert
On Sat, Feb 7, 2009 at 6:59 PM, Alex Boisvert wrote: > object Session { > object foo extends RequestVar[Int](S.param("foo").map(_.toInt) openOr > (1)) > } Sorry, I made a typo here.. it should read: object foo extends SessionVar[Int](S.param("foo").map(_.toInt) openOr (1))