| OVERVIEW | PACKAGE | CONSTR | FIELDS | METHODS | FRAMES NO FRAMES | INHERITED |
object BindHelpers
extends
BindHelpers
bind("hello", xml,
"someNode" -> {node: NodeSeq => })
In function-body you can safely use BindHelpers methods to obtain correctly-scoped information.
def this
|
| attr.. |
object attr
Helpers for obtaining attributes of the current Elem
|
|
|
| bindNodes.. |
def bindNodes
A list of NodeSeq that preceeds the NodeSeq passed to bind
[details]
The head of the list
is the most recent NodeSeq. This returns Empty if it is called outside its context,
or Full(Nil) if there are no child nodes but the function is called within the
appropriate context.
|
Box[List[NodeSeq]] | |
| currentNode.. |
def currentNode
A Box containing the current Elem, the children of which are passed to the bindParam
|
Box[Elem] |
| !=.. |
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 |
| bind.. |
def bind(namespace : String, nodeFailureXform : Box[(NodeSeq) => NodeSeq], paramFailureXform : Box[(PrefixedAttribute) => MetaData], xml : NodeSeq, params : BindParam*)
Bind a set of values to parameters and attributes in a block of XML
with defined transforms for unbound elements within the specified
namespace
[details]
For example:
bind("user",
Full(xhtml: NodeSeq => Text("Default Value")),
Empty,
will return Default Value
|
NodeSeq | BindHelpers |
| bind.. |
def bind(vals : Map[String, NodeSeq], xml : NodeSeq)
Replace the content of lift:bind nodes with the corresponding nodes found in a map,
according to the value of the "name" attribute
[details]
Usage:
bind(Map("a" -> ),
|
NodeSeq | BindHelpers |
| bind.. |
def bind(namespace : String, xml : NodeSeq, params : BindParam*)
Bind a set of values to parameters and attributes in a block of XML
[details]
For example:
bind("user",
will return
|
NodeSeq | BindHelpers |
| bind.. |
def bind(namespace : String, nodeFailureXform : Box[(NodeSeq) => NodeSeq], paramFailureXform : Box[(PrefixedAttribute) => MetaData], preserveScope : Boolean, xml : NodeSeq, params : BindParam*)
Bind a set of values to parameters and attributes in a block of XML
with defined transforms for unbound elements within the specified
namespace
[details]
For example:
bind("user",
Full(xhtml: NodeSeq => Text("Default Value")),
Empty,
will return Default Value
|
NodeSeq | BindHelpers |
| bindlist.. |
def bindlist(listvals : List[Map[String, NodeSeq]], xml : NodeSeq)
Bind a list of name/xml maps to a block of XML containing lift:bind nodes (see the bind(Map, NodeSeq) function)
[details]
|
Box[NodeSeq] | BindHelpers |
| chooseTemplate.. |
def chooseTemplate(prefix : String, tag : String, xhtml : NodeSeq)
Finds and returns one of many templates from the children based
upon the namespace and tag name: for example, for prefix "choose"
and tag name "stuff" this would return the contents of the
first tag
<choose:stuff>
[details]
|
NodeSeq | BindHelpers |
| 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 |
| findNode.. |
def findNode(in : Elem, nodes : NodeSeq)
Finds and returns the first node in the specified NodeSeq and its children
with the same label and prefix as the specified element
|
Box[Elem] | BindHelpers |
| getClass.. |
final def getClass
|
Class[Any] | AnyRef |
| hashCode.. |
def hashCode
|
Int | AnyRef |
| isInstanceOf.. |
final def isInstanceOf[T0]
|
Boolean | Any |
| mixinAttributes.. |
def mixinAttributes(out : Elem)(in : NodeSeq)
Takes attributes from the first node of 'in' (if any) and mixes
them into 'out'
[details]
Curried form can be used to produce a
NodeSeq => NodeSeq for bind.
|
NodeSeq | BindHelpers |
| ne.. |
final def ne(arg0 : Object)
|
Boolean | AnyRef |
| notify.. |
final def notify
|
Unit | AnyRef |
| notifyAll.. |
final def notifyAll
|
Unit | AnyRef |
| processBind.. |
def processBind(around : NodeSeq, atWhat : Map[String, NodeSeq])
Bind parameters to XML
[details]
|
NodeSeq | BindHelpers |
| strToBPAssoc.. |
implicit def strToBPAssoc(in : String)
transforms a String to a BindParamAssoc object which can be associated to a BindParam object
using the --> operator
[details]
Usage:
"David" --> "name"
|
BindParamAssoc | BindHelpers |
| strToSuperArrowAssoc.. |
implicit def strToSuperArrowAssoc(in : String)
|
SuperArrowAssoc | BindHelpers |
| stripHead.. |
def stripHead(in : NodeSeq)
Remove all the tags, just leaving the child tags
|
NodeSeq | BindHelpers |
| symToBPAssoc.. |
implicit def symToBPAssoc(in : Symbol)
transforms a Symbol to a BindParamAssoc object which can be associated to a BindParam object
using the --> operator
[details]
Usage:
'David --> "name"
|
BindParamAssoc | BindHelpers |
| synchronized.. |
final def synchronized[T0](arg0 : T0)
|
T0 | AnyRef |
| template.. |
def template(xhtml : NodeSeq, prefix : String, tag1 : String, tag2 : String)
Find two of many templates from the children
|
Box[(NodeSeq, NodeSeq)] | BindHelpers |
| template.. |
def template(xhtml : NodeSeq, prefix : String, tag : String)
Similar to chooseTemplate, this returns the contents of the element in a Full Box if
found or an Empty Box otherwise
|
Box[NodeSeq] | BindHelpers |
| template.. |
def template(xhtml : NodeSeq, prefix : String, tag1 : String, tag2 : String, tag3 : String)
Find three of many templates from the children
|
Box[(NodeSeq, NodeSeq, NodeSeq)] | BindHelpers |
| 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 |
| xbind.. |
def xbind(namespace : String, xml : NodeSeq)(transform : PartialFunction[String, (NodeSeq) => NodeSeq])
Experimental extension to bind which passes in an additional "parameter" from the XHTML to the transform
function, which can be used to format the returned NodeSeq
[details]
|
NodeSeq | BindHelpers |
| xmlParam.. |
def xmlParam(in : NodeSeq, param : String)
Finds the named attribute in specified XML element and returns
a Full Box containing the value of the attribute if found
[details]
Empty otherwise.
|
Box[String] | BindHelpers |
| OVERVIEW | PACKAGE | CONSTR | FIELDS | METHODS | FRAMES NO FRAMES | INHERITED |