Re: [Lift] Re: Enumeration.Value versus Enumeration#Value
Have you tried forcing the type parameters in your MappedEnum declaration ? Like this: object state extends MappedEnum[Address, States.type](this, States) On Thu, Feb 11, 2010 at 6:30 AM, edgarchan edgarchancarri...@gmail.comwrote: and it seems we are getting the type and not the value try Full(States(address.state.toInt)) On Feb 10, 7:32 pm, Strom strommo...@gmail.com wrote: What's the difference between Enumeration.Value and Enumeration#Value? I'm getting a type mismatch error: [INFO] found : com.test.States#Value [INFO] required: com.test.States.Value When trying to set the Enumeration via a form. Basically, I have a mapper object, Address, that has a MappedEnum(this, States) where States is my defined enumeration of US states. The form method is: state - SHtml.selectObj[States.Value]( States.elements.toList.map(v = (v,v.toString)), Full(address.state) /*seems to default to first value in enum if unassigned*/, selected = address.state(selected)) Thanks, Strom -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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.
[Lift] Re: does AutoComplete work ?
Sure. http://github.com/dpp/liftweb/issues/#issue/193 On Sat, Nov 14, 2009 at 3:34 PM, David Pollak feeder.of.the.be...@gmail.com wrote: It's a known issue (although there's no ticket for it... care to open a ticket at http://github.com/dpp/liftweb/issues ) On Wed, Nov 11, 2009 at 2:57 AM, Christophe Dehlinger christophedehlin...@gmail.com wrote: Hi, does AutoComplete work ? I tried running the lift-example from snapshot on a local server, autocompletion isn't happening on the AJAX Samples page. The rest of the Ajax stuff works fine. AC does work on http://demo.liftweb.net/ajax though, so the problem doesn't seem to be browser-related. I also tried overriding autocomplete_? in a MappedEnum in 1.1-M7. I did get a text field instead of a combo, but no autocompletion. -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Surf the harmonics --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[Lift] does AutoComplete work ?
Hi, does AutoComplete work ? I tried running the lift-example from snapshot on a local server, autocompletion isn't happening on the AJAX Samples page. The rest of the Ajax stuff works fine. AC does work on http://demo.liftweb.net/ajax though, so the problem doesn't seem to be browser-related. I also tried overriding autocomplete_? in a MappedEnum in 1.1-M7. I did get a text field instead of a combo, but no autocompletion. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[Lift] lift-json serialization primitive types
Hi, Is there a way to configure lift-json's case class serialization so that it uses Joda DateTimes instead of java.util.Date ? I'd like to known how to make the simple following code work as expected: import net.liftweb.json._ import org.joda.time._ case class MyCaseClass(dt: DateTime) object TestMain { def main(args: Array[String]) { implicit val formats = DefaultFormats println(Serialization.read[MyCaseClass]({ dt : 2009-10-25T12:50:37.560+01:00 })) println(Serialization.write(MyCaseClass(new DateTime))) } } (running this code yields: MyCaseClass(2009-10-25T12:57:03.366+01:00) -- current date when the program was run, not the date in the code {} ) More generally, is there a way to customize lift-json's serialization mappings, in particular the types lift-json sees as primitive ? The class I'm actually interested in serializing has many fields whose type is a non-case class MyRichFloat with a single Float field. It would be really nice if I could (de)serialize these into JSON floats. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---