Class DwtChooser
There are two types of buttons: one or more transfer buttons move items from the source list to the target list, and the remove button moves items from the target list to the source list. The client can specify its transfer buttons. If no specification is given, there will be a single transfer button called "Add". The parent must implement search(columnItem, ascending) if column sorting is supported. It should also create a subclass of DwtChooser which returns the appropriate source and target list views, themselves subclasses of DwtChooserListView. Those subclasses must implement _getHeaderList() and _createItemHtml(item). There are two different layout styles, horizontal (with the list views at the left and right) and vertical (with the list views at the top and bottom). There are two different selection styles, single and multiple, which control how many items may appear in the target list view. There are two different transfer modes: one where items are copied between lists, and one where they're moved. Defined in: DwtChooser.js.
Class Detail
DwtChooser(params)
Creates a control that allows the user to select items from a list, and
places the selected items in another list.
Author: Conrad Damon.
Field Detail
<static>
DwtChooser.HORIZ_STYLE
Defines a "horizontal" layout style.
<static>
DwtChooser.MULTI_SELECT
Defines a "multi" select.
<static>
DwtChooser.SINGLE_SELECT
Defines a "single" select.
<static>
DwtChooser.VERT_STYLE
Defines a "vertical" layout style.
Method Detail
addItems(items, view, skipNotify, id)
Adds items to the given list view.
addStateChangeListener(listener)
Adds a state change listener.
{Element}
getButtons()
Gets the source
<div> that contains the buttons
Gets a copy of the items in the given list. If that's the target list and
there are multiple transfer buttons, then a hash with a vector for each one
is returned. Otherwise, a single vector is returned. Defaults to target view.
{Element}
getSourceListView()
Gets the source
<divgt; that contains the source list view.
{Element}
getTargetListView()
Gets the source
<div> that contains the target list view.
{DwtInputField}
getTextField()
Gets the text input field.
remove(list, skipNotify)
Removes items from target list, paying attention to current mode. Also handles button state.
removeItems(list, view, skipNotify)
Removes items from the given list view.
removeStateChangeListener(listener)
Removes a state change listener.
reset(style)
Resets one or both list views, and the buttons. Defaults to resetting both list views.
resize(width, height)
Sizes the list views based on the given available width and height.
setItems(items, view, clearOtherView)
Sets the given list view with the given list. Defaults to source view.
setSelectStyle(style, noResize)
Sets the select style to the given style. Performs a resize
in order to adjust the layout, and changes the label on the transfer button if it's
the default one.
transfer(list, id, skipNotify)
Moves or copies items from the source list to the target list, paying attention
to current mode.
|
||||||||||||||||||||||||||||||||||||||||||||||
Documentation generated by JsDoc Toolkit 2.3.0 on Tue Jun 28 2016 21:01:27 GMT-0400 (EDT)
|