Class

org.querki.gadgets.components

RxTextFrag

Related Doc: package components

Permalink

class RxTextFrag extends core.ManagedFrag[Text]

A reactive text Modifier, which lets you place some Text into Scalatags, and have it change when the underlying Rx changes. It does this by setting the .text() jQuery property of the parent node.

Note that this requires an Rx[String] specifically, to keep things simple. Use rx.ops.map to turn other types into Strings.

Linear Supertypes
core.ManagedFrag[Text], Frag, Frag[Element, Node], Modifier[Element], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. RxTextFrag
  2. ManagedFrag
  3. Frag
  4. Frag
  5. Modifier
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new RxTextFrag(rx: Rx[String])(implicit ctx: Owner)

    Permalink

Value Members

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

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

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

    Permalink
    Definition Classes
    AnyRef → Any
  4. def applyTo(parent: Element): Unit

    Permalink

    We intercept applyTo() (which is part of Scalatags), to record the parent of this Node.

    We intercept applyTo() (which is part of Scalatags), to record the parent of this Node.

    Definition Classes
    ManagedFrag → Frag → Modifier
  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. def createFrag: Text

    Permalink

    Concrete classes must define this.

    Concrete classes must define this. It causes the actual DOM node to come into existence.

    Definition Classes
    RxTextFragManagedFrag
  8. def elem: Text

    Permalink

    Fetches the actual rendered DOM Node for this Frag.

    Fetches the actual rendered DOM Node for this Frag.

    IMPORTANT: this is convenient, but fundamentally unsafe! Only use it in places where you are *certain* that the Node has already been rendered; otherwise, use the safer elemOpt or elemOptRx!

    Definition Classes
    ManagedFrag
  9. def elemOpt: Option[Text]

    Permalink
    Definition Classes
    ManagedFrag
  10. val elemOptRx: Var[Option[Text]]

    Permalink

    An Rx member containing the actual Node iff it has been rendered.

    An Rx member containing the actual Node iff it has been rendered.

    Definition Classes
    ManagedFrag
  11. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  13. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. final def getClass(): Class[_]

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

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

    Permalink
    Definition Classes
    Any
  17. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  18. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  19. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  20. lazy val obs: Obs

    Permalink
  21. def onInserted(): Unit

    Permalink

    This is called immediately after this fragment is inserted into its parent, so that you can provide additional stuff that happens then.

    This is called immediately after this fragment is inserted into its parent, so that you can provide additional stuff that happens then.

    Definition Classes
    ManagedFrag
  22. def onRendered(node: Text): Unit

    Permalink

    Subclasses can override this to define behaviour that happens in the middle of the render function.

    Subclasses can override this to define behaviour that happens in the middle of the render function. Generally used by infrastructure, not concrete classes.

    Definition Classes
    RxTextFragManagedFrag
  23. def parentOpt: Option[Element]

    Permalink
    Definition Classes
    ManagedFrag
  24. val parentOptRx: Var[Option[Element]]

    Permalink

    The parent of the resulting Node, once it has been created.

    The parent of the resulting Node, once it has been created.

    Definition Classes
    ManagedFrag
  25. def render: Text

    Permalink

    We intercept render (which is part of Scalatags), to record the Node when it gets created, and to provide access to the creation event.

    We intercept render (which is part of Scalatags), to record the Node when it gets created, and to provide access to the creation event.

    IMPORTANT: this imperatively renders the Gadget; if you call it repeatedly, it will render again! Use rendered by preference most of the time.

    Definition Classes
    ManagedFrag → Frag → Frag
  26. def rendered: Text

    Permalink

    Lazy version of render().

    Lazy version of render(). This returns the rendered content of the Gadget, rendering if need be. This allows you to easily fetch the elem repeatedly, without worrying about re-rendering.

    Definition Classes
    ManagedFrag
  27. def setElem(e: Text): RxTextFrag.this.type

    Permalink

    Slam the element for this Gadget.

    Slam the element for this Gadget. You should only call this iff the element was created from an external mechanism and you're building this Gadget around that element.

    This is intentionally designed for chaining, for ease of use -- it returns this Gadget.

    Definition Classes
    ManagedFrag
  28. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  29. def toString(): String

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from core.ManagedFrag[Text]

Inherited from Frag

Inherited from Frag[Element, Node]

Inherited from Modifier[Element]

Inherited from AnyRef

Inherited from Any

Ungrouped