[Lift] Re: RequestVar not Persisting

2009-09-04 Thread Kris Nuttycombe
While your updated list will be modified by the loadUsers closure, the for comprehension will only be executed on the initial rendering of the snippet, not as part of the execution of your loadUsers or processUsers callbacks. So the state of the RequestVar will never be reset. Kris On Fri,

[Lift] Re: RequestVar not Persisting

2009-09-04 Thread David Pollak
On Fri, Sep 4, 2009 at 1:01 PM, Peter Robinett pe...@bubblefoundry.comwrote: I'm trying to use a RequestVar to keep the Mapper model that I'm editing throughout the lifetime of a simple form. Specifically, I'm adding Users to a Role. The problem is, the RequestVar seems to get recreated at

[Lift] Re: RequestVar not Persisting

2009-09-04 Thread Peter Robinett
Thanks guys, I knew I was missing something simple. So how do I then do I make it so I have the Role id at the end of the form submission process? Thanks, Peter On Sep 4, 2:58 pm, Kris Nuttycombe kris.nuttyco...@gmail.com wrote: While your updated list will be modified by the loadUsers

[Lift] Re: RequestVar not Persisting

2009-09-04 Thread Peter Robinett
Ok, it was quite easy once I thought about it some more. For anyone who comes along this later, here is my solution: def addUsers(xhtml: NodeSeq): NodeSeq = { val possible = User.findAll().map(user = (user.id.toString, user.name)) val current = role.users.map(user = user.id.toString)