S.error(NodeSeq) and S.error(List[FieldError]) differ in that the  
latter registers errors against particular fields, and the former is a  
page-wide error. The latter is more like S.error(String, NodeSeq). Do  
you have Msg snippets for each field, like this?

... field ... <lift:msg id="my_field_id" />

(see net.liftweb.builtin.snippet.Msg for a better example)

Hope that helps,
-Ross

On Jan 4, 2010, at 3:10 PM, Adam Warski wrote:

> Hello,
>
> investigating further making the tutorial form submittable with  
> ajax, I found some weird behavior; I'm using 1.1-M8.
>
> It seems that when the form is submitted with ajax, and there are  
> form validation errors, the error is not shown. However, the notices  
> work fine. So:
> - S.notice("Added "+todo.desc); shows the notice after the ajax form  
> submit
> - S.error(xs); doesn't, only if the form is submitted in the regular  
> way
>
> I didn't manage to find the problem yet, but if instead of calling  
> S.error(xs); I do:
> xs.map {i => S.error(i.msg) };
> the error is shown.
>
> The error(n: NodeSeq)  and error(vi: List[FieldError]) don't seem to  
> differ a lot, but there must be something special about the second.
>
> I tried to reproduce the problem using a simple application, but  
> there I found  another strange thing.
> The app is:
>
> object Test {
>  def main(args: Array[String]) {
>    val z = new ListBuffer[String]
>    object x extends RequestVar(z)
>    x += "a"
>
>    object y extends RequestVar(new ListBuffer[String])
>    y += "b"
>
>    println(x.is)
>    println(y.is)
>  }
> }
>
> and prints out:
> ListBuffer(a)
> ListBuffer()
>
> so for some reason, if the initial value of the RequestVar is passed  
> without an intermediate val, the list content isn't modified.
> But it could be that I'm using the RequestVar outside of it's  
> intended environment which may be the cause ;).
>
> -- 
> Adam
>
> --
>
> 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 
> .
>
>

--

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.


Reply via email to