Permalink
Browse files

2.10: lift-webkit

  • Loading branch information...
1 parent 5280bc8 commit 37c725685b6f0c7d965ff560935c5158bc57ff9e @nafg nafg committed Jan 6, 2013
@@ -421,7 +421,7 @@ object Menu extends DispatchSnippet {
}
(S.request.flatMap(_.location), S.attr("param"), SiteMap.findAndTestLoc(name)) match {
- case (_, Full(param), Full(loc: ConvertableLoc[T])) => {
+ case (_, Full(param), Full(loc: Loc[T] with ConvertableLoc[T])) => {
(for {
pv <- loc.convert(param)
link <- loc.createLink(pv)
@@ -354,15 +354,16 @@ trait AbstractScreen extends Factory {
* @param default - the default value of the field
* @param stuff - any filter or validation functions
*/
- protected def builder[T](name: => String, default: => T, stuff: FilterOrValidate[T]*)(implicit man: Manifest[T]): FieldBuilder[T] =
+ protected def builder[T](name: => String, default: => T, stuff: FilterOrValidate[T]*)(implicit man: Manifest[T]): FieldBuilder[T] = {
new FieldBuilder[T](name, default, man, Empty,
stuff.toList.collect {
- case AVal(v) => v
+ case AVal(v: (T => List[FieldError])) => v
},
stuff.toList.collect {
case AFilter(v) => v
},
stuff)
+ }
protected object FilterOrValidate {
implicit def promoteFilter[T](f: T => T): FilterOrValidate[T] = AFilter(f)
@@ -611,7 +612,7 @@ trait AbstractScreen extends Factory {
*/
protected def field[T](name: => String, default: => T, stuff: FilterOrValidate[T]*)(implicit man: Manifest[T]): Field {type ValueType = T} =
new FieldBuilder[T](name, default, man, Empty, stuff.toList.flatMap {
- case AVal(v) => List(v)
+ case AVal(v: (T => List[FieldError])) => List(v)
case _ => Nil
}, stuff.toList.flatMap {
case AFilter(v) => List(v)
@@ -756,7 +757,7 @@ trait AbstractScreen extends Factory {
case _ => Nil
}.toList
override val validations = stuff.flatMap {
- case AVal(v) => List(v)
+ case AVal(v: (T => List[FieldError])) => List(v)
case _ => Nil
}.toList
@@ -793,7 +794,7 @@ trait AbstractScreen extends Factory {
case _ => Nil
}.toList
override val validations = stuff.flatMap {
- case AVal(v) => List(v)
+ case AVal(v: (T => List[FieldError])) => List(v)
case _ => Nil
}.toList
@@ -943,7 +944,7 @@ trait AbstractScreen extends Factory {
}
/**
- * Grabs the FormFieldId and FormParam parameters
+ * Grabs the FormFieldId and FormParam parameters
*/
protected def grabParams(in: Seq[FilterOrValidate[_]]):
List[SHtml.ElemAttr] = {
@@ -1482,7 +1483,7 @@ trait LiftScreen extends AbstractScreen with StatefulSnippet with ScreenWizardRe
val localSnapshot = createSnapshot
// val notices = S.getAllNotices
- // if we're not Ajax,
+ // if we're not Ajax,
if (!ajaxForms_?) {
S.seeOther(S.uri, () => {
// S.appendNotices(notices)
@@ -2028,13 +2028,13 @@ trait S extends HasParams with Loggable {
* Returns the unprefixed attribute value as an Option[NodeSeq]
* for easy addition to the attributes
*/
- def ~(key: String): Option[NodeSeq] = apply(key).toOption.map(Text)
+ def ~(key: String): Option[NodeSeq] = apply(key).toOption.map(Text(_))
/**
* Returns the prefixed attribute value as an Option[NodeSeq]
* for easy addition to the attributes
*/
- def ~(prefix: String, key: String): Option[NodeSeq] = apply(prefix, key).toOption.map(Text)
+ def ~(prefix: String, key: String): Option[NodeSeq] = apply(prefix, key).toOption.map(Text(_))
}
/**
@@ -2153,13 +2153,13 @@ trait S extends HasParams with Loggable {
* Returns the unprefixed attribute value as an Option[NodeSeq]
* for easy addition to the attributes
*/
- def ~(key: String): Option[NodeSeq] = apply(key).toOption.map(Text)
+ def ~(key: String): Option[NodeSeq] = apply(key).toOption.map(Text(_))
/**
* Returns the prefixed attribute value as an Option[NodeSeq]
* for easy addition to the attributes
*/
- def ~(prefix: String, key: String): Option[NodeSeq] = apply(prefix, key).toOption.map(Text)
+ def ~(prefix: String, key: String): Option[NodeSeq] = apply(prefix, key).toOption.map(Text(_))
}
/**
@@ -143,7 +143,7 @@ trait XMLApiHelper {
(for (req <- S.request) yield req.path.partPath match {
case _ :: name :: _ => name
case _ => ""
- }).map(Text)
+ }).map(Text(_))
/**
* The method that wraps the outer-most tag around the body. The success,

1 comment on commit 37c7256

Owner

fmpwizard commented on 37c7256 Jan 8, 2013

+1

Please sign in to comment.