net.liftweb.util

BindHelpers

trait BindHelpers extends AnyRef

Helpers assocated with bindings

Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. BindHelpers
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. final class AttrBindParam extends BindParam with BindWithAttr

    BindParam that binds a given value into a new attribute.

  2. sealed trait BindParam extends AnyRef

    Base class for Bind parameters.

  3. trait BindWithAttr extends AnyRef

    A trait that indicates what the newly bound attribute name should be.

  4. final class BooleanBindParam extends (String, Boolean) with BindParam

  5. final class BoxBindParam extends (String, Box[NodeSeq]) with BindParam

  6. final class FuncAttrBindParam extends BindParam with BindWithAttr

    BindParam that computes a new attribute value based on the current attribute value.

  7. final class FuncAttrBoxBindParam extends BindParam with BindWithAttr

    BindParam that computes an optional new attribute value based on the current attribute value.

  8. final class FuncAttrOptionBindParam extends BindParam with BindWithAttr

    BindParam that computes an optional new attribute value based on the current attribute value.

  9. final class FuncBindParam extends (String, (NodeSeq) ⇒ NodeSeq) with BindParam

    BindParam using a function to calculate its value

  10. final class IntBindParam extends (String, Int) with BindParam

  11. final class LongBindParam extends (String, Long) with BindParam

  12. final class OptionBindParam extends (String, Option[NodeSeq]) with BindParam

  13. sealed case class PrefixedBindWithAttr(prefix: String, binding: BindParam with BindWithAttr) extends BindParam with BindWithAttr with Product with Serializable

    A case class that wraps attribute-oriented BindParams to allow prefixing the resulting attribute

  14. class SuperArrowAssoc extends AnyRef

  15. final class SymbolBindParam extends (String, Symbol) with BindParam

  16. final class TheBindParam extends (String, NodeSeq) with BindParam

    Constant BindParam always returning the same value

  17. final class TheBindableBindParam[T <: Bindable] extends (String, T) with BindParam

  18. final class TheStrBindParam extends (String, String) with BindParam

    Constant BindParam always returning the same value

  19. class BindParamAssoc extends AnyRef

    This class creates a BindParam from an input value

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. object AttrBindParam

    BindParam that binds a given value into a new attribute.

  7. object BooleanBindParam extends Serializable

  8. object BoxBindParam extends Serializable

  9. object FuncAttrBindParam

    BindParam using a function to calculate its value.

  10. object FuncAttrBoxBindParam

    BindParam that computes an optional new attribute value based on the current attribute value.

  11. object FuncAttrOptionBindParam

    BindParam that computes an optional new attribute value based on the current attribute value.

  12. object FuncBindParam extends Serializable

  13. object IntBindParam extends Serializable

  14. object LongBindParam extends Serializable

  15. object OptionBindParam extends Serializable

  16. object SymbolBindParam extends Serializable

  17. object TheBindParam extends Serializable

  18. object TheBindableBindParam extends Serializable

  19. object TheStrBindParam extends Serializable

  20. def addAttributes(in: NodeSeq, attributes: MetaData): NodeSeq

    takes a NodeSeq and applies all the attributes to all the Elems at the top level of the NodeSeq.

    takes a NodeSeq and applies all the attributes to all the Elems at the top level of the NodeSeq. The id attribute is applied to the first-found Elem only

  21. def addCssClass(cssClass: String, elem: Elem): Elem

    Adds a css class to the existing class tag of an Elem or create the class attribute

  22. def addCssClass(cssClass: Box[String], elem: Elem): Elem

    Adds a css class to the existing class tag of an Elem or create the class attribute

  23. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  24. def bind(vals: Map[String, NodeSeq], xml: NodeSeq): NodeSeq

    Replace the content of lift:bind nodes with the corresponding nodes found in a map, according to the value of the "name" attribute.

    Replace the content of lift:bind nodes with the corresponding nodes found in a map, according to the value of the "name" attribute.

    Usage:

      bind(Map("a" ->
    = ), change this) must ==/(
    =  =
    )
    

    vals

    map of name/nodes to replace

    xml

    nodes containing lift:bind nodes

    returns

    the NodeSeq that results from the specified transforms

  25. def bind(namespace: String, nodeFailureXform: Box[(NodeSeq) ⇒ NodeSeq], paramFailureXform: Box[(PrefixedAttribute) ⇒ MetaData], preserveScope: Boolean, xml: NodeSeq, params: BindParam*): NodeSeq

    Bind a set of values to parameters and attributes in a block of XML with defined transforms for unbound elements within the specified namespace.

    Bind a set of values to parameters and attributes in a block of XML with defined transforms for unbound elements within the specified namespace.

    For example:

      bind("user",
           Full(xhtml: NodeSeq => Text("Default Value")),
           Empty,
           replace thisreplace with default,
           "hello" ->
    = )
    
    will return
    =  =
    Default Value
    

    namespace

    the namespace of tags to bind

    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.

    params

    the list of BindParam bindings to be applied

    returns

    the NodeSeq that results from the specified transforms

  26. def bind(namespace: String, nodeFailureXform: Box[(NodeSeq) ⇒ NodeSeq], paramFailureXform: Box[(PrefixedAttribute) ⇒ MetaData], xml: NodeSeq, params: BindParam*): NodeSeq

    Bind a set of values to parameters and attributes in a block of XML with defined transforms for unbound elements within the specified namespace.

    Bind a set of values to parameters and attributes in a block of XML with defined transforms for unbound elements within the specified namespace.

    For example:

      bind("user",
           Full(xhtml: NodeSeq => Text("Default Value")),
           Empty,
           replace thisreplace with default,
           "hello" ->
    = )
    
    will return
    =  =
    Default Value
    

    namespace

    the namespace of tags to bind

    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.

    params

    the list of BindParam bindings to be applied

    returns

    the NodeSeq that results from the specified transforms

  27. def bind(namespace: String, xml: NodeSeq, params: BindParam*): NodeSeq

    Bind a set of values to parameters and attributes in a block of XML.

    Bind a set of values to parameters and attributes in a block of XML.

    For example:

      bind("user", replace this, "hello" ->
    = )
    
    will return
    =  =
    

    namespace

    the namespace of tags to bind

    xml

    the NodeSeq in which to find elements to be bound.

    params

    the list of BindParam bindings to be applied

    returns

    the NodeSeq that results from the specified transforms

  28. def bindlist(listvals: List[Map[String, NodeSeq]], xml: NodeSeq): Box[NodeSeq]

    Bind a list of name/xml maps to a block of XML containing lift:bind nodes (see the bind(Map, NodeSeq) function)

    Bind a list of name/xml maps to a block of XML containing lift:bind nodes (see the bind(Map, NodeSeq) function)

    returns

    the NodeSeq that results from the specified transforms

  29. def chooseTemplate(prefix: String, tag: String, xhtml: NodeSeq): 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> ... </choose:stuff> in the specified 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> ... </choose:stuff> in the specified NodeSeq.

    prefix

    the prefix (e.g., "choose")

    tag

    the tag to choose (e.g., "stuff")

    xhtml

    the node sequence to search for the specified element

    returns

    the first matching node sequence

  30. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. implicit def cssSelectorToCssBindPromoter(sel: CssSelector): ToCssBindPromoter

    promote a String to a ToCssBindPromotor

  32. def deepEnsureUniqueId(in: NodeSeq): NodeSeq

    For a list of NodeSeq, ensure that the the id of the root Elems are unique.

    For a list of NodeSeq, ensure that the the id of the root Elems are unique. If there's a duplicate, that Elem will be returned without an id

  33. def ensureId(ns: NodeSeq, id: String): NodeSeq

    Ensure that the first Element has the specified ID

  34. def ensureUniqueId(in: Seq[NodeSeq]): Seq[NodeSeq]

    For a list of NodeSeq, ensure that the the id of the root Elems are unique.

    For a list of NodeSeq, ensure that the the id of the root Elems are unique. If there's a duplicate, that Elem will be returned without an id

  35. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  36. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  37. def errorDiv(body: NodeSeq): Box[NodeSeq]

  38. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  39. def findBox[T](nodes: Seq[Node])(f: (Elem) ⇒ Box[T]): Box[T]

    Given a NodeSeq and a function that returns a Box[T], return the first value found in which the function evaluates to Full

  40. def findId(ns: NodeSeq): Box[String]

    Finds the first Element in the NodeSeq (or any children) that has an ID attribute

  41. def findId(nodes: Seq[Node], id: String): Option[Elem]

    Given an id value, find the Elem with the specified id

  42. def findNode(in: Elem, nodes: NodeSeq): Box[Elem]

    Finds and returns the first node in the specified NodeSeq and its children with the same label and prefix as the specified element.

  43. def findOption[T](nodes: Seq[Node])(f: (Elem) ⇒ Option[T]): Option[T]

    Given a NodeSeq and a function that returns an Option[T], return the first value found in which the function evaluates to Some

  44. def findOrCreateId(f: (String) ⇒ (NodeSeq) ⇒ NodeSeq): (NodeSeq) ⇒ NodeSeq

    Find the first Elem in the NodeSeq.

    Find the first Elem in the NodeSeq. If it has an id attribute, then call the function, f, with that id. If the first Elem does not have an id attribute, create an id attribute and pass that id attribute to the function

  45. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  46. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  47. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  48. def mixinAttributes(out: Elem)(in: NodeSeq): NodeSeq

    Takes attributes from the first node of 'in' (if any) and mixes them into 'out'.

    Takes attributes from the first node of 'in' (if any) and mixes them into 'out'. Curried form can be used to produce a NodeSeq => NodeSeq for bind.

    out

    where to put the attributes

    in

    where to take the attributes from

    returns

    'out' element with attributes from 'in'

  49. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  50. final def notify(): Unit

    Definition Classes
    AnyRef
  51. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  52. def replaceIdNode(in: NodeSeq, id: String, replacement: NodeSeq): NodeSeq

    Replace the element with the id that matches with the replacement nodeseq.

  53. implicit def strToCssBindPromoter(str: String): ToCssBindPromoter

    promote a String to a ToCssBindPromotor

  54. implicit def strToSuperArrowAssoc(in: String): SuperArrowAssoc

  55. def stripHead(in: NodeSeq): NodeSeq

    Remove all the <head> tags, just leaving the child tags

  56. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  57. def template(xhtml: NodeSeq, prefix: String, tag1: String, tag2: String, tag3: String): Box[(NodeSeq, NodeSeq, NodeSeq)]

    Find three of many templates from the children

  58. def template(xhtml: NodeSeq, prefix: String, tag1: String, tag2: String): Box[(NodeSeq, NodeSeq)]

    Find two of many templates from the children

  59. def template(xhtml: NodeSeq, prefix: String, tag: String): Box[NodeSeq]

    Similar to chooseTemplate, this returns the contents of the element in a Full Box if found or an Empty Box otherwise.

  60. def toString(): String

    Definition Classes
    AnyRef → Any
  61. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  62. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  63. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  64. def xmlParam(in: NodeSeq, param: String): Box[String]

    Finds the named attribute in specified XML element and returns a Full Box containing the value of the attribute if found.

    Finds the named attribute in specified XML element and returns a Full Box containing the value of the attribute if found. Empty otherwise.

    returns

    a Full Box containing the value of the attribute if found; Empty otherwise

Deprecated Value Members

  1. object BindParamAssoc

    transforms a Box into a Text node

  2. def processBind(around: NodeSeq, atWhat: Map[String, NodeSeq]): NodeSeq

    Bind parameters to XML.

    Bind parameters to XML.

    around

    XML with lift:bind elements

    atWhat

    data to bind

    Annotations
    @deprecated
    Deprecated

    (Since version 2.3) use the bind function instead

  3. implicit def strToBPAssoc(in: String): BindParamAssoc

    transforms a String to a BindParamAssoc object which can be associated to a BindParam object using the --> operator.

    transforms a String to a BindParamAssoc object which can be associated to a BindParam object using the --> operator.

    Usage: "David" --> "name"

    Annotations
    @deprecated
    Deprecated

    (Since version 2.4) use -> instead

  4. implicit def symToSAAssoc(in: Symbol): SuperArrowAssoc

    transforms a Symbol to a SuperArrowAssoc object which can be associated to a BindParam object using the -> operator.

    transforms a Symbol to a SuperArrowAssoc object which can be associated to a BindParam object using the -> operator.

    Usage: 'David -> "name"

    Annotations
    @deprecated
    Deprecated

    (Since version 2.4) use -> instead

  5. def xbind(namespace: String, xml: NodeSeq)(transform: PartialFunction[String, (NodeSeq) ⇒ 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.

    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.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.4) use bind instead

Inherited from AnyRef

Inherited from Any

Ungrouped