net.liftweb.util.BindHelpers

trait BindHelpers

trait BindHelpers

 extends ScalaObject


Helpers assocated with bindings


Companion: BindHelpers

Source: BindHelpers.scala(120)

Direct Known Subclasses

Helpers, BindHelpers,

Nested Classes

AttrBindParam, BindParam, BindParamAssoc, BindWithAttr, BooleanBindParam, BoxBindParam, FuncAttrBindParam, FuncAttrBoxBindParam, FuncAttrOptionBindParam, FuncBindParam, IntBindParam, LongBindParam, OptionBindParam, SuperArrowAssoc, SymbolBindParam, TheBindParam, TheBindableBindParam, TheStrBindParam,

 Fields

AttrBindParam.. object AttrBindParam

 extends ScalaObject
BindParamAssoc.. object BindParamAssoc
transforms a Box into a Text node


 extends ScalaObject

 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
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,
          replace thisreplace with default,
          "hello" -> 

)

will return

Default Value
param
xml - the NodeSeq in which to find elements to be bound.
nodeFailureXform - a box containing the function to use as the default transform for tags in the specified namespace that do not have bindings specified.
paramFailureXform - a box containing the function to use as the default transform for unrecognized attributes in bound elements.
params - the list of BindParam bindings to be applied
namespace - the namespace of tags to bind
return
- the NodeSeq that results from the specified transforms
NodeSeq
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" -> 

), change this) must ==/(

)

param
xml - nodes containing lift:bind nodes
vals - map of name/nodes to replace
return
- the NodeSeq that results from the specified transforms
NodeSeq
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", replace this, "hello" -> 

)

will return

param
xml - the NodeSeq in which to find elements to be bound.
params - the list of BindParam bindings to be applied
namespace - the namespace of tags to bind
return
- the NodeSeq that results from the specified transforms
NodeSeq
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,
          replace thisreplace with default,
          "hello" -> 

)

will return

Default Value
param
preserveScope: - true if the scope should be preserved, false is the normal setting
params - the list of BindParam bindings to be applied
nodeFailureXform - a box containing the function to use as the default transform for tags in the specified namespace that do not have bindings specified.
paramFailureXform - a box containing the function to use as the default transform for unrecognized attributes in bound elements.
xml - the NodeSeq in which to find elements to be bound.
namespace - the namespace of tags to bind
return
- the NodeSeq that results from the specified transforms
NodeSeq
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]
return
- the NodeSeq that results from the specified transforms
Box[NodeSeq]
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]
.. </choose:stuff> in the specified NodeSeq.
param
tag - the tag to choose (e.g., "stuff")
xhtml - the node sequence to search for the specified element
prefix - the prefix (e.g., "choose")
return
- the first matching node sequence
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
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]
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.
param
out - where to put the attributes
in - where to take the attributes from
return
- 'out' element with attributes from 'in'
NodeSeq
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]
deprecated
- use the bind function instead
param
atWhat - data to bind
around - XML with lift:bind elements
NodeSeq
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"

deprecated
- use -> instead
BindParamAssoc
strToSuperArrowAssoc.. implicit def strToSuperArrowAssoc(in : String) SuperArrowAssoc
stripHead.. def stripHead(in : NodeSeq)
Remove all the tags, just leaving the child tags
NodeSeq
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"

deprecated
- use -> instead
BindParamAssoc
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)]
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]
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)]
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]
deprecated
- use bind instead
NodeSeq
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.
return
- a Full Box containing the value of the attribute if found; Empty otherwise
Box[String]
Copyright (c) 2006-2010 WorldWide Conferencing, LLC. All Rights Reserved.