Class idx.widget.SloshBucket
Provides a widget that is used to pick a subset of unique items from a larger set of items.
The widget contains two single column lists. One list contains the available items and the other list contains the selected items. The Add button and a Remove button that are used to move items from one list to the other appear between the columns. Optionally, the widget includes an Up button and a Down button that are used to order the selected items.
Defined in: <idx\widget\SloshBucket.js>.
Constructor Summary
Constructor Attributes | Constructor Name and Description |
---|---|
Field Summary
Field Attributes | Field Name and Description |
---|---|
List of modules to optionally add to the available grid.
|
|
An optional label to display above the available grid.
|
|
Boolean indicating if fixed values can be moved up and down within the selected grid.
|
|
If set to
false , then the move up and move down buttons are not displayed. |
|
The core modules that will be added in the constructor and used when the grid is created.
|
|
Boolean indicating if the sloshBucket is disabled.
|
|
Attribute used to show / hide the rows in the selected grid.
|
|
If set to
true , when an available item is added to the selected list it is hidden in the
available list. |
|
Attribute used to order the rows in the selected grid.
|
|
List of modules to optionally add to the selected grid.
|
|
An optional label to display above the selected grid.
|
|
The tooltip position.
|
Method Summary
Method Attributes | Method Name and Description |
---|---|
addToSelected(newItem)
Add the input newItem to the selected grid.
|
|
Constructor.
|
|
destroy()
Destroy.
|
|
filter(struct)
Filters the available data using the passed in filter structure.
|
|
Returns the fixed selected values.
|
|
getGridTooltipText(grid, item)
Returns the grid item tooltip text.
|
|
Returns an array of items from the selected grid.
|
|
isFixed(value)
Returns boolean indicating if the input value is a fixed value.
|
|
isValidToRemove(selectedItems)
Check if the input items can be removed from the selected grid.
|
|
newItem(item)
Creates a new item that will be added to the selected grid's store.
|
|
Fired when an item is added or remove from the selected grid.
|
|
onMoved()
Fired when an row is move up or down in the selected grid.
|
|
Post create.
|
|
Post Mixin.
|
|
resize(changeSize)
Resizes the pane.
|
|
setAvailableGridData(store, layout)
Sets the store and layout on the available (left) grid.
|
|
setAvailableItemDisplayable(item, displayable)
Sets the grid item as displayable or hidden.
|
|
setFixedValues(fixedValues)
Update the list of fixed values that cannot be removed from the selected grid.
|
|
setSelectedGridData(store, layout, fixedValues)
Sets the store, layout, and fixed values for the selected (right) grid.
|
|
startup()
|
Field Detail
availableGridModules
List of modules to optionally add to the available grid.
availableLabel
An optional label to display above the available grid.
canReoderFixedValues
Boolean indicating if fixed values can be moved up and down within the selected grid.
canReorderSelectedGridData
If set to
false
, then the move up and move down buttons are not displayed.
coreModules
The core modules that will be added in the constructor and used when the grid is created.
disabled
Boolean indicating if the sloshBucket is disabled.
displayItField
Attribute used to show / hide the rows in the selected grid. Used if hideAvailableOnAdd is
true
.
hideAvailableOnAdd
If set to
true
, when an available item is added to the selected list it is hidden in the
available list.
orderField
Attribute used to order the rows in the selected grid. Used if canReorderSelectedGridData is
true
.
selectedGridModules
List of modules to optionally add to the selected grid.
selectedLabel
An optional label to display above the selected grid.
tooltipPosition
The tooltip position.
Method Detail
addToSelected(newItem)
Add the input newItem to the selected grid. This method can be used to add user values to the selected grid.
The input newItem can optionally be in the available grid.
- Parameters:
- newItem
- The new item to add to the selected grid.
constructor()
Constructor.
destroy()
Destroy.
filter(struct)
Filters the available data using the passed in filter structure. Currently this function only filters on one
field in this input struct. In the future, the filtering could be enhanced to filter on multiple fields in
this struct.
- Parameters:
- struct
- The filter structure for filtering.
getFixedSelectedValues()
Returns the fixed selected values. Fixed data is fixed in the selected grid and cannot be removed from the
selected grid.
- Returns:
- Array of selected grid fixed values.
getGridTooltipText(grid, item)
Returns the grid item tooltip text. Override this method to return custom tooltip text which is displayed
when the user hovers over a row or hits Control F1 from a focused row.
- Parameters:
- grid
- The grid the user is hovering over.
- item
- The item in the grid on which the the user is focused.
- Returns:
- The tooltip text to display.
getSelectedItems()
Returns an array of items from the selected grid.
- Returns:
- Array of items.
isFixed(value)
Returns boolean indicating if the input value is a fixed value. Fixed data is fixed in the selected grid and
cannot be removed from the selected grid.
- Parameters:
- value
- Returns:
- Boolean indicating if the value is a fixed value.
isValidToRemove(selectedItems)
Check if the input items can be removed from the selected grid. This method can be overriden to add custom
logic. (This method is called after the user selects the remove button and after the user double clicks on a row in the selected grid.)
- Parameters:
- selectedItems
- Returns:
- Boolean indicating if the input items can be removed from the selected grid.
newItem(item)
Creates a new item that will be added to the selected grid's store. This method can be overriden to add
custom code for creating the new item. If this method returns null, then do not add an item.
- Parameters:
- item
- Returns:
- The item to be added to the selected grid.
onAddRemove()
Fired when an item is added or remove from the selected grid.
onMoved()
Fired when an row is move up or down in the selected grid.
postCreate()
Post create.
postMixInProperties()
Post Mixin.
resize(changeSize)
Resizes the pane.
- Parameters:
- changeSize
- The changed size.
setAvailableGridData(store, layout)
Sets the store and layout on the available (left) grid.
- Parameters:
- store
- The store for the available grid.
- layout
- The structure for the available grid.
setAvailableItemDisplayable(item, displayable)
Sets the grid item as displayable or hidden. Must call filter on the grid to get the item to actually display
or hide.
- Parameters:
- item
- displayable
setFixedValues(fixedValues)
Update the list of fixed values that cannot be removed from the selected grid.
- Parameters:
- fixedValues
- Array of fixed values.
setSelectedGridData(store, layout, fixedValues)
Sets the store, layout, and fixed values for the selected (right) grid. Call
setAvailableGridData
method before calling setSelectedGridData
method.
- Parameters:
- store
- The selected values store.
- layout
- The selected values structure.
- fixedValues
- Array of values that cannot be removed from the selected values grid. (Optional)