Module: alfresco/forms/controls/SimplePicker

alfresco/forms/controls/SimplePicker

Author:
  • Dave Draper
License:
Source:

Mixes In

  • module:aikau/core/ChildProcessing

Members

availableItemsLabel :string

This is the label to display above the available items.
Type:
  • string
Source:

currentData :string

This is the data object containing a list of items that can be picked. It should be used as an alternative to loadDataPublishTopic as well as being used in the definition of the dynamic visibility rules for each available option.
Type:
  • string
Default Value:
  • "name"
Source:

itemsProperty :string

This is the value that will be assigned as the value of the [itemsProperty]{@link module:alfresco/lists/AlfList#itemsProperty} of the [list]{@link module:alfresco/lists/AlfList} used to display the items available to be picked.
Type:
  • string
Default Value:
  • "items"
Source:

loadDataPublishPayload :object

This is the payload that will be published on the loadDataPublishTopic value in the main [view] {@link module:alfresco/lists/views/AlfListView} of the [list]{@link module:alfresco/lists/AlfList} of available items.
Type:
  • string
Default Value:
  • null
Source:

pickedItemsLabel :string

This is the label to display above the picked items.
Type:
  • string
Source:

propertyToRender :string

This is the dot-notation attribute within each available item to be used as a label. It is assigned as the value of the [propertyToRender]{@link module:alfresco/renderers/Property#propertyToRender} in the [list of picked items] {@link module:alfresco/pickers/PickedItems} and the [list]{@link module:alfresco/lists/AlfList} of available items.
Type:
  • string
Default Value:
  • "name"
Source:

reorderable :boolean

Indicates whether or not to show the re-ordering controls in the list of picked items.
Type:
  • boolean
Default Value:
  • false
Source:

singleItemMode :boolean

This indicates whether the picker should only allow one item to be picked at a time (selecting a new item when one is already picked will result in the previously picked item being remmoved).
Type:
  • boolean
Default Value:
  • false
Source:

widgetsForAvailableItemsView :object

This is the model to use for rendering the items that are available for selection.
Type:
  • object
Source:

widgetsForControl :array

The picker widgets. Setting this to any value will effectively override the widgetsForAvailableItemsView and widgetsForPickedItemsView configuration.
Type:
  • array
Default Value:
  • null
Source:

widgetsForPickedItemsView :object

This is the model to use for rendering the items that have been picked.
Type:
  • object
Source:

Methods

createFormControl()

Source:

getValue(payload)

Overides the inherited function to get the current picked items value.
Parameters:
Name Type Description
payload object
Source:

getWidgetConfig()

Source:

onItemsSelected(payload)

Parameters:
Name Type Description
payload object
Source:

processValidationRules() → {boolean}

Overides the inherited function since the only validation for a picker is if a value is required the length of the value array must not be 0.
Source:
Returns:
True if not required or is required and value has length greater than zero
Type
boolean

setupChangeEvents()

Overrides the default change events to use blur events on the text box. This is done so that we can validate on every single keypress. However, we need to keep track of old values as this information is not readily available from the text box itself.
Source:

setValue(payload)

Overides the inherited function to set the current picked items.
Parameters:
Name Type Description
payload object
Source: