Re: [Lift] how to keep last submited form field value

2009-12-08 Thread Derek Chen-Becker
I think he might just mean the last submitted value for this particular form instance, in which case you want a RequestVar, not a SessionVar. On Tue, Dec 8, 2009 at 8:22 AM, Alex Boisvert wrote: > You should use a SessionVar or a stateful snippet. > > Here's how you would use a SessionVar, > > ob

Re: [Lift] how to keep last submited form field value

2009-12-08 Thread Alex Boisvert
You should use a SessionVar or a stateful snippet. Here's how you would use a SessionVar, object lastSubmittedDate extends SessionVar[Date](new Date) ... bind(..., "date" -> SHtml.text(lastSubmittedDate.is, lastSubmittedDate(_), "class" -> "datepicker"), ale

[Lift] how to keep last submited form field value

2009-12-08 Thread Jarod Liu
I want the date field keep the last submited value. I tried with below code, but it's dosn't work. The date value(display in page) awalys the date of today. the form: MySnippet: class MySnippet extends StatefulSnippet { val dfmt = new SimpleDateFormat("-MM-dd") var date = d