[Lift] Re: Mapper record deletion

2009-06-16 Thread Magnus Alvestad
> As I move deeper into learning Lift, I now want to start deleting > Mapper records in the ToDo example. Here's how I did it (based on suggestions in this group, I think): bind ( "question", html, "text" -> .., "delete" -> ajaxButton(Text("Remove"), Call("dialog", Str("Do you want to

[Lift] More compact validation

2009-06-09 Thread Magnus Alvestad
Hi. In my lift application using Mapper, I'm doing this all the time: object name extends MappedPoliteString(this, 16) { override def validations = Validate.notEmpty(this) _ :: super.validations } where Validate is defined: object Validate { val valid = List[FieldError]() def notEmpty(fi

[Lift] Re: Alternating row colors

2009-05-11 Thread Magnus Alvestad
To elaborate, I added a $(document).ready function to handle this. However! Some other pages have ajax functionality. When they update html in the page, this html (and the page) will not be 'reprocessed' by JQuery. Can I handle this in a generic manner? -Magnus On May 11, 5:09 

[Lift] Re: Alternating row colors

2009-05-11 Thread Magnus Alvestad
Ah! Based on Viktors suggestions and some more info at: http://15daysofjquery.com/examples/zebra/ I was able to write this in a couple of lines of JQuery! -Magnus --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "L

[Lift] Re: Alternating row colors

2009-05-11 Thread Magnus Alvestad
Thank you for your answers. I'll try to include some more detail because I was not able to apply your suggestions to my code. My template has a section like this: while my snippet looks more or less like this: class T { val questions = "One" :: "Two" :: "Three" :: N

[Lift] Alternating row colors

2009-05-11 Thread Magnus Alvestad
I'm still learning lift (and scala). For my sample application I want to display a table with alternating row colors. I want to put the style in my CSS file and add a classname to every TR in my table to indicate odd and even rows. However, I don't know how to take a value from the snippet binding