Hi Marius, I am using version 2.0-M1. Now it works. This topic could be considered closed for me. Thanks to all for your replies. Regards, wibble.
On Feb 6, 6:32 pm, Marius <marius.dan...@gmail.com> wrote: > What Lift version are you using? > > If you are using an Ajax form <lift:msgs showAll=true/> did not show > the messages associated with ID's ... messages coming from FieldError. > This is a defect I fixed about a week ago. Please use the latest lift > build. > > If you just want to render all messages (regardles if they are > associated with ID's or not) in one place <lift:msgs showAll=true/> > should be fine. But typically for field related message you could use > <lift:msg id="field_id"/> which would render only messages associated > with "field_id" id. As a side note <lift:msgs/> only render messages > that are not associated with any ID. > > Br's, > Marius > > On Feb 6, 3:51 pm, wibblecp <wibbl...@gmail.com> wrote: > > > > > hi Adam, > > > thank you. It is exactly what I done > > > def validateAndSave (): Unit = currentEntry.validate match { > > case Nil => currentEntry.save ; S.notice(currentEntry.title + " > > SAVED!") > > case x => { x map { (e:FieldError) => S.error(e.msg) } } > > } > > > have a nice day. > > wibble > > > On Feb 6, 2:35 pm, Adam Warski <a...@warski.org> wrote: > > > > Hello, > > > > are you submitting the form with ajax? > > > If so, see this thread: > > > >http://groups.google.com/group/liftweb/browse_thread/thread/e25d86a24... > > > > In short, check if doing: > > > > xs.map {i => S.error(i.msg) }; > > > > instead of: > > > > S.error(xs); > > > > works. > > > > > Hi Jeppe, > > > > <lift:Msgs showAll="true"> does not work. Always the same result. > > > > > If the form does not contain errors the data are saved well and the > > > > browser display S.notice("saved") correctly. > > > > The S.error method returns a List[FieldError]. I receive a List with > > > > the format of List(Full(tablename_field) : message) > > > > > this is a field of my database class: > > > > [code] > > > > object description extends MappedTextarea(this, 255) { > > > > override def displayName = "Description" > > > > override def validations = valMinLen(1, S.??("description must > > > > not be empty")) _ :: super.validations > > > > } > > > > > [/code] > > > > > thanks, > > > > wibble > > > > > On Feb 6, 12:19 pm, Jeppe Nejsum Madsen <je...@ingolfs.dk> wrote: > > > >> wibblecp <wibbl...@gmail.com> writes: > > > >>> it does not work even in the case of a single error on the form. > > > > >>> the result is always a List(Full(entries_code) : Description must not > > > >>> be empty) > > > > >> Try adding showAll: > > > > >> <lift:Msgs showAll="true"> > > > > >> But default, Msgs doesnøt show field-level errors > > > > >> /Jeppe > > > > > -- > > > > 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 > > > > athttp://groups.google.com/group/liftweb?hl=en. > > > > -- > > > Adam Warskihttp://www.warski.orghttp://www.softwaremill.eu -- 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.