The default picker widget for use in picker form controls and can be extended as necessary to customize the initial set of "root pickers" by overriding the [widgetsForRootPicker attribute] module:alfresco/pickers/Picker#widgetsForRootPicker. The picked items display can also be customized by overriding the widgetsForPickedItems attribute.
- Copyright:
- Copyright (C) 2005-2020 Alfresco Software Limited
- License:
- GNU Lesser General Public License, see: Open Source Licensing
- Source:
Extends
Mixes In
- external:dojo/_TemplatedMixin
- module:alfresco/core/Core
- module:alfresco/core/CoreWidgetProcessing
Members
-
_processsingPickedItems :boolean
-
This boolean variable is set to true when the picked items model is being rendered and is set back to false once the rendering is complete. This is done so that the pickedItems is only processed once and the root picked item widget is not added to the list of sub-pickers.
Type:
- boolean
- Default Value:
- false
- Source:
-
cssRequirements :object[]
-
An array of the CSS files to use with this widget.
Type:
- object[]
- Default Value:
- [{cssFile:"./css/Picker.css"}]
- Source:
-
currentPickerDepth :number
-
Keeps track of the current picker depth. When a new picker is added it will be given the current depth which will then be incremented. When a picker requests a another picker be added it should include the depth within the request so that deeper pickers (that are no longer relevant) are removed.
Type:
- number
- Default Value:
- 0
- Source:
-
currentPickers :object[]
-
Used to keep track of the current pickers that are displayed. When a new picker is added it will be added at a depth that is greater than the requesting picker. This means that "deeper" pickers must be destroyed and this is the object that will be referenced to determine which pickers are destroyed
Type:
- object[]
- Default Value:
- null
- Source:
-
generatePubSubScope :boolean
-
Override the default widget behaviour to generate a pubSubScope.
Type:
- boolean
- Default Value:
- true
- Source:
-
i18nRequirements :Array
-
An array of the i18n files to use with this widget.
Type:
- Array
- Source:
-
name :string
-
It is necessary to provide a name attribute so that the data returned from getValue will be mapped to an attribute when used in a form.
Type:
- string
- Default Value:
- "pickedItems"
- Source:
-
pickedItemsLabel :string
-
This is the label to display above the picked items.
Type:
- string
- Default Value:
- "picker.pickedItems.label"
- Source:
-
publishOnReady :object
-
An array of publications that will be published when the picker is ready. By default there are none specified.
Type:
- object
- Since:
- 1.0.85
- Default Value:
- null
- Source:
-
repoNodeRef :string
-
This should be set to the NodeRef to be used to represent the root of the Repository. By default this is "alfresco://company/home" but can be configured to be any other value. This value is used as the root location for the Repository root picker.
Type:
- string
- Default Value:
- "alfresco://company/home"
- Source:
-
showPickedItems :boolean
-
This boolean variable should be set to true when the picked items model should be shown and set to false when it shouldn't. Showing picked items is useful for documents but not necessarily for selecting a single folder. It will ensure that the widgetsForPickedItems model is rendered.
Type:
- boolean
- Default Value:
- true
- Source:
-
subPickersLabel :string
-
This is the label to display above the picker.
Type:
- string
- Default Value:
- "picker.subPickers.label"
- Source:
-
templateString :String
-
The HTML template to use for the widget.
Type:
- String
- Source:
-
widgetsForPickedItems :object
-
This is the widget model for displaying picked items. It will only be displayed when requested.
Type:
- object
- Source:
-
widgetsForRootPicker :object
-
The default widgets for the picker. This can be overridden at instantiation based on what is required to be displayed in the picker.
Type:
- object
- Source:
Methods
-
addPicker(payload)
-
Handles a request to add another picker.
Parameters:
Name Type Description payload
object - Source:
-
allWidgetsProcessed(widgets)
-
Publish a request to resize dialogs after new widgets are processed. There is no guarantee that this instance will be in a dialog but if it is then this will ensure that the dialog is resized to contain the new pickers. TODO: Should this be a more abstract "resize" topic?
Parameters:
Name Type Description widgets
object[] The instantiated widgets. - Source:
-
getValue() → {object[]}
-
Returns an array of the selected item objects.
- Source:
Returns:
The picked items- Type
- object[]
-
postCreate()
-
- Source: