Show:

A widget providing selection and sorting capabilities for a list of elements

Methods

addAllItems

(
  • [event=null]
)
chainable

Move all items from the source list of the pickList to the target list.

Parameters:

  • [event=null] Object optional

    The event that triggered the movement of the elements. This event will be made accessible when the resulting change event is fired.

addItems

(
  • [items]
  • [event=null]
)
chainable

Move items from the source list of the pickList to the target list.

Parameters:

  • [items] Object optional

    A list of Elements to remove from the source list of the pickList. If no items are specified, the selected sourceList items are used.

  • [event=null] Object optional

    The event that triggered the movement of the elements. This event will be made accessible when the resulting change event is fired.

destroy

()

Removes the pick list functionality completely. This will return the element back to its pre-init state.

removeAllItems

(
  • [event=null]
)
chainable

Move all items from the target list of the pickList to the source list.

Parameters:

  • [event=null] Object optional

    The event that triggered the movement of the elements. This event will be made accessible when the resulting change event is fired.

removeItems

(
  • items
  • [event=null]
)
chainable

Move items from the target list of the pickList to the source list.

Parameters:

  • items Object

    A list of Elements to remove from the target list of the pickList If no items are specified, the selected targetList items are used.

  • [event=null] Object optional

    The event that triggered the movement of the elements. This event will be made accessible when the resulting change event is fired.

Properties

disabled

Boolean

Disable the pickList widget

Default: false

header

String

The text to use for the pickList header

height

String

The height of the pickList. Specify the value as either:

  1. A String with appropriate units, eg.:

    height: '120px'
  2. An integer without any units, in which case the units of px are assumed:

    height: 120

heightMax

String

The maximum height of the pickList Specify the value as either:

  1. A String with appropriate units, eg.:

    heightMax: '120px'
  2. An integer without any units, in which case the units of px are assumed:

    heightMax: 120

heightMin

String

The minimum height of the pickList. Specify the value as either:

  1. A String with appropriate units, eg.:

    heightMin: '120px'
  2. An integer without any units, in which case the units of px are assumed:

    heightMin: 120

orderable

Boolean

When true, elements in the target list can be re-ordered

Default: true

orderButtonsText

JSON

Text to be applied to the ordering buttons of the target list. The text should be arranged as an object in JSON notation.

eg. {first: ..., up: ..., down: ..., last: ...}

Default: null

pickButtonsText

JSON

Text to be applied to the picking buttons of the picklist. The text should be arranged as an object in JSON notation.

eg. {addAll: ..., add: ..., remove: ..., removeAll: ...}

Default: null

sortFunction

Function

Function used to sort the elements after an item has been added to either the source or target list. sortFunction must meet the API requirements of the compareFunction for the Array.prototype.sort method.

sourceHeader

String

The text to use for the source header of the pickList

styleClass

String

A CSS class to be added to the pickList. Multiple classes should be space separated

switchByClick

Boolean

When true, clicking on a pickList element will move it between the source and target lists

Default: false

switchByDblClick

Boolean

When true, double-clicking on a pickList element will move it between the source and target lists

Default: true

targetHeader

String

The text to use for the target header of the pickList

Events

addDomElements

Fired after the dynamically created DOM elements of the pickList have been created

blur

Fired when the pickList loses focus

change

Fired when the target list of the pickList changes values.

create

Fired after the pickList has been created

destroy

Fired after the pickList has been destroyed

focus

Fired when the pickList receives focus