Thanks. A fix will be on review board by end of day.
On Mon, Feb 1, 2010 at 8:26 AM, Adam Warski <[email protected]> wrote:
> Hello,
>
> if the value of a MappedTextarea field is null, an NPE is thrown. The
> problem is in the _toForm method. For example in MappedString, the method
> does:
>
> value={is match {case null => "" case s => s.toString}}
>
> while in MappedTextarea, the value is simply {is.toString}, which causes
> the NPE.
> So the fixed version should be, at line 29 of MappedTextarea:
>
> override def _toForm: Box[Elem] = {
> S.fmapFunc({s: List[String] => this.setFromAny(s)}){funcName =>
> Full(<textarea name={funcName}
> rows={textareaRows.toString}
> cols={textareaCols.toString} id={fieldId}>{is match {case null =>
> "" case s => s.toString}}</textarea>)}
> }
>
> --
> Adam Warski
> http://www.warski.org
> http://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 [email protected].
> To unsubscribe from this group, send email to
> [email protected]<liftweb%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/liftweb?hl=en.
>
>
--
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 [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/liftweb?hl=en.