The only issue I would mention is that there's currently an open ticket because MappedDateTime won't save the time portion when you use Derby. I haven't had time to triage this yet.
Derek On Wed, Jun 3, 2009 at 3:01 AM, Timothy Perrett <timo...@getintheloop.eu>wrote: > > Greg, > > I dont really use toForm; have you explored "doing it manually"? It > seems like that would be able to tell you if there is a problem with > toForm on MappedDateTime. > > I use mapped date time quite a bit and have no problems at all > persisting the dates :-) > > Cheers, Tim > > On Jun 3, 3:09 am, g-man <gregor...@gmail.com> wrote: > > Are there no ideas for my problem? > > > > I have many more questions saved up, but would like to clear each out > > before starting a new one. > > > > Thanks again! > > > > On May 31, 1:57 pm, g-man <gregor...@gmail.com> wrote: > > > > > > > > > As I proceed to enhance the ToDo example, I have added a new field to > > > the ToDo.scala model: > > > > > object dueOn extends MappedDateTime(this) { > > > final val dateFormat = DateFormat.getDateInstance > > > (DateFormat.SHORT) > > > override def asHtml = Text(dateFormat.format(is))} > > > > > Next, I added a binding in the TD.scala snippet within the add method > > > of the TD class: > > > > > def doBind(form: NodeSeq) = { > > > bind("todo", form, "desc" -> todo.desc.toForm, > > > "priority" -> todo.priority.toForm, > > > "dueOn" -> todo.dueOn.toForm, > > > "submit" -> submit("create new Task", > > > checkAndSave)} > > > > > Then, the todo.html template gets a bind point: > > > > > <lift:TD.add form="post"> > > > ... > > > <todo:dueOn/> > > > <todo:submit><button/></todo:submit> > > > </lift:TD.add> > > > > > When I check the database, the record does save, and all the other > > > fields are OK, but the date itself is <null>. > > > > > Somehow, it seems the text of the input field is not getting changed > > > into a Date object for the database to handle, right? > > > > > When I look at the PocketChange app from the book, everything is done > > > completely differently from the ToDo example (no use of _toForm, for > > > instance). > > > > > I know dates and times are convoluted in Java, so what am I missing? > > > > > Thanks! > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~----------~----~----~----~------~----~------~--~---