net.liftweb.util.BindPlus

object BindPlus

object BindPlus

 extends ScalaObject




Source: BindPlus.scala(24)

Nested Classes

BindableNodeSeq,

 Constructors

def this

 Methods

!=.. final def !=(arg0 : Any) Boolean Any
!=.. final def !=(arg0 : Object) Boolean AnyRef
==.. final def ==(arg0 : Object) Boolean AnyRef
==.. final def ==(arg0 : Any) Boolean Any
asInstanceOf.. final def asInstanceOf[T0] T0 Any
bindSwitch.. def bindSwitch(prefix : String, xml : NodeSeq, choices : Seq[String])(choice : (Int, (NodeSeq) => NodeSeq))
Allows one to have parts of the view that are alternatives to each other [details]
For example:
      bindSwitch("prefix", xhtml, List("concise","detailed")) {
        if(isInDetailedMode)
          1 -> {(xhtml: NodeSeq) => detailedBind(xhtml) }
        else
          0 -> {(xhtml: NodeSeq) => conciseBind(xhtml) }
      }
    
Note that the final parameter is not a function returning a tuple but an actual tuple. In this example, curly braces denote an expression that evaluates to the tuple which is then passed to bindSwitch. You can then include in the view <prefix:concise> and lt;prefix:detailed> and only one will be displayed and bound, while the other one will not be outputted. Note that this method is also available with the chaining syntax. See nodeSeqToBindable.
param
choice - A Pair/Tuple2 containing the index in the Seq[String] to use, and a NodeSeq=>NodeSeq to process that element.
xml - The xml markup containing the alternate view elements
choices - A Seq[String] of the labels of the elements that are alternatives to each other
prefix - The xml prefix of the elements that are alternatives to each other
NodeSeq
clone.. protected def clone Object AnyRef
eq.. final def eq(arg0 : Object) Boolean AnyRef
equals.. def equals(arg0 : Any) Boolean AnyRef
finalize.. protected def finalize Unit AnyRef
getClass.. final def getClass Class[Any] AnyRef
hashCode.. def hashCode Int AnyRef
isInstanceOf.. final def isInstanceOf[T0] Boolean Any
ne.. final def ne(arg0 : Object) Boolean AnyRef
nodeSeqToBindable.. implicit def nodeSeqToBindable(ns : NodeSeq)
Can be used to support a bind-chaining syntax, for use with multiple prefixes [details]
For example:
    xhtml.bind("prefix1",
      bindParam1,
      bindParam2
    ).bind("prefix2",
      bindParam1,
      bindParam2
    )
Where bindParam can be the usual arrow -> syntax or any BindParam. Can also be used with the bind overload that takes nodeFailureXform and paramFailureXform arguments, and with bindSwitch. Just import this method, or Util._
BindableNodeSeq
notify.. final def notify Unit AnyRef
notifyAll.. final def notifyAll Unit AnyRef
synchronized.. final def synchronized[T0](arg0 : T0) T0 AnyRef
toString.. def toString String AnyRef
wait.. final def wait Unit AnyRef
wait.. final def wait(arg0 : Long) Unit AnyRef
wait.. final def wait(arg0 : Long, arg1 : Int) Unit AnyRef
Copyright (c) 2006-2010 WorldWide Conferencing, LLC. All Rights Reserved.