net.liftmodules.combobox

ComboBox

abstract class ComboBox extends DropDownMenu

The ComboBox Widget

This widget use select2 to generate the ComboBox.

You could pass options to select2 by using jsonOptions parameter in the constructor.

When using this class, you should override at least onSearching, so the combobox knows what should be displayed when user opened this comboBox.

Please see the README file to know how to acutually use this class to createa combobox in your Lift web project.

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

Instance Constructors

  1. new ComboBox(default: Option[ComboItem], allowCreate: Boolean, jsonOptions: List[(String, JsExp)] = immutable.this.Nil)

    default

    The default item in the combobox.

    allowCreate

    Is user allowed to enter item that does not on the sugeestion list.

    jsonOptions

    The options should pass to select2.

Abstract Value Members

  1. abstract def onSearching(term: String): List[ComboItem]

    The method that build suggestion list.

    The method that build suggestion list.

    term

    The text user input into the combobox.

    returns

    The combobox suggestion items.

    Definition Classes
    ComboBoxDropDownMenu

Concrete 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. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. val clear: JsCmd

    The JsCmd that could clear current selection in the combobox.

  8. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  9. def comboBox: NodeSeq

    The ComboBox HTML code that could bind to template.

  10. val comboBoxID: String

    The id of HTML hidden input box associate with select2 combobox.

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

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

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

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

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

    Definition Classes
    AnyRef → Any
  16. def initAjaxURL(): String

    Register the onSearching method as an Lift's ajax function that could access from URL.

    Register the onSearching method as an Lift's ajax function that could access from URL.

    returns

    The AJAX callback URL.

    Attributes
    protected
    Definition Classes
    ComboBoxDropDownMenu
  17. final def isInstanceOf[T0]: Boolean

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

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

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

    Definition Classes
    AnyRef
  21. def onItemAdded(text: String): JsCmd

    What we should do when user added an item.

    What we should do when user added an item.

    text

    The text user entered into combo box.

    returns

    What JsCmd should execute on client side.

  22. def onItemSelected(item: Option[ComboItem]): JsCmd

    What we should do when user selected / canceled an item.

    What we should do when user selected / canceled an item.

    item

    If user selected an item, it will be Some[ComboItem]. if user canceled the current item, it will be None.

    returns

    What JsCmd should execute on client side.

  23. def onMultiItemSelected(items: List[ComboItem]): JsCmd

    What we should do when user selected / canceled an item on multiselect.

    What we should do when user selected / canceled an item on multiselect.

    returns

    What JsCmd should execute on client side.

  24. def searchAjax(term: String): LiftResponse

    Search AJAX function.

    Search AJAX function.

    This will call onSearching and convert the result to JSON format, and provide it to select2.

    term

    The text user entered.

    returns

    The matching item as JSON response output.

    Attributes
    protected[net.liftmodules.combobox]
    Definition Classes
    DropDownMenu
  25. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  26. def toString(): String

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from DropDownMenu

Inherited from AnyRef

Inherited from Any

Ungrouped