val inputFields = List("display-name", "email", "home-page")
val transforms = inputFields map (field => ("id=" + field) #>
SHtml.onSubmit(formData += field -> _))
transforms reduceLeft (_ & _)
I get a compile error: "type mismatch; found :
net.liftweb.util.CssBindFunc required: net.liftweb.util.CssBind". So
far, the only work around I've found is forgetting back to the level
of NodeSeq => NodeSeq, and using "andThen" instead of "&". Am I
missing some magic implicit transformation that would make this work?
val inputFields = List("display-name", "email", "home-page")
val transforms: List[NodeSeq => NodeSeq] = inputFields map (field =>
("id=" + field) #> SHtml.onSubmit(formData += field -> _))
transforms reduceLeft (_ andThen _)
thanks,
Scott Morrison
I'm having trouble using the & operation on CssBind. When I write:
val inputFields = List("display-name", "email", "home-page")
val transforms = inputFields map (field => ("id=" + field) #>
SHtml.onSubmit(formData += field -> _))
transforms reduceLeft (_ & _)
I get a compile error: "type mismatch; found :
net.liftweb.util.CssBindFunc required: net.liftweb.util.CssBind". So
far, the only work around I've found is forgetting back to the level
of NodeSeq => NodeSeq, and using "andThen" instead of "&". Am I
missing some magic implicit transformation that would make this work?
val inputFields = List("display-name", "email", "home-page")
val transforms: List[NodeSeq => NodeSeq] = inputFields map (field =>
("id=" + field) #> SHtml.onSubmit(formData += field -> _))
transforms reduceLeft (_ andThen _)
thanks,
Scott Morrison
--
You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to lif...@googlegroups.com.
To unsubscribe from this group, send email to liftweb+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
transforms.reduceLeft[CssBind](_ & _) <--- Does it work?
I tried it, but still getting the same error message that says "type
mismatch; found : net.liftweb.util.CssBindFunc required:
net.liftweb.util.CssBind".