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, warnOnEditorTypeConversionDefaultFields inherited from class com.smartgwt.client.core.RefDataClass
idFields inherited from class com.smartgwt.client.core.DataClass
factoryCreated, factoryProperties -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidchangeAutoChildDefaults(String autoChildName, Canvas defaults) Changes the defaults for Canvas AutoChildren namedautoChildName.static voidchangeAutoChildDefaults(String autoChildName, FormItem defaults) Changes the defaults for FormItem AutoChildren namedautoChildName.static voidchangePickerIconDefaults(FormItemIcon defaults) Should we show anexpansionIconexpand button allowing the user to show an expanded view of thepickListwith multiple fields.For multiPickerItems withselectionStyle:"pickTree", should the user be able to select and deselect folders?For multiPickerItems withselectionStyle:"pickTree", andcanSelectFolders:true, shouldTreeGrid.cascadeSelectionbe enabled on our pickTree?SCImgURLfor theexpansionIconwhile in expanded modeIf this MultiPickerItem is deriving its options from a dataSource, should it ensure unique field values bygrouping bythe 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.AutoChildTitle for thedeselectAllButtonDisabled prompt for thedeselectAllButtonwhile filtered ifselectAllWhileFilteredis set to"disable".Disabled prompt for thedeselectAllButtonwhile filtered ifselectAllWhileFilteredis 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.SCImgURLfor theexpansionIconwhile not in expanded modeHeight for thepickerLayoutin expanded mode whencanExpandis trueAutomatically generated expand / collapse icon whencanExpandis trueWidth for thepickerLayoutin expanded mode whencanExpandis trueDynamic form showing a single text item for filtering the PickList whileSelectionStyleis "pickList".Hintfor thefilterFormtext item.Automatically generated right-aligned inline filter indicator icon for thefilterFormtext box.heightfor thefilterIconsrcfor thefilterIconwidthfor thefilterIconbooleanShouldfilterOnKeypressbe active for the pickList?For multiPickerItems withselectionStyle:"pickTree", andcanSelectFolders:true, should selected parent nodes be included in the item's value?Initial sort specifiersfor 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.ValueMapwere specified, by fetching records from the specifiedoptionDataSourceand extracting thevalueFieldanddisplayFieldin 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 asRPCRequestproperties 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.operationIdwhen performing a fetch against the option dataSource to pick up display value mapping.static MultiPickerItemgetOrCreateRef(JavaScriptObject jsObj) Main dropdown picker layout containing the PickList orShuttle.The MultiPickerItempickListis a filterable ListGridcom.smartgwt.client.types.AutoChildfor viewing and selecting the list of available options whenSelectionStyleis"pickList".IffilterPickListOnKeypressis true, how long to wait in ms after the last keystroke from a user before filtering the pickList.Optional list of fields for thepickList.The MultiPickerItempickTreeis a TreeGridcom.smartgwt.client.types.AutoChildfor viewing and selecting a tree of available options whenSelectionStyleis"pickTree".Select All buttoncom.smartgwt.client.types.AutoChildTitle for theselectAllButtonIf 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 theselectAllButtonwhile filtered ifselectAllWhileFilteredis set to"disable".Disabled prompt for theselectAllButtonwhile filtered ifselectAllWhileFilteredis 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 theselectedSelectionListTitleShould the MultiPickerItem use aShuttlestyle interface to indicate the currently selected / unselected values?booleanShould thefilterFormbe shown?Sort directionfor this item's list of options.Sort fieldfor this item's list of options.Sort fieldfor this item's list of options.String[]Sort fieldfor this item's list of options.textMatchStyle to apply tooption criteriafor this itemIf this form item maps data values to display values by retrieving theFormItem.displayFieldvalues 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.valueFieldfor this item.setCanExpand(Boolean canExpand) Should we show anexpansionIconexpand button allowing the user to show an expanded view of thepickListwith 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.cascadeSelectionbe enabled on our pickTree?setCollapseIconSrc(String collapseIconSrc) SCImgURLfor theexpansionIconwhile in expanded modestatic voidsetDefaultProperties(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 bythe 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 thedeselectAllButtonsetDeselectAllWhileFiltered_disabledPrompt(String deselectAllWhileFiltered_disabledPrompt) Disabled prompt for thedeselectAllButtonwhile filtered ifselectAllWhileFilteredis set to"disable".setDeselectAllWhileFiltered_partialCachePrompt(String deselectAllWhileFiltered_partialCachePrompt) Disabled prompt for thedeselectAllButtonwhile filtered ifselectAllWhileFilteredis 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) SCImgURLfor theexpansionIconwhile not in expanded modesetExpansionHeight(Integer expansionHeight) Height for thepickerLayoutin expanded mode whencanExpandis truesetExpansionWidth(Integer expansionWidth) Width for thepickerLayoutin expanded mode whencanExpandis truesetFilterHint(String filterHint) Hintfor thefilterFormtext item.setFilterIconHeight(Integer filterIconHeight) heightfor thefilterIconsetFilterIconSrc(String filterIconSrc) srcfor thefilterIconsetFilterIconWidth(Integer filterIconWidth) widthfor thefilterIconsetFilterPickListOnKeypress(boolean filterPickListOnKeypress) ShouldfilterOnKeypressbe 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 specifiersfor this item's list of options.setMultiple(Boolean multiple) MultiPickerItems always work with array valuesvoidsetOptionCriteria(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.ValueMapwere specified, by fetching records from the specifiedoptionDataSourceand extracting thevalueFieldanddisplayFieldin 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 asRPCRequestproperties 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.operationIdwhen performing a fetch against the option dataSource to pick up display value mapping.setPickListFetchDelay(Integer pickListFetchDelay) IffilterPickListOnKeypressis true, how long to wait in ms after the last keystroke from a user before filtering the pickList.setPickListFields(ListGridField... pickListFields) Optional list of fields for thepickList.setPickListHeight(Integer pickListHeight) setPickListWidth(Integer pickListWidth) setSelectAllButtonTitle(String selectAllButtonTitle) Title for theselectAllButtonsetSelectAllWhileFiltered(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 theselectAllButtonwhile filtered ifselectAllWhileFilteredis set to"disable".setSelectAllWhileFiltered_partialCachePrompt(String selectAllWhileFiltered_partialCachePrompt) Disabled prompt for theselectAllButtonwhile filtered ifselectAllWhileFilteredis 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 aShuttlestyle interface to indicate the currently selected / unselected values?setShowFilterForm(boolean showFilterForm) Should thefilterFormbe shown?setShowSelectionLabel(Boolean showSelectionLabel) setShowSelectionList(Boolean showSelectionList) setShuttleHeight(Integer shuttleHeight) setShuttleWidth(Integer shuttleWidth) setSortDirection(SortDirection sortDirection) Sort directionfor this item's list of options.setSortField(Integer sortField) Sort fieldfor this item's list of options.setSortField(String sortField) Sort fieldfor this item's list of options.setSortField(String... sortField) Sort fieldfor this item's list of options.setTextMatchStyle(TextMatchStyle textMatchStyle) textMatchStyle to apply tooption criteriafor this itemsetValueField(String valueField) If this form item maps data values to display values by retrieving theFormItem.displayFieldvalues 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, setWrapMethods 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, valueClippedMethods inherited from class com.smartgwt.client.data.Field
getCanExport, getExportTitle, getPrimaryKey, getSortByField, setCanExport, setExportTitle, setPrimaryKey, setSortByFieldMethods inherited from class com.smartgwt.client.core.RefDataClass
getRef, getRef, internalSetIDMethods 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, setFactoryCreatedMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods 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 anexpansionIconexpand button allowing the user to show an expanded view of thepickListwith multiple fields.canExpandonly applies to MultiPickerItems with selectionStyle set to "pickList" or "pickTree" and an explicitly specified set ofexpandedPickListFieldsto display within the expanded view.- Parameters:
canExpand- New canExpand value. Default value is true- Returns:
MultiPickerIteminstance, for chaining setter calls
-
getCanExpand
Should we show anexpansionIconexpand button allowing the user to show an expanded view of thepickListwith multiple fields.canExpandonly applies to MultiPickerItems with selectionStyle set to "pickList" or "pickTree" and an explicitly specified set ofexpandedPickListFieldsto 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:
MultiPickerIteminstance, 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.cascadeSelectionbe enabled on our pickTree?- Parameters:
cascadeSelection- New cascadeSelection value. Default value is true- Returns:
MultiPickerIteminstance, for chaining setter calls
-
getCascadeSelection
For multiPickerItems withselectionStyle:"pickTree", andcanSelectFolders:true, shouldTreeGrid.cascadeSelectionbe enabled on our pickTree?- Returns:
- Current cascadeSelection value. Default value is true
-
setCollapseIconSrc
SCImgURLfor theexpansionIconwhile in expanded mode- Parameters:
collapseIconSrc- New collapseIconSrc value. Default value is "[SKINIMG]/actions/collapse_left.png"- Returns:
MultiPickerIteminstance, for chaining setter calls
-
getCollapseIconSrc
SCImgURLfor theexpansionIconwhile 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 bythe 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, anyexpandedPickListFieldsto be displayed in theexpanded viewwill not be able to display meaningful values unless asummaryFunctionis supplied to produce aggregated values from the grouped data. This may be achieved by specifying summaryFunctions directly on theoptionFilterContext, or on theoperationBindingfor thefetch operation.Note : This is an advanced setting
- Parameters:
deriveUniqueValues- New deriveUniqueValues value. Default value is false- Returns:
MultiPickerIteminstance, for chaining setter calls
-
getDeriveUniqueValues
If this MultiPickerItem is deriving its options from a dataSource, should it ensure unique field values bygrouping bythe 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, anyexpandedPickListFieldsto be displayed in theexpanded viewwill not be able to display meaningful values unless asummaryFunctionis supplied to produce aggregated values from the grouped data. This may be achieved by specifying summaryFunctions directly on theoptionFilterContext, or on theoperationBindingfor thefetch operation.- Returns:
- Current deriveUniqueValues value. Default value is false
-
getDeselectAllButton
Clear All buttoncom.smartgwt.client.types.AutoChildThis 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:
MultiPickerIteminstance, 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 thedeselectAllButtonwhile filtered ifselectAllWhileFilteredis set to"disable".- Parameters:
deselectAllWhileFiltered_disabledPrompt- New deselectAllWhileFiltered_disabledPrompt value. Default value is "Clear All disabled while filtered"- Returns:
MultiPickerIteminstance, for chaining setter calls
-
getDeselectAllWhileFiltered_disabledPrompt
Disabled prompt for thedeselectAllButtonwhile filtered ifselectAllWhileFilteredis 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 thedeselectAllButtonwhile filtered ifselectAllWhileFilteredis 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:
MultiPickerIteminstance, for chaining setter calls
-
getDeselectAllWhileFiltered_partialCachePrompt
Disabled prompt for thedeselectAllButtonwhile filtered ifselectAllWhileFilteredis 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 editedifFormItem.useLocalDisplayFieldValueis 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 dataSourceto find a record where thevalue fieldmatches this item's value, and use thedisplayFieldvalue from that record.
In addition to this, PickList-based form items that provide a list of possible options such as theSelectItemorComboBoxItemwill show thedisplayFieldvalues 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
optionDataSourceto be used as a server basedvalueMap.If
local display valuesare being used andFormItem.storeDisplayValuesis 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.foreignDisplayFieldproperty 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.foreignDisplayFieldfor more on this.
If a foreignDisplayField is specified, as with just displayField, iflocal display valuesare being used andFormItem.storeDisplayValuesis 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
optionDataSourceis 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:
setDisplayFieldin classFormItem- Parameters:
displayField- New displayField value. Default value is null- Returns:
MultiPickerIteminstance, 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 editedifFormItem.useLocalDisplayFieldValueis 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 dataSourceto find a record where thevalue fieldmatches this item's value, and use thedisplayFieldvalue from that record.
In addition to this, PickList-based form items that provide a list of possible options such as theSelectItemorComboBoxItemwill show thedisplayFieldvalues 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
optionDataSourceto be used as a server basedvalueMap.If
local display valuesare being used andFormItem.storeDisplayValuesis 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.foreignDisplayFieldproperty 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.foreignDisplayFieldfor more on this.
If a foreignDisplayField is specified, as with just displayField, iflocal display valuesare being used andFormItem.storeDisplayValuesis 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
optionDataSourceis 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:
getDisplayFieldin classFormItem- Returns:
- Current displayField value. Default value is null
- See Also:
-
setExpandedPickListFields
IfcanExpandis true, this is the list of fields to display in the PickList orpickTreewhen the picker is expanded- Parameters:
expandedPickListFields- New expandedPickListFields value. Default value is null- Returns:
MultiPickerIteminstance, for chaining setter calls
-
getExpandedPickListFields
IfcanExpandis true, this is the list of fields to display in the PickList orpickTreewhen the picker is expanded- Returns:
- Current expandedPickListFields value. Default value is null
-
setExpandIconSrc
SCImgURLfor theexpansionIconwhile not in expanded mode- Parameters:
expandIconSrc- New expandIconSrc value. Default value is "[SKINIMG]/actions/expand_right.png"- Returns:
MultiPickerIteminstance, for chaining setter calls
-
getExpandIconSrc
SCImgURLfor theexpansionIconwhile not in expanded mode- Returns:
- Current expandIconSrc value. Default value is "[SKINIMG]/actions/expand_right.png"
-
setExpansionHeight
Height for thepickerLayoutin expanded mode whencanExpandis true- Parameters:
expansionHeight- New expansionHeight value. Default value is 500- Returns:
MultiPickerIteminstance, for chaining setter calls
-
getExpansionHeight
Height for thepickerLayoutin expanded mode whencanExpandis true- Returns:
- Current expansionHeight value. Default value is 500
-
getExpansionIcon
Automatically generated expand / collapse icon whencanExpandis 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 thepickerLayoutin expanded mode whencanExpandis true- Parameters:
expansionWidth- New expansionWidth value. Default value is 500- Returns:
MultiPickerIteminstance, for chaining setter calls
-
getExpansionWidth
Width for thepickerLayoutin expanded mode whencanExpandis true- Returns:
- Current expansionWidth value. Default value is 500
-
getFilterForm
Dynamic form showing a single text item for filtering the PickList whileSelectionStyleis "pickList".May be hidden by setting
showFilterFormto false.If
canExpandis 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
showFilterFormis true, the pickList will show thefilterEditorby default, allowing the user to filter byfieldInstead 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 ifshowFilterFormis 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:
MultiPickerIteminstance, for chaining setter calls
-
getFilterHint
- Returns:
- Current filterHint value. Default value is "Filter"
-
getFilterIcon
Automatically generated right-aligned inline filter indicator icon for thefilterFormtext box.This icon may be customized using the standard AutoChild pattern as well as via
filterIconSrc,filterIconWidth,filterIconHeightThis 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
heightfor thefilterIcon- Parameters:
filterIconHeight- New filterIconHeight value. Default value is 16- Returns:
MultiPickerIteminstance, for chaining setter calls
-
getFilterIconHeight
heightfor thefilterIcon- Returns:
- Current filterIconHeight value. Default value is 16
-
setFilterIconSrc
srcfor thefilterIcon- Parameters:
filterIconSrc- New filterIconSrc value. Default value is "[SKINIMG]actions/view.png"- Returns:
MultiPickerIteminstance, for chaining setter calls
-
getFilterIconSrc
srcfor thefilterIcon- Returns:
- Current filterIconSrc value. Default value is "[SKINIMG]actions/view.png"
-
setFilterIconWidth
widthfor thefilterIcon- Parameters:
filterIconWidth- New filterIconWidth value. Default value is 16- Returns:
MultiPickerIteminstance, for chaining setter calls
-
getFilterIconWidth
widthfor thefilterIcon- Returns:
- Current filterIconWidth value. Default value is 16
-
setFilterPickListOnKeypress
ShouldfilterOnKeypressbe active for the pickList?This behavior applies to filter values entered in the
filterFormas well as the the standard filterEditor for the picklist inexpanded view.- Parameters:
filterPickListOnKeypress- New filterPickListOnKeypress value. Default value is true- Returns:
MultiPickerIteminstance, for chaining setter calls
-
getFilterPickListOnKeypress
public boolean getFilterPickListOnKeypress()ShouldfilterOnKeypressbe active for the pickList?This behavior applies to filter values entered in the
filterFormas 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 selectionis 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.keepParentsOnFilteris 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 selectionmay 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
cascadeSelectionis 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:
MultiPickerIteminstance, 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 selectionis 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.keepParentsOnFilteris 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 selectionmay 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
cascadeSelectionis 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 specifiersfor this item's list of options. Will be applied to thepickList,pickTreeorshuttledepending on theselectionStyleof this item.- Parameters:
initialSort- New initialSort value. Default value is null- Returns:
MultiPickerIteminstance, for chaining setter calls
-
getInitialSort
Initial sort specifiersfor this item's list of options. Will be applied to thepickList,pickTreeorshuttledepending on theselectionStyleof this item.- Returns:
- Current initialSort value. Default value is null
-
setMultiple
MultiPickerItems always work with array values- Overrides:
setMultiplein classFormItem- Parameters:
multiple- New multiple value. Default value is true- Returns:
MultiPickerIteminstance, for chaining setter calls- See Also:
-
getMultiple
MultiPickerItems always work with array values- Overrides:
getMultiplein 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.ValueMapwere specified, by fetching records from the specifiedoptionDataSourceand extracting thevalueFieldanddisplayFieldin 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
valueMapis 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.displayFieldis specified for a FormItem andoptionDataSourceis unset,optionDataSourcewill default to the form's current DataSource- Overrides:
setOptionDataSourcein classFormItem- Parameters:
optionDataSource- New optionDataSource value. Default value is null- Returns:
MultiPickerIteminstance, for chaining setter calls- See Also:
-
getOptionDataSource
If set, this FormItem will map stored values to display values as though acom.smartgwt.client.types.ValueMapwere specified, by fetching records from the specifiedoptionDataSourceand extracting thevalueFieldanddisplayFieldin 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
valueMapis 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.displayFieldis specified for a FormItem andoptionDataSourceis unset,optionDataSourcewill default to the form's current DataSource- Overrides:
getOptionDataSourcein 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 asRPCRequestproperties 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:
MultiPickerIteminstance, for chaining setter calls
-
getOptionFilterContext
If this item has a specifiedoptionDataSource, and this property is not null, the context is passed to the dataSource asRPCRequestproperties 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:
getOptionFilterContextin 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.operationIdwhen performing a fetch against the option dataSource to pick up display value mapping.- Overrides:
setOptionOperationIdin classFormItem- Parameters:
optionOperationId- New optionOperationId value. Default value is null- Returns:
MultiPickerIteminstance, for chaining setter calls- See Also:
-
getOptionOperationId
If this item has a specifiedoptionDataSource, this attribute may be set to specify an explicitDSRequest.operationIdwhen performing a fetch against the option dataSource to pick up display value mapping.- Overrides:
getOptionOperationIdin 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,deselectAllButtonandexpansionIcon.Shown within the
pickerLayoutifSelectionStyleis"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 MultiPickerItempickListis a filterable ListGridcom.smartgwt.client.types.AutoChildfor viewing and selecting the list of available options whenSelectionStyleis"pickList".It is rendered inside the
pickerLayoutalong with the optionalselectionListThis 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
IffilterPickListOnKeypressis 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:
MultiPickerIteminstance, for chaining setter calls
-
getPickListFetchDelay
IffilterPickListOnKeypressis 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
-
setPickListFields
Optional list of fields for thepickList. This property may be used to customize the appearance of the field / fields in the pickList.If not explicitly specified, pick list fields will be generated automatically to show the display field (or value field if there is no display field) for each option.
Note that if
canExpandis true, developers should useexpandedPickListFieldsto specify the set of fields to display in the expanded view.- Parameters:
pickListFields- New pickListFields value. Default value is null- Returns:
MultiPickerIteminstance, for chaining setter calls
-
getPickListFields
Optional list of fields for thepickList. This property may be used to customize the appearance of the field / fields in the pickList.If not explicitly specified, pick list fields will be generated automatically to show the display field (or value field if there is no display field) for each option.
Note that if
canExpandis true, developers should useexpandedPickListFieldsto specify the set of fields to display in the expanded view.- Returns:
- Current pickListFields value. Default value is null
-
setPickListHeight
- Parameters:
pickListHeight- New pickListHeight value. Default value is 400- Returns:
MultiPickerIteminstance, for chaining setter calls
-
getPickListHeight
- Returns:
- Current pickListHeight value. Default value is 400
-
setPickListWidth
- Parameters:
pickListWidth- New pickListWidth value. Default value is 250- Returns:
MultiPickerIteminstance, for chaining setter calls
-
getPickListWidth
- Returns:
- Current pickListWidth value. Default value is 250
-
getPickTree
The MultiPickerItempickTreeis a TreeGridcom.smartgwt.client.types.AutoChildfor viewing and selecting a tree of available options whenSelectionStyleis"pickTree".It is rendered inside the
pickerLayoutalong with the optionalselectionListThis 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.AutoChildThis 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:
MultiPickerIteminstance, 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:
MultiPickerIteminstance, 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 theselectAllButtonwhile filtered ifselectAllWhileFilteredis set to"disable".- Parameters:
selectAllWhileFiltered_disabledPrompt- New selectAllWhileFiltered_disabledPrompt value. Default value is "Select All disabled while filtered"- Returns:
MultiPickerIteminstance, for chaining setter calls
-
getSelectAllWhileFiltered_disabledPrompt
Disabled prompt for theselectAllButtonwhile filtered ifselectAllWhileFilteredis 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 theselectAllButtonwhile filtered ifselectAllWhileFilteredis 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:
MultiPickerIteminstance, for chaining setter calls
-
getSelectAllWhileFiltered_partialCachePrompt
Disabled prompt for theselectAllButtonwhile filtered ifselectAllWhileFilteredis 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:
MultiPickerIteminstance, 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
canRemoveRecordsenabled 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 theselectedSelectionListTitleThis 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 aShuttlestyle interface to indicate the currently selected / unselected values?Note : This is an advanced setting
- Parameters:
selectionStyle- New selectionStyle value. Default value is "pickList"- Returns:
MultiPickerIteminstance, for chaining setter calls
-
getSelectionStyle
Should the MultiPickerItem use aShuttlestyle interface to indicate the currently selected / unselected values?- Returns:
- Current selectionStyle value. Default value is "pickList"
-
setShowFilterForm
Should thefilterFormbe shown?This only applies to selectionStyle "pickList".
- Parameters:
showFilterForm- New showFilterForm value. Default value is true- Returns:
MultiPickerIteminstance, for chaining setter calls
-
getShowFilterForm
public boolean getShowFilterForm()Should thefilterFormbe shown?This only applies to selectionStyle "pickList".
- Returns:
- Current showFilterForm value. Default value is true
-
setShowSelectionLabel
Should we show aselectionListLabelfor theselectedSelectionListTitleabove theselectionList.Will never be shown if
showSelectionListis false or if selectionStyle is not "pickList".- Parameters:
showSelectionLabel- New showSelectionLabel value. Default value is true- Returns:
MultiPickerIteminstance, for chaining setter calls
-
getShowSelectionLabel
Should we show aselectionListLabelfor theselectedSelectionListTitleabove theselectionList.Will never be shown if
showSelectionListis 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:
MultiPickerIteminstance, for chaining setter calls
-
getShowSelectionList
- Returns:
- Current showSelectionList value. Default value is true
-
getShuttle
AutoChildShuttleshown in thepickerLayoutwhenSelectionStyleis 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:
MultiPickerIteminstance, for chaining setter calls
-
getShuttleHeight
- Returns:
- Current shuttleHeight value. Default value is 400
-
setShuttleWidth
- Parameters:
shuttleWidth- New shuttleWidth value. Default value is 500- Returns:
MultiPickerIteminstance, for chaining setter calls
-
getShuttleWidth
- Returns:
- Current shuttleWidth value. Default value is 500
-
setSortDirection
Sort directionfor this item's list of options. Will be applied to the +link{MultiPicke?rItem.pickList},pickTreeorshuttledepending on theselectionStyleof this item.- Parameters:
sortDirection- New sortDirection value. Default value is null- Returns:
MultiPickerIteminstance, for chaining setter calls
-
getSortDirection
Sort directionfor this item's list of options. Will be applied to the +link{MultiPicke?rItem.pickList},pickTreeorshuttledepending on theselectionStyleof this item.- Returns:
- Current sortDirection value. Default value is null
-
setSortField
Sort fieldfor this item's list of options. Will be applied to thepickList,pickTreeorshuttledepending on theselectionStyleof this item.- Parameters:
sortField- New sortField value. Default value is null- Returns:
MultiPickerIteminstance, for chaining setter calls
-
getSortField
Sort fieldfor this item's list of options. Will be applied to thepickList,pickTreeorshuttledepending on theselectionStyleof this item.- Returns:
- Current sortField value. Default value is null
-
setSortField
Sort fieldfor this item's list of options. Will be applied to thepickList,pickTreeorshuttledepending on theselectionStyleof this item.- Parameters:
sortField- New sortField value. Default value is null- Returns:
MultiPickerIteminstance, for chaining setter calls
-
getSortFieldAsStringArray
Sort fieldfor this item's list of options. Will be applied to thepickList,pickTreeorshuttledepending on theselectionStyleof this item.- Returns:
- Current sortField value. Default value is null
-
setSortField
Sort fieldfor this item's list of options. Will be applied to thepickList,pickTreeorshuttledepending on theselectionStyleof this item.- Parameters:
sortField- New sortField value. Default value is null- Returns:
MultiPickerIteminstance, for chaining setter calls
-
getSortFieldAsInt
Sort fieldfor this item's list of options. Will be applied to thepickList,pickTreeorshuttledepending on theselectionStyleof this item.- Returns:
- Current sortField value. Default value is null
-
setTextMatchStyle
textMatchStyle to apply tooption criteriafor this item- Parameters:
textMatchStyle- New textMatchStyle value. Default value is "substring"- Returns:
MultiPickerIteminstance, for chaining setter calls
-
getTextMatchStyle
textMatchStyle to apply tooption criteriafor this item- Returns:
- Current textMatchStyle value. Default value is "substring"
-
setValueField
If this form item maps data values to display values by retrieving theFormItem.displayFieldvalues 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:
setValueFieldin classFormItem- Parameters:
valueField- New valueField value. Default value is null- Returns:
MultiPickerIteminstance, for chaining setter calls- See Also:
-
getValueField
If this form item maps data values to display values by retrieving theFormItem.displayFieldvalues 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:
getValueFieldin classFormItem- Returns:
- Getter method to retrieve the
FormItem.valueFieldfor 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 relationshipexists between this field and the optionDataSource, this will be used, otherwise default behavior will return theFormItem.nameof this field. Default value is null - See Also:
-
getValueFieldName
Getter method to retrieve theFormItem.valueFieldfor 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 relationshipexists between this field and the optionDataSource, this will be used, otherwise default behavior will return theFormItem.nameof this field.- Overrides:
getValueFieldNamein 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:
setOptionCriteriain 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:
getOptionCriteriain classFormItem- Returns:
- Return the derived
optionCriteriafor this item. Default value is null
-