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: <pvr\widget\editors\extras\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.
 
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.
 
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.
 

Constructor Detail

idx.widget.SloshBucket()

Field Detail

availableGridModules

List of modules to optionally add to the available grid.
Defined in: <idx\widget\SloshBucket.js>.

availableLabel

An optional label to display above the available grid.
Defined in: <idx\widget\SloshBucket.js>.

canReoderFixedValues

Boolean indicating if fixed values can be moved up and down within the selected grid.
Defined in: <idx\widget\SloshBucket.js>.

canReorderSelectedGridData

If set to false, then the move up and move down buttons are not displayed.
Defined in: <idx\widget\SloshBucket.js>.

coreModules

The core modules that will be added in the constructor and used when the grid is created.
Defined in: <idx\widget\SloshBucket.js>.

disabled

Boolean indicating if the sloshBucket is disabled.
Defined in: <idx\widget\SloshBucket.js>.

displayItField

Attribute used to show / hide the rows in the selected grid. Used if hideAvailableOnAdd is true.
Defined in: <idx\widget\SloshBucket.js>.

hideAvailableOnAdd

If set to true, when an available item is added to the selected list it is hidden in the available list.
Defined in: <idx\widget\SloshBucket.js>.

orderField

Attribute used to order the rows in the selected grid. Used if canReorderSelectedGridData is true.
Defined in: <idx\widget\SloshBucket.js>.

selectedGridModules

List of modules to optionally add to the selected grid.
Defined in: <idx\widget\SloshBucket.js>.

selectedLabel

An optional label to display above the selected grid.
Defined in: <idx\widget\SloshBucket.js>.

tooltipPosition

The tooltip position.
Defined in: <idx\widget\SloshBucket.js>.

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.
Defined in: <idx\widget\SloshBucket.js>.
Parameters:
newItem
The new item to add to the selected grid.

constructor()

Constructor.
Defined in: <idx\widget\SloshBucket.js>.

destroy()

Destroy.
Defined in: <idx\widget\SloshBucket.js>.

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.
Defined in: <idx\widget\SloshBucket.js>.
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.
Defined in: <idx\widget\SloshBucket.js>.
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.
Defined in: <idx\widget\SloshBucket.js>.
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.
Defined in: <idx\widget\SloshBucket.js>.
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.
Defined in: <idx\widget\SloshBucket.js>.
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.)
Defined in: <idx\widget\SloshBucket.js>.
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.
Defined in: <idx\widget\SloshBucket.js>.
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.
Defined in: <idx\widget\SloshBucket.js>.

onMoved()

Fired when an row is move up or down in the selected grid.
Defined in: <idx\widget\SloshBucket.js>.

postCreate()

Post create.
Defined in: <idx\widget\SloshBucket.js>.

postMixInProperties()

Post Mixin.
Defined in: <idx\widget\SloshBucket.js>.

resize(changeSize)

Resizes the pane.
Defined in: <idx\widget\SloshBucket.js>.
Parameters:
changeSize
The changed size.

setAvailableGridData(store, layout)

Sets the store and layout on the available (left) grid.
Defined in: <idx\widget\SloshBucket.js>.
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.
Defined in: <idx\widget\SloshBucket.js>.
Parameters:
item
displayable

setFixedValues(fixedValues)

Update the list of fixed values that cannot be removed from the selected grid.
Defined in: <idx\widget\SloshBucket.js>.
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.
Defined in: <idx\widget\SloshBucket.js>.
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)

startup()


Defined in: <idx\widget\SloshBucket.js>.