object Util
Provides a number of methods that make complex Mapper-based view snippets easier to build.
- Alphabetic
- By Inheritance
- Util
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
bindFields[T <: Mapper[T]](mapper: T, nsfn: (MappedField[_, T]) ⇒ NodeSeq): (NodeSeq) ⇒ NodeSeq
Binds all nodes whose names are names of fields on the specified mapper.
Binds all nodes whose names are names of fields on the specified mapper. This makes it unnecessary to write repetitious bindings like "field1" -> field1.toForm, "field2" -> field2.toform Instead it automates such bindings but you have to pass it a function that will generate a NodeSeq from the field, e.g., (f: MappedField[_,_]) => f.toForm Usage: Pass as a Full Box to the bind overload that takes a nodeFailureXform argument.
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
- def eachField[T <: Mapper[T]](mapper: T, fn: (MappedField[_, T]) ⇒ CssSel): (NodeSeq) ⇒ NodeSeq
-
def
eachField[T <: Mapper[T]](mapper: T, fn: (MappedField[_, T]) ⇒ CssSel, filter: (MappedField[_, T]) ⇒ Boolean): (NodeSeq) ⇒ NodeSeq
Iterates over the fields of the specified mapper.
Iterates over the fields of the specified mapper. If the node currently being processed by bind has an attribute "fields" then it is taken as a whitespace-delimited list of fields to iterate over; otherwise all form fields are used. The specified function returns a BindParam for doing processing specific to that field. Returns a bind function (NodeSeq=>NodeSeq) that can be used to bind an xml node that should be repeated for each field. Usage: if you want to repeat xml markup for each field, the view should use the "field:" prefix for field-specific nodes. The snippet should bind the containing (repeating) node to the function returned by this method, passing this method the mapper instance whose fields should be used and a function that returns BindParams to process the "field:" prefixed nodes. This method takes an additional filter function to restrict certain fields from being displayed. There is an overload without it too.
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )