Class MultiPickerItem
- All Implemented Interfaces:
HasHandlers
,HasBlurHandlers
,HasChangedHandlers
,HasChangeHandlers
,HasClickHandlers
,HasDoubleClickHandlers
,HasEditorEnterHandlers
,HasEditorExitHandlers
,HasFocusHandlers
,HasIconClickHandlers
,HasIconKeyPressHandlers
,HasItemHoverHandlers
,HasKeyDownHandlers
,HasKeyPressHandlers
,HasKeyUpHandlers
,HasPendingStatusChangedHandlers
,HasPickerIconClickHandlers
,HasShowContextMenuHandlers
,HasTitleClickHandlers
,HasTitleDoubleClickHandlers
,HasTitleHoverHandlers
,HasValueHoverHandlers
,HasValueIconClickHandlers
- Direct Known Subclasses:
SetFilterItem
MultiPickerItem is a compact editor for this purpose,
using a pop-up
to present a Shuttle
-style interface for moving records or values being different categories. When
the MultiPickerItem pop-up is not active, MultiPickerItem just displays the currently chosen values as read-only text,
which can be clipped
to appear in a very
small space.
Note: if your use case is a search interface to generate criteria, in either the
FilterEditor of a ListGrid/TreeGrid, or in a SearchForm, SetFilterItem is the right choice. Generally, use
SetFilterItem for searching, and MultiPickerItem (or Shuttle
) for editing.
To configure a MultiPickerItem, provide either an optionDataSource or a valueMap. The value
stored by a MultiPickerItem is the set of selected
items, as either a list of primary key values
if an
optionDataSource is used, or as just ID values if an valueMap is used.
The item's picker-component can be
customized via settings such as sortField
,
or by configuring auto-children
like the search-form
, the main pickList-grid
or the separate list of selected values
. You can use optionFilterContext
to apply custom
requestProperties
to fetches from the main pickList
grid.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.smartgwt.client.widgets.form.fields.FormItem
FormItem.CustomStateGetter, FormItem.StateCustomizer
-
Field Summary
Fields inherited from class com.smartgwt.client.widgets.form.fields.FormItem
configOnly, scClassName, warnOnEditorTypeConversion, warnOnEditorTypeConversionDefault
Fields inherited from class com.smartgwt.client.core.RefDataClass
id
Fields inherited from class com.smartgwt.client.core.DataClass
factoryCreated, factoryProperties
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
changeAutoChildDefaults
(String autoChildName, Canvas defaults) Changes the defaults for Canvas AutoChildren namedautoChildName
.static void
changeAutoChildDefaults
(String autoChildName, FormItem defaults) Changes the defaults for FormItem AutoChildren namedautoChildName
.static void
changePickerIconDefaults
(FormItemIcon defaults) Should we show anexpansionIcon
expand button allowing the user to show an expanded view of thepickList
with multiple fields.For multiPickerItems withselectionStyle:"pickTree"
, should the user be able to select and deselect folders?For multiPickerItems withselectionStyle:"pickTree"
, andcanSelectFolders:true
, shouldTreeGrid.cascadeSelection
be enabled on our pickTree?SCImgURL
for theexpansionIcon
while in expanded modeIf this MultiPickerItem is deriving its options from a dataSource, should it ensure unique field values bygrouping by
the value field for this item? This is not necessary if the target dataSource value field is already unique - for example if this is the primaryKey field for a dataSource.Clear All buttoncom.smartgwt.client.types.AutoChild
Title for thedeselectAllButton
Disabled prompt for thedeselectAllButton
while filtered ifselectAllWhileFiltered
is set to"disable"
.Disabled prompt for thedeselectAllButton
while filtered ifselectAllWhileFiltered
is set to"whenLoaded"
and the PickList does not have a complete data set loaded on the client.If set, this item will display a value from another field to the user instead of showing the underlying data value for thefield name
.SCImgURL
for theexpansionIcon
while not in expanded modeHeight for thepickerLayout
in expanded mode whencanExpand
is trueAutomatically generated expand / collapse icon whencanExpand
is trueWidth for thepickerLayout
in expanded mode whencanExpand
is trueDynamic form showing a single text item for filtering the PickList whileSelectionStyle
is "pickList".Hint
for thefilterForm
text item.Automatically generated right-aligned inline filter indicator icon for thefilterForm
text box.height
for thefilterIcon
src
for thefilterIcon
width
for thefilterIcon
boolean
ShouldfilterOnKeypress
be active for the pickList?For multiPickerItems withselectionStyle:"pickTree"
, andcanSelectFolders:true
, should selected parent nodes be included in the item's value?Initial sort specifiers
for this item's list of options.MultiPickerItems always work with array valuesIf this MultiPickerItem is deriving its options from a dataSource, this property allows developers to specify criteria for the fetch.If set, this FormItem will map stored values to display values as though acom.smartgwt.client.types.ValueMap
were specified, by fetching records from the specifiedoptionDataSource
and extracting thevalueField
anddisplayField
in loaded records, to derive one valueMap entry per record loaded from the optionDataSource.If this item has a specifiedoptionDataSource
, and this property is not null, the context is passed to the dataSource asRPCRequest
properties when performing fetch operations on the dataSource to obtain a data-value to display-value mapping, and when fetching for grid-based pickers.If this item has a specifiedoptionDataSource
, this attribute may be set to specify an explicitDSRequest.operationId
when performing a fetch against the option dataSource to pick up display value mapping.static MultiPickerItem
getOrCreateRef
(JavaScriptObject jsObj) Main dropdown picker layout containing the PickList orShuttle
.The MultiPickerItempickList
is a filterable ListGridcom.smartgwt.client.types.AutoChild
for viewing and selecting the list of available options whenSelectionStyle
is"pickList"
.IffilterPickListOnKeypress
is true, how long to wait in ms after the last keystroke from a user before filtering the pickList.The MultiPickerItempickTree
is a TreeGridcom.smartgwt.client.types.AutoChild
for viewing and selecting a tree of available options whenSelectionStyle
is"pickTree"
.Select All buttoncom.smartgwt.client.types.AutoChild
Title for theselectAllButton
If the user has filtered the set of options available in this item, how should the "Select All" and "Clear All" buttons work?Disabled prompt for theselectAllButton
while filtered ifselectAllWhileFiltered
is set to"disable"
.Disabled prompt for theselectAllButton
while filtered ifselectAllWhileFiltered
is set to"whenLoaded"
and the PickList does not have a complete data set loaded on the client.Default title for theselectionList
.Automatically generated ListGrid displaying the current selection forselectionStyle:"pickList"
.AutoChild to show theselectedSelectionListTitle
Should the MultiPickerItem use aShuttle
style interface to indicate the currently selected / unselected values?boolean
Should thefilterForm
be shown?Sort direction
for this item's list of options.Sort field
for this item's list of options.Sort field
for this item's list of options.String[]
Sort field
for this item's list of options.textMatchStyle to apply tooption criteria
for this itemIf this form item maps data values to display values by retrieving theFormItem.displayField
values from anoptionDataSource
, this property denotes the the field to use as the underlying data value in records from the optionDataSource.
If not explicitly supplied, the valueField name will be derived as described inFormItem.getValueFieldName()
.Getter method to retrieve theFormItem.valueField
for this item.setCanExpand
(Boolean canExpand) Should we show anexpansionIcon
expand button allowing the user to show an expanded view of thepickList
with multiple fields.setCanSelectFolders
(Boolean canSelectFolders) For multiPickerItems withselectionStyle:"pickTree"
, should the user be able to select and deselect folders?setCascadeSelection
(Boolean cascadeSelection) For multiPickerItems withselectionStyle:"pickTree"
, andcanSelectFolders:true
, shouldTreeGrid.cascadeSelection
be enabled on our pickTree?setCollapseIconSrc
(String collapseIconSrc) SCImgURL
for theexpansionIcon
while in expanded modestatic void
setDefaultProperties
(MultiPickerItem multiPickerItemProperties) Class level method to set the default properties of this class.setDeriveUniqueValues
(Boolean deriveUniqueValues) If this MultiPickerItem is deriving its options from a dataSource, should it ensure unique field values bygrouping by
the value field for this item? This is not necessary if the target dataSource value field is already unique - for example if this is the primaryKey field for a dataSource.setDeselectAllButtonTitle
(String deselectAllButtonTitle) Title for thedeselectAllButton
setDeselectAllWhileFiltered_disabledPrompt
(String deselectAllWhileFiltered_disabledPrompt) Disabled prompt for thedeselectAllButton
while filtered ifselectAllWhileFiltered
is set to"disable"
.setDeselectAllWhileFiltered_partialCachePrompt
(String deselectAllWhileFiltered_partialCachePrompt) Disabled prompt for thedeselectAllButton
while filtered ifselectAllWhileFiltered
is set to"whenLoaded"
and the PickList does not have a complete data set loaded on the client.setDisplayField
(String displayField) If set, this item will display a value from another field to the user instead of showing the underlying data value for thefield name
.setExpandedPickListFields
(ListGridField... expandedPickListFields) setExpandIconSrc
(String expandIconSrc) SCImgURL
for theexpansionIcon
while not in expanded modesetExpansionHeight
(Integer expansionHeight) Height for thepickerLayout
in expanded mode whencanExpand
is truesetExpansionWidth
(Integer expansionWidth) Width for thepickerLayout
in expanded mode whencanExpand
is truesetFilterHint
(String filterHint) Hint
for thefilterForm
text item.setFilterIconHeight
(Integer filterIconHeight) height
for thefilterIcon
setFilterIconSrc
(String filterIconSrc) src
for thefilterIcon
setFilterIconWidth
(Integer filterIconWidth) width
for thefilterIcon
setFilterPickListOnKeypress
(boolean filterPickListOnKeypress) ShouldfilterOnKeypress
be active for the pickList?setIncludeSelectedParents
(Boolean includeSelectedParents) For multiPickerItems withselectionStyle:"pickTree"
, andcanSelectFolders:true
, should selected parent nodes be included in the item's value?setInitialSort
(SortSpecifier... initialSort) Initial sort specifiers
for this item's list of options.setMultiple
(Boolean multiple) MultiPickerItems always work with array valuesvoid
setOptionCriteria
(Criteria optionCriteria) If this MultiPickerItem is deriving its options from a dataSource, this property allows developers to specify criteria for the fetch.setOptionDataSource
(DataSource optionDataSource) If set, this FormItem will map stored values to display values as though acom.smartgwt.client.types.ValueMap
were specified, by fetching records from the specifiedoptionDataSource
and extracting thevalueField
anddisplayField
in loaded records, to derive one valueMap entry per record loaded from the optionDataSource.setOptionFilterContext
(DSRequest optionFilterContext) If this item has a specifiedoptionDataSource
, and this property is not null, the context is passed to the dataSource asRPCRequest
properties when performing fetch operations on the dataSource to obtain a data-value to display-value mapping, and when fetching for grid-based pickers.setOptionOperationId
(String optionOperationId) If this item has a specifiedoptionDataSource
, this attribute may be set to specify an explicitDSRequest.operationId
when performing a fetch against the option dataSource to pick up display value mapping.setPickListFetchDelay
(Integer pickListFetchDelay) IffilterPickListOnKeypress
is true, how long to wait in ms after the last keystroke from a user before filtering the pickList.setPickListHeight
(Integer pickListHeight) setPickListWidth
(Integer pickListWidth) setSelectAllButtonTitle
(String selectAllButtonTitle) Title for theselectAllButton
setSelectAllWhileFiltered
(FilteredSelectAllAction selectAllWhileFiltered) If the user has filtered the set of options available in this item, how should the "Select All" and "Clear All" buttons work?setSelectAllWhileFiltered_disabledPrompt
(String selectAllWhileFiltered_disabledPrompt) Disabled prompt for theselectAllButton
while filtered ifselectAllWhileFiltered
is set to"disable"
.setSelectAllWhileFiltered_partialCachePrompt
(String selectAllWhileFiltered_partialCachePrompt) Disabled prompt for theselectAllButton
while filtered ifselectAllWhileFiltered
is set to"whenLoaded"
and the PickList does not have a complete data set loaded on the client.setSelectedSelectionListTitle
(String selectedSelectionListTitle) Default title for theselectionList
.setSelectionStyle
(MultiPickerSelectionStyle selectionStyle) Should the MultiPickerItem use aShuttle
style interface to indicate the currently selected / unselected values?setShowFilterForm
(boolean showFilterForm) Should thefilterForm
be shown?setShowSelectionLabel
(Boolean showSelectionLabel) setShowSelectionList
(Boolean showSelectionList) setShuttleHeight
(Integer shuttleHeight) setShuttleWidth
(Integer shuttleWidth) setSortDirection
(SortDirection sortDirection) Sort direction
for this item's list of options.setSortField
(Integer sortField) Sort field
for this item's list of options.setSortField
(String sortField) Sort field
for this item's list of options.setSortField
(String... sortField) Sort field
for this item's list of options.setTextMatchStyle
(TextMatchStyle textMatchStyle) textMatchStyle to apply tooption criteria
for this itemsetValueField
(String valueField) If this form item maps data values to display values by retrieving theFormItem.displayField
values from anoptionDataSource
, this property denotes the the field to use as the underlying data value in records from the optionDataSource.
If not explicitly supplied, the valueField name will be derived as described inFormItem.getValueFieldName()
.Methods inherited from class com.smartgwt.client.widgets.form.fields.StaticTextItem
getApplyAlignToText, getApplyHeightToTextBox, getCanSelectText, getClipValue, getDateFormatter, getDefaultValue, getEditProxyConstructor, getEscapeHTML, getTextBoxStyle, getWrap, setApplyAlignToText, setApplyHeightToTextBox, setCanSelectText, setClipValue, setDateFormatter, setDefaultProperties, setEditProxyConstructor, setEscapeHTML, setTextBoxStyle, setWrap
Methods inherited from class com.smartgwt.client.widgets.form.fields.FormItem
_getValue, addBlurHandler, addChangedHandler, addChangeHandler, addClickHandler, addDoubleClickHandler, addEditorEnterHandler, addEditorExitHandler, addFocusHandler, addIcon, addIcon, addIconClickHandler, addIconKeyPressHandler, addItemHoverHandler, addKeyDownHandler, addKeyPressHandler, addKeyUpHandler, addPendingStatusChangedHandler, addPickerIconClickHandler, addShowContextMenuHandler, addTitleClickHandler, addTitleDoubleClickHandler, addTitleHoverHandler, addValueHoverHandler, addValueIconClickHandler, applyFormula, asSGWTComponent, blurItem, canEditCriterion, checkFormItemType, clearErrors, clearValue, disable, disableIcon, enable, enableIcon, error, error, errorIfNotCreated, focusAfterItem, focusInItem, getAccessKey, getAlign, getAllowExpressions, getAlwaysFetchMissingValues, getAlwaysShowControlBox, getAriaRole, getAttribute, getAttributeAsBoolean, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsFloat, getAttributeAsInt, getAttributeAsJavaScriptObject, getAttributeAsObject, getAttributeAsString, getAutoComplete, getAutoCompleteKeywords, getBrowserInputType, getBrowserSpellCheck, getCanEdit, getCanEditOpaqueValues, getCanFocus, getCanHover, getCanTabToIcons, getCanvasAutoChild, getCellHeight, getCellStyle, getChangeOnKeypress, getClassName, getClipStaticValue, getClipTitle, getConfig, getContainerWidget, getControlStyle, getCriteriaField, getCriterion, getCriterion, getCursorPosition, getCustomState, getDataPath, getDecimalPad, getDecimalPrecision, getDefaultIconSrc, getDefaultOperator, getDestroyed, getDisabled, getDisabledHover, getDisableIconsOnReadOnly, getDisplayFieldName, getDisplayValue, getDisplayValue, getEditorTypeConfig, getEditPendingCSSText, getEmptyDisplayValue, getEmptyValueIcon, getEndRow, getErrorIconHeight, getErrorIconProperties, getErrorIconSrc, getErrorIconWidth, getErrorMessageWidth, getErrors, getExportFormat, getFetchMissingValues, getFieldName, getFilterLocally, getForeignDisplayField, getForm, getFormat, getFormItemAutoChild, getFormula, getFullDataPath, getGlobalTabIndex, getGridColNum, getGridRowNum, getHeight, getHeightAsString, getHidden, getHint, getHintStyle, getHoverAlign, getHoverDelay, getHoverFocusKey, getHoverHeight, getHoverHeightAsString, getHoverOpacity, getHoverPersist, getHoverStyle, getHoverVAlign, getHoverWidth, getHoverWidthAsString, getIcon, getIconBaseStyle, getIconHeight, getIconHSpace, getIconPageRect, getIconPrompt, getIconRect, getIcons, getIconTabPosition, getIconVAlign, getIconWidth, getID, getImageURLPrefix, getImageURLSuffix, getImplicitSave, getImplicitSaveOnBlur, getInputFormat, getLeft, getLinearColSpan, getLinearColSpanAsString, getLinearEndRow, getLinearEndRowAsString, getLinearStartRow, getLinearStartRowAsString, getLinearWidth, getLinearWidthAsString, getListGrid, getLoadingDisplayValue, getLocateItemBy, getMinHintWidth, getMultipleValueSeparator, getName, getNullOriginalValueText, getOperator, getOptionDataSourceAsString, getOptionTextMatchStyle, getOriginalValueMessage, getPageLeft, getPageRect, getPageTop, getPaletteDefaults, getPicker, getPickerIcon, getPickerIcon, getPickerIconHeight, getPickerIconName, getPickerIconPrompt, getPickerIconProperties, getPickerIconSrc, getPickerIconStyle, getPickerIconTabPosition, getPickerIconWidth, getPixelHeight, getPixelWidth, getPrintReadOnlyTextBoxStyle, getPrintTextBoxStyle, getPrintTitleStyle, getPrompt, getReadOnlyCanSelectText, getReadOnlyControlStyle, getReadOnlyDisplay, getReadOnlyHover, getReadOnlyTextBoxStyle, getReadOnlyWhen, getRect, getRedrawOnChange, getRejectInvalidValueOnChange, getRequired, getRequiredMessage, getRequiredWhen, getRowSpan, getSaveOnEnter, getScClassName, getSelectedRecord, getSelectOnClick, getSelectOnFocus, getShouldSaveValue, getShowClippedTitleOnHover, getShowClippedValueOnHover, getShowDeletions, getShowDisabled, getShowDisabledIconsOnFocus, getShowDisabledPickerIconOnFocus, getShowErrorIcon, getShowErrorIconInline, getShowErrorStyle, getShowErrorText, getShowFocused, getShowFocusedErrorState, getShowFocusedIcons, getShowFocusedPickerIcon, getShowHint, getShowIcons, getShowIconsOnFocus, getShowImageAsURL, getShowOldValueInHover, getShowOver, getShowOverIcons, getShowPending, getShowPickerIcon, getShowPickerIconOnFocus, getShowRTL, getShowTitle, getShowValueIconOnly, getStartRow, getStaticHeight, getStopOnError, getStoreDisplayValues, getSupportsCutPasteEvents, getSuppressValueIcon, getSynchronousValidation, getTabIndex, getTextAlign, getTextFormula, getTimeFormatter, getTitle, getTitleAlign, getTitleColSpan, getTitleOrientation, getTitleStyle, getTitleVAlign, getTooltip, getTop, getType, getUpdateControlOnOver, getUpdatePickerIconOnOver, getUpdateTextBoxOnOver, getUseAdvancedCriteria, getUseDisabledHintStyleForReadOnly, getUseLocalDisplayFieldValue, getValidateOnChange, getValidateOnExit, getValidOperators, getVAlign, getValue, getValueAsFloat, getValueAsInteger, getValueAsLong, getValueAsRecordList, getValueDeselectedCSSText, getValueIconHeight, getValueIconLeftPadding, getValueIconRightPadding, getValueIconSize, getValueIconWidth, getValueMap, getValueMapAsArray, getVisible, getVisibleHeight, getVisibleTitleWidth, getVisibleWhen, getVisibleWidth, getWarnOnEditorTypeConversion, getWarnOnEditorTypeConversionDefault, getWidth, getWidthAsString, getWrapHintText, getWrapStaticValue, getWrapTitle, handleWarnOnEditorTypeConversion, hasAdvancedCriteria, hasErrors, hide, hideIcon, invalidateDisplayValueCache, isAssignableFrom, isConfigOnly, isCreated, isCutEvent, isDisabled, isDrawn, isFocused, isInGrid, isPasteEvent, isVisible, linkToInstanceUponCreate, mapDisplayToValue, mapValueToDisplay, mapValueToDisplay, mapValueToDisplay, redraw, redraw, removeIcon, selectedRecordChanged, setAccessKey, setAlign, setAllowExpressions, setAlwaysFetchMissingValues, setAlwaysShowControlBox, setAriaRole, setAriaState, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAutoChildConstructor, setAutoChildProperties, setAutoChildProperties, setAutoChildProperties, setAutoChildVisibility, setAutoComplete, setAutoCompleteKeywords, setBrowserInputType, setBrowserSpellCheck, setCanEdit, setCanEditCriterionPredicate, setCanEditOpaqueValues, setCanFocus, setCanHover, setCanTabToIcons, setCellHeight, setCellStyle, setChangeOnKeypress, setClipStaticValue, setClipTitle, setColSpan, setColSpan, setConfigOnly, setControlStyle, setCriteriaField, setCriterion, setCriterionGetter, setCriterionSetter, setCustomStateGetter, setDataPath, setDecimalPad, setDecimalPrecision, setDefaultIconSrc, setDefaultOperator, setDefaultProperties, setDefaultValue, setDefaultValue, setDefaultValue, setDefaultValue, setDefaultValue, setDefaultValue, setDefaultValue, setDisabled, setDisabledHover, setDisableIconsOnReadOnly, setDisplayFormat, setDisplayFormat, setEditorProperties, setEditorType, setEditorType, setEditorType, setEditorValueFormatter, setEditorValueParser, setEditPendingCSSText, setEmptyDisplayValue, setEmptyValueIcon, setEndRow, setErrorFormatter, setErrorIconHeight, setErrorIconProperties, setErrorIconSrc, setErrorIconWidth, setErrorMessageWidth, setErrorOrientation, setErrors, setErrors, setExportFormat, setFetchMissingValues, setFilterLocally, setForeignDisplayField, setFormat, setFormula, setGlobalTabIndex, setHeight, setHeight, setHidden, setHint, setHintStyle, setHoverAlign, setHoverDelay, setHoverFocusKey, setHoverHeight, setHoverHeight, setHoverOpacity, setHoverPersist, setHoverStyle, setHoverVAlign, setHoverWidth, setHoverWidth, setIconBaseStyle, setIconDisabled, setIconHeight, setIconHSpace, setIconPrompt, setIcons, setIconShowOnFocus, setIconVAlign, setIconWidth, setID, setImageURLPrefix, setImageURLSuffix, setImplicitSave, setImplicitSaveOnBlur, setInitHandler, setInputFormat, setInputTransformer, setItemHoverFormatter, setItemTitleHoverFormatter, setItemValueHoverFormatter, setJavaScriptObject, setLeft, setLinearColSpan, setLinearColSpan, setLinearEndRow, setLinearEndRow, setLinearStartRow, setLinearStartRow, setLinearWidth, setLinearWidth, setLoadingDisplayValue, setLocateItemBy, setMinHintWidth, setMultipleValueSeparator, setName, setNullOriginalValueText, setNullProperty, setOperator, setOptionDataSource, setOptionFilterContext, setOptionTextMatchStyle, setOriginalValueMessage, setPickerIconHeight, setPickerIconName, setPickerIconPrompt, setPickerIconProperties, setPickerIconSrc, setPickerIconStyle, setPickerIconWidth, setPrintReadOnlyTextBoxStyle, setPrintTextBoxStyle, setPrintTitleStyle, setPrompt, setProperty, setProperty, setProperty, setProperty, setProperty, setReadOnlyCanSelectText, setReadOnlyControlStyle, setReadOnlyDisplay, setReadOnlyHover, setReadOnlyTextBoxStyle, setReadOnlyWhen, setRedrawOnChange, setRejectInvalidValueOnChange, setRequired, setRequiredMessage, setRequiredWhen, setRowSpan, setSaveOnEnter, setScClassName, setSelectOnClick, setSelectOnFocus, setShouldSaveValue, setShowClippedTitleOnHover, setShowClippedValueOnHover, setShowDeletions, setShowDisabled, setShowDisabledIconsOnFocus, setShowDisabledPickerIconOnFocus, setShowErrorIcon, setShowErrorIconInline, setShowErrorStyle, setShowErrorText, setShowFocused, setShowFocusedErrorState, setShowFocusedIcons, setShowFocusedPickerIcon, setShowHint, setShowIcons, setShowIconsOnFocus, setShowIfCondition, setShowImageAsURL, setShowOldValueInHover, setShowOver, setShowOverIcons, setShowPending, setShowPickerIcon, setShowPickerIconOnFocus, setShowRTL, setShowTitle, setShowValueIconOnly, setStartRow, setStateCustomizer, setStaticHeight, setStopOnError, setStoreDisplayValues, setSupportsCutPasteEvents, setSuppressValueIcon, setSynchronousValidation, setTabIndex, setTextAlign, setTextFormula, setTimeFormatter, setTitle, setTitleAlign, setTitleColSpan, setTitleHoverFormatter, setTitleOrientation, setTitleStyle, setTitleVAlign, setTooltip, setTop, setType, setUpdateControlOnOver, setUpdatePickerIconOnOver, setUpdateTextBoxOnOver, setUseAdvancedCriteria, setUseDisabledHintStyleForReadOnly, setUseLocalDisplayFieldValue, setUseObjectFactoryForTypeFallback, setValidateOnChange, setValidateOnExit, setValidators, setValidOperators, setVAlign, setValue, setValue, setValue, setValue, setValue, setValue, setValueDeselectedCSSText, setValueFormatter, setValueHoverFormatter, setValueIconHeight, setValueIconLeftPadding, setValueIconMapper, setValueIconRightPadding, setValueIcons, setValueIconSize, setValueIconWidth, setValueMap, setValueMap, setVisible, setVisibleWhen, setWarnOnEditorTypeConversion, setWarnOnEditorTypeConversionDefault, setWidth, setWidth, setWrapHintText, setWrapStaticValue, setWrapTitle, shouldApplyHeightToTextBox, shouldFetchMissingValue, shouldSaveOnEnter, shouldStopKeyPressBubbling, show, showIcon, showPicker, stopHover, storeValue, storeValue, updateState, validate, valueClipped
Methods inherited from class com.smartgwt.client.data.Field
getCanExport, getExportTitle, getSortByField, setCanExport, setExportTitle, setSortByField
Methods inherited from class com.smartgwt.client.core.RefDataClass
getRef, getRef, internalSetID
Methods inherited from class com.smartgwt.client.core.DataClass
applyFactoryProperties, doAddHandler, fireEvent, getAttributeAsDoubleArray, getAttributeAsElement, getAttributeAsIntArray, getAttributeAsLong, getAttributeAsMap, getAttributeAsObject, getAttributeAsRecord, getAttributeAsStringArray, getAttributes, getHandlerCount, isFactoryCreated, setAttribute, setAttribute, setAttribute, setAttributeAsJavaObject, setFactoryCreated
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
-
Constructor Details
-
MultiPickerItem
public MultiPickerItem() -
MultiPickerItem
-
MultiPickerItem
-
-
Method Details
-
getOrCreateRef
-
changeAutoChildDefaults
Changes the defaults for Canvas AutoChildren namedautoChildName
.- Parameters:
autoChildName
- name of an AutoChild to customize the defaults for.defaults
- Canvas defaults to apply. These defaults override any existing properties without destroying or wiping out non-overridden properties. For usage tips on this param, seeSGWTProperties
.- See Also:
-
changeAutoChildDefaults
Changes the defaults for FormItem AutoChildren namedautoChildName
.- Parameters:
autoChildName
- name of an AutoChild to customize the defaults for.defaults
- FormItem defaults to apply. These defaults override any existing properties without destroying or wiping out non-overridden properties. For usage tips on this param, seeSGWTProperties
.- See Also:
-
changePickerIconDefaults
-
setCanExpand
Should we show anexpansionIcon
expand button allowing the user to show an expanded view of thepickList
with multiple fields.canExpand
only applies to MultiPickerItems with selectionStyle set to "pickList" or "pickTree" and an explicitly specified set ofexpandedPickListFields
to display within the expanded view.- Parameters:
canExpand
- New canExpand value. Default value is true- Returns:
MultiPickerItem
instance, for chaining setter calls
-
getCanExpand
Should we show anexpansionIcon
expand button allowing the user to show an expanded view of thepickList
with multiple fields.canExpand
only applies to MultiPickerItems with selectionStyle set to "pickList" or "pickTree" and an explicitly specified set ofexpandedPickListFields
to display within the expanded view.- Returns:
- Current canExpand value. Default value is true
-
setCanSelectFolders
For multiPickerItems withselectionStyle:"pickTree"
, should the user be able to select and deselect folders?If false, selection checkboxes will only be visible by leaf nodes within the pickTree data set.
Note that this flag may be set to true in conjunction with
includeSelectedParents:false
. In this case the user may check and uncheck parent nodes as a convenient way to select or unselect all their children due tocascading selection
, but the parent nodes themselves won't be present in the item's value.- Parameters:
canSelectFolders
- New canSelectFolders value. Default value is true- Returns:
MultiPickerItem
instance, for chaining setter calls
-
getCanSelectFolders
For multiPickerItems withselectionStyle:"pickTree"
, should the user be able to select and deselect folders?If false, selection checkboxes will only be visible by leaf nodes within the pickTree data set.
Note that this flag may be set to true in conjunction with
includeSelectedParents:false
. In this case the user may check and uncheck parent nodes as a convenient way to select or unselect all their children due tocascading selection
, but the parent nodes themselves won't be present in the item's value.- Returns:
- Current canSelectFolders value. Default value is true
-
setCascadeSelection
For multiPickerItems withselectionStyle:"pickTree"
, andcanSelectFolders:true
, shouldTreeGrid.cascadeSelection
be enabled on our pickTree?- Parameters:
cascadeSelection
- New cascadeSelection value. Default value is true- Returns:
MultiPickerItem
instance, for chaining setter calls
-
getCascadeSelection
For multiPickerItems withselectionStyle:"pickTree"
, andcanSelectFolders:true
, shouldTreeGrid.cascadeSelection
be enabled on our pickTree?- Returns:
- Current cascadeSelection value. Default value is true
-
setCollapseIconSrc
SCImgURL
for theexpansionIcon
while in expanded mode- Parameters:
collapseIconSrc
- New collapseIconSrc value. Default value is "[SKINIMG]/actions/collapse_left.png"- Returns:
MultiPickerItem
instance, for chaining setter calls
-
getCollapseIconSrc
SCImgURL
for theexpansionIcon
while in expanded mode- Returns:
- Current collapseIconSrc value. Default value is "[SKINIMG]/actions/collapse_left.png"
-
setDeriveUniqueValues
If this MultiPickerItem is deriving its options from a dataSource, should it ensure unique field values bygrouping by
the value field for this item? This is not necessary if the target dataSource value field is already unique - for example if this is the primaryKey field for a dataSource.Note that for MultiPickerItems with
deriveUniqueValues:true
, anyexpandedPickListFields
to be displayed in theexpanded view
will not be able to display meaningful values unless asummaryFunction
is supplied to produce aggregated values from the grouped data. This may be achieved by specifying summaryFunctions directly on theoptionFilterContext
, or on theoperationBinding
for thefetch operation
.Note : This is an advanced setting
- Parameters:
deriveUniqueValues
- New deriveUniqueValues value. Default value is false- Returns:
MultiPickerItem
instance, for chaining setter calls
-
getDeriveUniqueValues
If this MultiPickerItem is deriving its options from a dataSource, should it ensure unique field values bygrouping by
the value field for this item? This is not necessary if the target dataSource value field is already unique - for example if this is the primaryKey field for a dataSource.Note that for MultiPickerItems with
deriveUniqueValues:true
, anyexpandedPickListFields
to be displayed in theexpanded view
will not be able to display meaningful values unless asummaryFunction
is supplied to produce aggregated values from the grouped data. This may be achieved by specifying summaryFunctions directly on theoptionFilterContext
, or on theoperationBinding
for thefetch operation
.- Returns:
- Current deriveUniqueValues value. Default value is false
-
getDeselectAllButton
Clear All buttoncom.smartgwt.client.types.AutoChild
This component is an AutoChild named "deselectAllButton". For an overview of how to use and configure AutoChildren, see
Using AutoChildren
.- Returns:
- Current deselectAllButton value. Default value is null
-
setDeselectAllButtonTitle
Title for thedeselectAllButton
- Parameters:
deselectAllButtonTitle
- New deselectAllButtonTitle value. Default value is "Clear All"- Returns:
MultiPickerItem
instance, for chaining setter calls
-
getDeselectAllButtonTitle
Title for thedeselectAllButton
- Returns:
- Current deselectAllButtonTitle value. Default value is "Clear All"
-
setDeselectAllWhileFiltered_disabledPrompt
public MultiPickerItem setDeselectAllWhileFiltered_disabledPrompt(String deselectAllWhileFiltered_disabledPrompt) Disabled prompt for thedeselectAllButton
while filtered ifselectAllWhileFiltered
is set to"disable"
.- Parameters:
deselectAllWhileFiltered_disabledPrompt
- New deselectAllWhileFiltered_disabledPrompt value. Default value is "Clear All disabled while filtered"- Returns:
MultiPickerItem
instance, for chaining setter calls
-
getDeselectAllWhileFiltered_disabledPrompt
Disabled prompt for thedeselectAllButton
while filtered ifselectAllWhileFiltered
is set to"disable"
.- Returns:
- Current deselectAllWhileFiltered_disabledPrompt value. Default value is "Clear All disabled while filtered"
-
setDeselectAllWhileFiltered_partialCachePrompt
public MultiPickerItem setDeselectAllWhileFiltered_partialCachePrompt(String deselectAllWhileFiltered_partialCachePrompt) Disabled prompt for thedeselectAllButton
while filtered ifselectAllWhileFiltered
is set to"whenLoaded"
and the PickList does not have a complete data set loaded on the client.- Parameters:
deselectAllWhileFiltered_partialCachePrompt
- New deselectAllWhileFiltered_partialCachePrompt value. Default value is "Unable to Clear All as the full set of options has not been fetched from the server."- Returns:
MultiPickerItem
instance, for chaining setter calls
-
getDeselectAllWhileFiltered_partialCachePrompt
Disabled prompt for thedeselectAllButton
while filtered ifselectAllWhileFiltered
is set to"whenLoaded"
and the PickList does not have a complete data set loaded on the client.- Returns:
- Current deselectAllWhileFiltered_partialCachePrompt value. Default value is "Unable to Clear All as the full set of options has not been fetched from the server."
-
setDisplayField
If set, this item will display a value from another field to the user instead of showing the underlying data value for thefield name
.This property is used in two ways:
The item will display the displayField value from the
record currently being edited
ifFormItem.useLocalDisplayFieldValue
is true, (or if unset and the conditions outlined in the documentation for that property are met).If this field has an
FormItem.optionDataSource
, this property is used by default to identify which value to use as a display value in records from this related dataSource. In this usage the specified displayField must be explicitly defined in the optionDataSource to be used - seegetDisplayFieldName()
for more on this behavior.
If not usinglocal display values
, the display value for this item will be derived by performing a fetch against theoption dataSource
to find a record where thevalue field
matches this item's value, and use thedisplayField
value from that record.
In addition to this, PickList-based form items that provide a list of possible options such as theSelectItem
orComboBoxItem
will show thedisplayField
values to the user by default, allowing them to choose a new data value (seeFormItem.valueField
) from a list of user-friendly display values.This essentially allows the specified
optionDataSource
to be used as a server basedvalueMap
.If
local display values
are being used andFormItem.storeDisplayValues
is true, selecting a new value will update both the value for this field and the associated display-field value on the record being edited.Note: Developers may specify the
FormItem.foreignDisplayField
property in addition todisplayField
. This is useful for cases where the display field name in the local dataSource differs from the display field name in the optionDataSource. See the documentation forDataSourceField.foreignDisplayField
for more on this.
If a foreignDisplayField is specified, as with just displayField, iflocal display values
are being used andFormItem.storeDisplayValues
is true, when the user chooses a value the associated display-field value on the record being edited will be updated. In this case it would be set to the foreignDisplayField value from the related record. This means foreignDisplayField is always expected to be set to the equivalent field in the related dataSources.
Developers looking to display some other arbitrary field(s) from the related dataSource during editing should consider using custom PickList.pickListFields instead of setting a foreignDisplayField.Note that if
optionDataSource
is set and no valid display field is specified,FormItem.getDisplayFieldName()
will return the dataSource title field by default.If a displayField is specified for a freeform text based item (such as a
ComboBoxItem
), any user-entered value will be treated as a display value. In this scenario, items will derive the data value for the item from the first record where the displayField value matches the user-entered value. To avoid ambiguity, developers may wish to avoid this usage if display values are not unique.- Overrides:
setDisplayField
in classFormItem
- Parameters:
displayField
- New displayField value. Default value is null- Returns:
MultiPickerItem
instance, for chaining setter calls- See Also:
-
getDisplayField
If set, this item will display a value from another field to the user instead of showing the underlying data value for thefield name
.This property is used in two ways:
The item will display the displayField value from the
record currently being edited
ifFormItem.useLocalDisplayFieldValue
is true, (or if unset and the conditions outlined in the documentation for that property are met).If this field has an
FormItem.optionDataSource
, this property is used by default to identify which value to use as a display value in records from this related dataSource. In this usage the specified displayField must be explicitly defined in the optionDataSource to be used - seegetDisplayFieldName()
for more on this behavior.
If not usinglocal display values
, the display value for this item will be derived by performing a fetch against theoption dataSource
to find a record where thevalue field
matches this item's value, and use thedisplayField
value from that record.
In addition to this, PickList-based form items that provide a list of possible options such as theSelectItem
orComboBoxItem
will show thedisplayField
values to the user by default, allowing them to choose a new data value (seeFormItem.valueField
) from a list of user-friendly display values.This essentially allows the specified
optionDataSource
to be used as a server basedvalueMap
.If
local display values
are being used andFormItem.storeDisplayValues
is true, selecting a new value will update both the value for this field and the associated display-field value on the record being edited.Note: Developers may specify the
FormItem.foreignDisplayField
property in addition todisplayField
. This is useful for cases where the display field name in the local dataSource differs from the display field name in the optionDataSource. See the documentation forDataSourceField.foreignDisplayField
for more on this.
If a foreignDisplayField is specified, as with just displayField, iflocal display values
are being used andFormItem.storeDisplayValues
is true, when the user chooses a value the associated display-field value on the record being edited will be updated. In this case it would be set to the foreignDisplayField value from the related record. This means foreignDisplayField is always expected to be set to the equivalent field in the related dataSources.
Developers looking to display some other arbitrary field(s) from the related dataSource during editing should consider using custom PickList.pickListFields instead of setting a foreignDisplayField.Note that if
optionDataSource
is set and no valid display field is specified,FormItem.getDisplayFieldName()
will return the dataSource title field by default.If a displayField is specified for a freeform text based item (such as a
ComboBoxItem
), any user-entered value will be treated as a display value. In this scenario, items will derive the data value for the item from the first record where the displayField value matches the user-entered value. To avoid ambiguity, developers may wish to avoid this usage if display values are not unique.- Overrides:
getDisplayField
in classFormItem
- Returns:
- Current displayField value. Default value is null
- See Also:
-
setExpandedPickListFields
IfcanExpand
is true, this is the list of fields to display in the PickList orpickTree
when the picker is expanded- Parameters:
expandedPickListFields
- New expandedPickListFields value. Default value is null- Returns:
MultiPickerItem
instance, for chaining setter calls
-
getExpandedPickListFields
IfcanExpand
is true, this is the list of fields to display in the PickList orpickTree
when the picker is expanded- Returns:
- Current expandedPickListFields value. Default value is null
-
setExpandIconSrc
SCImgURL
for theexpansionIcon
while not in expanded mode- Parameters:
expandIconSrc
- New expandIconSrc value. Default value is "[SKINIMG]/actions/expand_right.png"- Returns:
MultiPickerItem
instance, for chaining setter calls
-
getExpandIconSrc
SCImgURL
for theexpansionIcon
while not in expanded mode- Returns:
- Current expandIconSrc value. Default value is "[SKINIMG]/actions/expand_right.png"
-
setExpansionHeight
Height for thepickerLayout
in expanded mode whencanExpand
is true- Parameters:
expansionHeight
- New expansionHeight value. Default value is 500- Returns:
MultiPickerItem
instance, for chaining setter calls
-
getExpansionHeight
Height for thepickerLayout
in expanded mode whencanExpand
is true- Returns:
- Current expansionHeight value. Default value is 500
-
getExpansionIcon
Automatically generated expand / collapse icon whencanExpand
is trueThis component is an AutoChild named "expansionIcon". For an overview of how to use and configure AutoChildren, see
Using AutoChildren
.- Returns:
- Current expansionIcon value. Default value is null
-
setExpansionWidth
Width for thepickerLayout
in expanded mode whencanExpand
is true- Parameters:
expansionWidth
- New expansionWidth value. Default value is 500- Returns:
MultiPickerItem
instance, for chaining setter calls
-
getExpansionWidth
Width for thepickerLayout
in expanded mode whencanExpand
is true- Returns:
- Current expansionWidth value. Default value is 500
-
getFilterForm
Dynamic form showing a single text item for filtering the PickList whileSelectionStyle
is "pickList".May be hidden by setting
showFilterForm
to false.If
canExpand
is true, the filter form will not be displayed in the expanded view, as it would be unclear to the user which of the expanded fields would be filtered by it.Instead if
showFilterForm
is true, the pickList will show thefilterEditor
by default, allowing the user to filter byfield
Instead of the filterForm, developers may display the standard filterEditor for the pickList in non-expanded view via
pickList autoChild properties
. If you do this the filterForm will not be displayed even ifshowFilterForm
is true.This component is an AutoChild named "filterForm". For an overview of how to use and configure AutoChildren, see
Using AutoChildren
.- Returns:
- Current filterForm value. Default value is null
-
setFilterHint
- Parameters:
filterHint
- New filterHint value. Default value is "Filter"- Returns:
MultiPickerItem
instance, for chaining setter calls
-
getFilterHint
- Returns:
- Current filterHint value. Default value is "Filter"
-
getFilterIcon
Automatically generated right-aligned inline filter indicator icon for thefilterForm
text box.This icon may be customized using the standard AutoChild pattern as well as via
filterIconSrc
,filterIconWidth
,filterIconHeight
This component is an AutoChild named "filterIcon". For an overview of how to use and configure AutoChildren, see
Using AutoChildren
.- Returns:
- Current filterIcon value. Default value is null
-
setFilterIconHeight
height
for thefilterIcon
- Parameters:
filterIconHeight
- New filterIconHeight value. Default value is 16- Returns:
MultiPickerItem
instance, for chaining setter calls
-
getFilterIconHeight
height
for thefilterIcon
- Returns:
- Current filterIconHeight value. Default value is 16
-
setFilterIconSrc
src
for thefilterIcon
- Parameters:
filterIconSrc
- New filterIconSrc value. Default value is "[SKINIMG]actions/view.png"- Returns:
MultiPickerItem
instance, for chaining setter calls
-
getFilterIconSrc
src
for thefilterIcon
- Returns:
- Current filterIconSrc value. Default value is "[SKINIMG]actions/view.png"
-
setFilterIconWidth
width
for thefilterIcon
- Parameters:
filterIconWidth
- New filterIconWidth value. Default value is 16- Returns:
MultiPickerItem
instance, for chaining setter calls
-
getFilterIconWidth
width
for thefilterIcon
- Returns:
- Current filterIconWidth value. Default value is 16
-
setFilterPickListOnKeypress
ShouldfilterOnKeypress
be active for the pickList?This behavior applies to filter values entered in the
filterForm
as well as the the standard filterEditor for the picklist inexpanded view
.- Parameters:
filterPickListOnKeypress
- New filterPickListOnKeypress value. Default value is true- Returns:
MultiPickerItem
instance, for chaining setter calls
-
getFilterPickListOnKeypress
public boolean getFilterPickListOnKeypress()ShouldfilterOnKeypress
be active for the pickList?This behavior applies to filter values entered in the
filterForm
as well as the the standard filterEditor for the picklist inexpanded view
.- Returns:
- Current filterPickListOnKeypress value. Default value is true
-
setIncludeSelectedParents
For multiPickerItems withselectionStyle:"pickTree"
, andcanSelectFolders:true
, should selected parent nodes be included in the item's value?When
cascading selection
is enabled for a tree, the selected state of parent nodes always reflects the selected state of their children, and it may not be necessary or desirable to explicitly record the parents' selected state in the item's value.Some specific use cases where this is the case might include:
- Creating filter criteria for a target TreeGrid where
TreeGrid.keepParentsOnFilter
is true. In this case filter criteria would not need to include selected parent nodes for the children to be visible in the target tree. - Trees where leaves are of a different logical type than their parents. If a tree structure is being
used to categorize data,
cascading selection
may be useful to allow the user to easily select all items within a category but application code may not want to include the categories as part of a MultiPickerItem's value
This property only applies when
cascadeSelection
is true. If cascadeSelection is false, all selected nodes will be present in the items value regardless of their parent/child relationships.- Parameters:
includeSelectedParents
- New includeSelectedParents value. Default value is false- Returns:
MultiPickerItem
instance, for chaining setter calls
- Creating filter criteria for a target TreeGrid where
-
getIncludeSelectedParents
For multiPickerItems withselectionStyle:"pickTree"
, andcanSelectFolders:true
, should selected parent nodes be included in the item's value?When
cascading selection
is enabled for a tree, the selected state of parent nodes always reflects the selected state of their children, and it may not be necessary or desirable to explicitly record the parents' selected state in the item's value.Some specific use cases where this is the case might include:
- Creating filter criteria for a target TreeGrid where
TreeGrid.keepParentsOnFilter
is true. In this case filter criteria would not need to include selected parent nodes for the children to be visible in the target tree. - Trees where leaves are of a different logical type than their parents. If a tree structure is being
used to categorize data,
cascading selection
may be useful to allow the user to easily select all items within a category but application code may not want to include the categories as part of a MultiPickerItem's value
This property only applies when
cascadeSelection
is true. If cascadeSelection is false, all selected nodes will be present in the items value regardless of their parent/child relationships.- Returns:
- Current includeSelectedParents value. Default value is false
- Creating filter criteria for a target TreeGrid where
-
setInitialSort
Initial sort specifiers
for this item's list of options. Will be applied to thepickList
,pickTree
orshuttle
depending on theselectionStyle
of this item.- Parameters:
initialSort
- New initialSort value. Default value is null- Returns:
MultiPickerItem
instance, for chaining setter calls
-
getInitialSort
Initial sort specifiers
for this item's list of options. Will be applied to thepickList
,pickTree
orshuttle
depending on theselectionStyle
of this item.- Returns:
- Current initialSort value. Default value is null
-
setMultiple
MultiPickerItems always work with array values- Overrides:
setMultiple
in classFormItem
- Parameters:
multiple
- New multiple value. Default value is true- Returns:
MultiPickerItem
instance, for chaining setter calls- See Also:
-
getMultiple
MultiPickerItems always work with array values- Overrides:
getMultiple
in classFormItem
- Returns:
- Current multiple value. Default value is true
- See Also:
-
setOptionDataSource
If set, this FormItem will map stored values to display values as though acom.smartgwt.client.types.ValueMap
were specified, by fetching records from the specifiedoptionDataSource
and extracting thevalueField
anddisplayField
in loaded records, to derive one valueMap entry per record loaded from the optionDataSource.With the default setting of
fetchMissingValues
, fetches will be initiated against the optionDataSource any time the FormItem has a non-null value and no corresponding display value is available. This includes when the form is first initialized, as well as any subsequent calls toFormItem.setValue()
, such as may happen whenDynamicForm.editRecord()
is called. Retrieved values are automatically cached by the FormItem.Note that if a normal, static
valueMap
is also specified for the field (either directly in the form item or as part of the field definition in the dataSource), it will be preferred to the data derived from the optionDataSource for whatever mappings are present.In a databound form, if
FormItem.displayField
is specified for a FormItem andoptionDataSource
is unset,optionDataSource
will default to the form's current DataSource- Overrides:
setOptionDataSource
in classFormItem
- Parameters:
optionDataSource
- New optionDataSource value. Default value is null- Returns:
MultiPickerItem
instance, for chaining setter calls- See Also:
-
getOptionDataSource
If set, this FormItem will map stored values to display values as though acom.smartgwt.client.types.ValueMap
were specified, by fetching records from the specifiedoptionDataSource
and extracting thevalueField
anddisplayField
in loaded records, to derive one valueMap entry per record loaded from the optionDataSource.With the default setting of
fetchMissingValues
, fetches will be initiated against the optionDataSource any time the FormItem has a non-null value and no corresponding display value is available. This includes when the form is first initialized, as well as any subsequent calls toFormItem.setValue()
, such as may happen whenDynamicForm.editRecord()
is called. Retrieved values are automatically cached by the FormItem.Note that if a normal, static
valueMap
is also specified for the field (either directly in the form item or as part of the field definition in the dataSource), it will be preferred to the data derived from the optionDataSource for whatever mappings are present.In a databound form, if
FormItem.displayField
is specified for a FormItem andoptionDataSource
is unset,optionDataSource
will default to the form's current DataSource- Overrides:
getOptionDataSource
in classFormItem
- Returns:
- Current optionDataSource value. Default value is null
- See Also:
-
setOptionFilterContext
If this item has a specifiedoptionDataSource
, and this property is not null, the context is passed to the dataSource asRPCRequest
properties when performing fetch operations on the dataSource to obtain a data-value to display-value mapping, and when fetching for grid-based pickers.This attribute is a direct shortcut for setting fetch-request properties via
item.pickerProperties.dataProperties.requestProperties
.- Parameters:
optionFilterContext
- New optionFilterContext value. Default value is null- Returns:
MultiPickerItem
instance, for chaining setter calls
-
getOptionFilterContext
If this item has a specifiedoptionDataSource
, and this property is not null, the context is passed to the dataSource asRPCRequest
properties when performing fetch operations on the dataSource to obtain a data-value to display-value mapping, and when fetching for grid-based pickers.This attribute is a direct shortcut for setting fetch-request properties via
item.pickerProperties.dataProperties.requestProperties
.- Overrides:
getOptionFilterContext
in classFormItem
- Returns:
- Current optionFilterContext value. Default value is null
-
setOptionOperationId
If this item has a specifiedoptionDataSource
, this attribute may be set to specify an explicitDSRequest.operationId
when performing a fetch against the option dataSource to pick up display value mapping.- Overrides:
setOptionOperationId
in classFormItem
- Parameters:
optionOperationId
- New optionOperationId value. Default value is null- Returns:
MultiPickerItem
instance, for chaining setter calls- See Also:
-
getOptionOperationId
If this item has a specifiedoptionDataSource
, this attribute may be set to specify an explicitDSRequest.operationId
when performing a fetch against the option dataSource to pick up display value mapping.- Overrides:
getOptionOperationId
in classFormItem
- Returns:
- Current optionOperationId value. Default value is null
- See Also:
-
getPickerLayout
Main dropdown picker layout containing the PickList orShuttle
.This component is an AutoChild named "pickerLayout". For an overview of how to use and configure AutoChildren, see
Using AutoChildren
.- Returns:
- Current pickerLayout value. Default value is null
-
getPickerToolbar
Toolbar autoChild containing theselectAllButton
,deselectAllButton
andexpansionIcon
.Shown within the
pickerLayout
ifSelectionStyle
is"pickList"
This component is an AutoChild named "pickerToolbar". For an overview of how to use and configure AutoChildren, see
Using AutoChildren
.- Returns:
- Current pickerToolbar value. Default value is null
-
getPickList
The MultiPickerItempickList
is a filterable ListGridcom.smartgwt.client.types.AutoChild
for viewing and selecting the list of available options whenSelectionStyle
is"pickList"
.It is rendered inside the
pickerLayout
along with the optionalselectionList
This component is an AutoChild named "pickList". For an overview of how to use and configure AutoChildren, see
Using AutoChildren
.- Returns:
- Current pickList value. Default value is null
-
setPickListFetchDelay
IffilterPickListOnKeypress
is true, how long to wait in ms after the last keystroke from a user before filtering the pickList.If not explicitly specified, the default fetchDelay will be derived from
the pickList fetchDelay
.- Parameters:
pickListFetchDelay
- New pickListFetchDelay value. Default value is null- Returns:
MultiPickerItem
instance, for chaining setter calls
-
getPickListFetchDelay
IffilterPickListOnKeypress
is true, how long to wait in ms after the last keystroke from a user before filtering the pickList.If not explicitly specified, the default fetchDelay will be derived from
the pickList fetchDelay
.- Returns:
- Current pickListFetchDelay value. Default value is null
-
setPickListHeight
- Parameters:
pickListHeight
- New pickListHeight value. Default value is 400- Returns:
MultiPickerItem
instance, for chaining setter calls
-
getPickListHeight
- Returns:
- Current pickListHeight value. Default value is 400
-
setPickListWidth
- Parameters:
pickListWidth
- New pickListWidth value. Default value is 250- Returns:
MultiPickerItem
instance, for chaining setter calls
-
getPickListWidth
- Returns:
- Current pickListWidth value. Default value is 250
-
getPickTree
The MultiPickerItempickTree
is a TreeGridcom.smartgwt.client.types.AutoChild
for viewing and selecting a tree of available options whenSelectionStyle
is"pickTree"
.It is rendered inside the
pickerLayout
along with the optionalselectionList
This component is an AutoChild named "pickTree". For an overview of how to use and configure AutoChildren, see
Using AutoChildren
.- Returns:
- Current pickTree value. Default value is null
-
getSelectAllButton
Select All buttoncom.smartgwt.client.types.AutoChild
This component is an AutoChild named "selectAllButton". For an overview of how to use and configure AutoChildren, see
Using AutoChildren
.- Returns:
- Current selectAllButton value. Default value is null
-
setSelectAllButtonTitle
Title for theselectAllButton
- Parameters:
selectAllButtonTitle
- New selectAllButtonTitle value. Default value is "Select All"- Returns:
MultiPickerItem
instance, for chaining setter calls
-
getSelectAllButtonTitle
Title for theselectAllButton
- Returns:
- Current selectAllButtonTitle value. Default value is "Select All"
-
setSelectAllWhileFiltered
If the user has filtered the set of options available in this item, how should the "Select All" and "Clear All" buttons work?Note : This is an advanced setting
- Parameters:
selectAllWhileFiltered
- New selectAllWhileFiltered value. Default value is "whenLoaded"- Returns:
MultiPickerItem
instance, for chaining setter calls
-
getSelectAllWhileFiltered
If the user has filtered the set of options available in this item, how should the "Select All" and "Clear All" buttons work?- Returns:
- Current selectAllWhileFiltered value. Default value is "whenLoaded"
-
setSelectAllWhileFiltered_disabledPrompt
public MultiPickerItem setSelectAllWhileFiltered_disabledPrompt(String selectAllWhileFiltered_disabledPrompt) Disabled prompt for theselectAllButton
while filtered ifselectAllWhileFiltered
is set to"disable"
.- Parameters:
selectAllWhileFiltered_disabledPrompt
- New selectAllWhileFiltered_disabledPrompt value. Default value is "Select All disabled while filtered"- Returns:
MultiPickerItem
instance, for chaining setter calls
-
getSelectAllWhileFiltered_disabledPrompt
Disabled prompt for theselectAllButton
while filtered ifselectAllWhileFiltered
is set to"disable"
.- Returns:
- Current selectAllWhileFiltered_disabledPrompt value. Default value is "Select All disabled while filtered"
-
setSelectAllWhileFiltered_partialCachePrompt
public MultiPickerItem setSelectAllWhileFiltered_partialCachePrompt(String selectAllWhileFiltered_partialCachePrompt) Disabled prompt for theselectAllButton
while filtered ifselectAllWhileFiltered
is set to"whenLoaded"
and the PickList does not have a complete data set loaded on the client.- Parameters:
selectAllWhileFiltered_partialCachePrompt
- New selectAllWhileFiltered_partialCachePrompt value. Default value is "Unable to Select All as the full set of options has not been fetched from the server."- Returns:
MultiPickerItem
instance, for chaining setter calls
-
getSelectAllWhileFiltered_partialCachePrompt
Disabled prompt for theselectAllButton
while filtered ifselectAllWhileFiltered
is set to"whenLoaded"
and the PickList does not have a complete data set loaded on the client.- Returns:
- Current selectAllWhileFiltered_partialCachePrompt value. Default value is "Unable to Select All as the full set of options has not been fetched from the server."
-
setSelectedSelectionListTitle
Default title for theselectionList
.- Parameters:
selectedSelectionListTitle
- New selectedSelectionListTitle value. Default value is "Included Items"- Returns:
MultiPickerItem
instance, for chaining setter calls
-
getSelectedSelectionListTitle
Default title for theselectionList
.- Returns:
- Current selectedSelectionListTitle value. Default value is "Included Items"
-
getSelectionList
Automatically generated ListGrid displaying the current selection forselectionStyle:"pickList"
.Has
canRemoveRecords
enabled as an alternative UI for deselecting records to unchecking the item in the PickList.This component is an AutoChild named "selectionList". For an overview of how to use and configure AutoChildren, see
Using AutoChildren
.- Returns:
- Current selectionList value. Default value is null
-
getSelectionListLabel
AutoChild to show theselectedSelectionListTitle
This component is an AutoChild named "selectionListLabel". For an overview of how to use and configure AutoChildren, see
Using AutoChildren
.- Returns:
- Current selectionListLabel value. Default value is null
-
setSelectionStyle
Should the MultiPickerItem use aShuttle
style interface to indicate the currently selected / unselected values?Note : This is an advanced setting
- Parameters:
selectionStyle
- New selectionStyle value. Default value is "pickList"- Returns:
MultiPickerItem
instance, for chaining setter calls
-
getSelectionStyle
Should the MultiPickerItem use aShuttle
style interface to indicate the currently selected / unselected values?- Returns:
- Current selectionStyle value. Default value is "pickList"
-
setShowFilterForm
Should thefilterForm
be shown?This only applies to selectionStyle "pickList".
- Parameters:
showFilterForm
- New showFilterForm value. Default value is true- Returns:
MultiPickerItem
instance, for chaining setter calls
-
getShowFilterForm
public boolean getShowFilterForm()Should thefilterForm
be shown?This only applies to selectionStyle "pickList".
- Returns:
- Current showFilterForm value. Default value is true
-
setShowSelectionLabel
Should we show aselectionListLabel
for theselectedSelectionListTitle
above theselectionList
.Will never be shown if
showSelectionList
is false or if selectionStyle is not "pickList".- Parameters:
showSelectionLabel
- New showSelectionLabel value. Default value is true- Returns:
MultiPickerItem
instance, for chaining setter calls
-
getShowSelectionLabel
Should we show aselectionListLabel
for theselectedSelectionListTitle
above theselectionList
.Will never be shown if
showSelectionList
is false or if selectionStyle is not "pickList".- Returns:
- Current showSelectionLabel value. Default value is true
-
setShowSelectionList
- Parameters:
showSelectionList
- New showSelectionList value. Default value is true- Returns:
MultiPickerItem
instance, for chaining setter calls
-
getShowSelectionList
- Returns:
- Current showSelectionList value. Default value is true
-
getShuttle
AutoChildShuttle
shown in thepickerLayout
whenSelectionStyle
is set to"shuttle"
.This component is an AutoChild named "shuttle". For an overview of how to use and configure AutoChildren, see
Using AutoChildren
.- Returns:
- Current shuttle value. Default value is null
-
setShuttleHeight
- Parameters:
shuttleHeight
- New shuttleHeight value. Default value is 400- Returns:
MultiPickerItem
instance, for chaining setter calls
-
getShuttleHeight
- Returns:
- Current shuttleHeight value. Default value is 400
-
setShuttleWidth
- Parameters:
shuttleWidth
- New shuttleWidth value. Default value is 500- Returns:
MultiPickerItem
instance, for chaining setter calls
-
getShuttleWidth
- Returns:
- Current shuttleWidth value. Default value is 500
-
setSortDirection
Sort direction
for this item's list of options. Will be applied to the +link{MultiPicke?rItem.pickList},pickTree
orshuttle
depending on theselectionStyle
of this item.- Parameters:
sortDirection
- New sortDirection value. Default value is null- Returns:
MultiPickerItem
instance, for chaining setter calls
-
getSortDirection
Sort direction
for this item's list of options. Will be applied to the +link{MultiPicke?rItem.pickList},pickTree
orshuttle
depending on theselectionStyle
of this item.- Returns:
- Current sortDirection value. Default value is null
-
setSortField
Sort field
for this item's list of options. Will be applied to thepickList
,pickTree
orshuttle
depending on theselectionStyle
of this item.- Parameters:
sortField
- New sortField value. Default value is null- Returns:
MultiPickerItem
instance, for chaining setter calls
-
getSortField
Sort field
for this item's list of options. Will be applied to thepickList
,pickTree
orshuttle
depending on theselectionStyle
of this item.- Returns:
- Current sortField value. Default value is null
-
setSortField
Sort field
for this item's list of options. Will be applied to thepickList
,pickTree
orshuttle
depending on theselectionStyle
of this item.- Parameters:
sortField
- New sortField value. Default value is null- Returns:
MultiPickerItem
instance, for chaining setter calls
-
getSortFieldAsStringArray
Sort field
for this item's list of options. Will be applied to thepickList
,pickTree
orshuttle
depending on theselectionStyle
of this item.- Returns:
- Current sortField value. Default value is null
-
setSortField
Sort field
for this item's list of options. Will be applied to thepickList
,pickTree
orshuttle
depending on theselectionStyle
of this item.- Parameters:
sortField
- New sortField value. Default value is null- Returns:
MultiPickerItem
instance, for chaining setter calls
-
getSortFieldAsInt
Sort field
for this item's list of options. Will be applied to thepickList
,pickTree
orshuttle
depending on theselectionStyle
of this item.- Returns:
- Current sortField value. Default value is null
-
setTextMatchStyle
textMatchStyle to apply tooption criteria
for this item- Parameters:
textMatchStyle
- New textMatchStyle value. Default value is "substring"- Returns:
MultiPickerItem
instance, for chaining setter calls
-
getTextMatchStyle
textMatchStyle to apply tooption criteria
for this item- Returns:
- Current textMatchStyle value. Default value is "substring"
-
setValueField
If this form item maps data values to display values by retrieving theFormItem.displayField
values from anoptionDataSource
, this property denotes the the field to use as the underlying data value in records from the optionDataSource.
If not explicitly supplied, the valueField name will be derived as described inFormItem.getValueFieldName()
.- Overrides:
setValueField
in classFormItem
- Parameters:
valueField
- New valueField value. Default value is null- Returns:
MultiPickerItem
instance, for chaining setter calls- See Also:
-
getValueField
If this form item maps data values to display values by retrieving theFormItem.displayField
values from anoptionDataSource
, this property denotes the the field to use as the underlying data value in records from the optionDataSource.
If not explicitly supplied, the valueField name will be derived as described inFormItem.getValueFieldName()
.- Overrides:
getValueField
in classFormItem
- Returns:
- Getter method to retrieve the
FormItem.valueField
for this item. For items with a specifiedFormItem.optionDataSource
, this determines which field in that dataSource corresponds to the value for this item.If unset, if a
foreignKey relationship
exists between this field and the optionDataSource, this will be used, otherwise default behavior will return theFormItem.name
of this field. Default value is null - See Also:
-
getValueFieldName
Getter method to retrieve theFormItem.valueField
for this item. For items with a specifiedFormItem.optionDataSource
, this determines which field in that dataSource corresponds to the value for this item.If unset, if a
foreignKey relationship
exists between this field and the optionDataSource, this will be used, otherwise default behavior will return theFormItem.name
of this field.- Overrides:
getValueFieldName
in classFormItem
- Returns:
- fieldName to use a "value field" in records from this items
FormItem.optionDataSource
-
setDefaultProperties
Class level method to set the default properties of this class. If set, then all existing and subsequently created instances of this class will automatically have default properties corresponding to the properties of the class instance passed to this function. This is a powerful feature that eliminates the need for users to create a separate hierarchy of subclasses that only alter the default properties of this class. Can also be used for skinning / styling purposes.Note: This method is intended for setting default attributes only and will affect all instances of the underlying class (including those automatically generated in JavaScript). This method should not be used to apply standard EventHandlers or override methods for a class - use a custom subclass instead. Calling this method after instances have been created can result in undefined behavior, since it bypasses any setters and a class instance may have already examined a particular property and not be expecting any changes through this route.
- Parameters:
multiPickerItemProperties
- properties that should be used as new defaults when instances of this class are created- See Also:
-
setOptionCriteria
If this MultiPickerItem is deriving its options from a dataSource, this property allows developers to specify criteria for the fetch.Note : This is an advanced setting
- Overrides:
setOptionCriteria
in classFormItem
- Parameters:
optionCriteria
- New optionCriteria value. Default value is null
-
getOptionCriteria
If this MultiPickerItem is deriving its options from a dataSource, this property allows developers to specify criteria for the fetch.- Overrides:
getOptionCriteria
in classFormItem
- Returns:
- Return the derived
optionCriteria
for this item. Default value is null
-