Class MultiComboBoxItem
- All Implemented Interfaces:
HasHandlers
,HasBlurHandlers
,HasCanEditChangedHandlers
,HasChangedHandlers
,HasChangeHandlers
,HasClickHandlers
,HasDoubleClickHandlers
,HasEditorEnterHandlers
,HasEditorExitHandlers
,HasFocusHandlers
,HasIconClickHandlers
,HasIconKeyPressHandlers
,HasItemHoverHandlers
,HasKeyDownHandlers
,HasKeyPressHandlers
,HasKeyUpHandlers
,HasPendingStatusChangedHandlers
,HasPickerIconClickHandlers
,HasReadOnlyDisplayChangedHandlers
,HasShowContextMenuHandlers
,HasShowValueHandlers
,HasTitleClickHandlers
,HasTitleDoubleClickHandlers
,HasTitleHoverHandlers
,HasValueHoverHandlers
,HasValueIconClickHandlers
layoutStyle
attribute. The
buttons will be kept in the order that they were added, with the most recently added button being adjacent to the combo
box. MultiComboBoxItem
uses the com.smartgwt.client.types.AutoChild
pattern to construct the comboBox
and the buttons
so that they can be easily customized. For
example, you can customize the criteria used to fetch by using ComboBoxItem.setPickListFilterCriteriaFunction()
with setComboBoxProperties()
.- See Also:
-
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) Similar toComboBoxItem.addUnknownValues
, controls whether additional values can be added to the ComboBox or whether the user must choose from the available values in the picklist only.If true, hitting tab always exits the field, and will also add a value to the list of selected values if there is match (and depending on the setting foraddUnknownValues
).Should the MultiComboBoxItem fetch data from thedata source
immediately or wait until the user first opens the pickList.Specifies whether to autofit the buttons in the MultiComboBoxItem.When this item is showing a tree-based picker, which nodes should be opened automatically.Note : This API is non-functional (always returns null) and exists only to make you aware that this MultiAutoChild exists.Default properties to be used in creating eachIButton
.Properties to be used in creating each option button.Ancom.smartgwt.client.types.AutoChild
attribute to create the combo box in a MultiComboBoxItem.Default properties for theComboBoxItem
in a MultiComboBoxItem.Properties to be used in creating aComboBoxItem
.int
Specifies the size of the combo box field.TheDynamicForm
holding thecomboBox
.Whether to show the picker as a flat list, or a collapsible tree.WhenshowDeletions
istrue
, theButton.baseStyle
used onbuttons
for values that have been deleted (also called "deselected buttons").ThedisplayField
of the combo box.Specifies the layout style of the combo box and the buttons in the MultiComboBoxItem.TheoptionDataSource
of the combo box.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 MultiComboBoxItem
getOrCreateRef
(JavaScriptObject jsObj) WhenshowPending
istrue
, theButton.baseStyle
used onbuttons
that are in the "Pending" visual state.The Class to use when creating a picker of type "list" for a FormItem.The Class to use when creating a picker of type "tree" for a FormItem.Should this item's value be saved in the form's values and hence returned fromform.getValues()
?Specifies whether to arrange the buttons of the MultiComboBoxItem in the order that they were selected (the default), or to sort the buttons bydisplayField
.ThevalueField
of the combo box.Note : This API is non-functional (always returns null) and exists only to make you aware that this MultiAutoChild exists.final String[]
boolean
pendingStatusChanged
(DynamicForm form, FormItem item, boolean pendingStatus, Object newValue, Object value) Notification method called whenshowPending
is enabled and thisMultiComboBoxItem
should either clear or show its pending visual state.setAddUnknownValues
(Boolean addUnknownValues) Similar toComboBoxItem.addUnknownValues
, controls whether additional values can be added to the ComboBox or whether the user must choose from the available values in the picklist only.setAlwaysExitOnTab
(Boolean alwaysExitOnTab) If true, hitting tab always exits the field, and will also add a value to the list of selected values if there is match (and depending on the setting foraddUnknownValues
).setAutoFetchData
(Boolean autoFetchData) Should the MultiComboBoxItem fetch data from thedata source
immediately or wait until the user first opens the pickList.setAutoFitButtons
(Boolean autoFitButtons) Specifies whether to autofit the buttons in the MultiComboBoxItem.setAutoOpenTree
(String autoOpenTree) When this item is showing a tree-based picker, which nodes should be opened automatically.void
setButtonProperties
(IButton buttonProperties) Properties to be used in creating each option button.void
setComboBoxProperties
(ComboBoxItem comboBoxProperties) Properties to be used in creating aComboBoxItem
.setComboBoxWidth
(int comboBoxWidth) Specifies the size of the combo box field.setDataSetType
(String dataSetType) Whether to show the picker as a flat list, or a collapsible tree.static void
setDefaultProperties
(MultiComboBoxItem multiComboBoxItemProperties) Class level method to set the default properties of this class.setDeselectedButtonStyle
(String deselectedButtonStyle) WhenshowDeletions
istrue
, theButton.baseStyle
used onbuttons
for values that have been deleted (also called "deselected buttons").setDisplayField
(String displayField) ThedisplayField
of the combo box.setLayoutStyle
(MultiComboBoxLayoutStyle layoutStyle) Specifies the layout style of the combo box and the buttons in the MultiComboBoxItem.setOptionDataSource
(DataSource optionDataSource) TheoptionDataSource
of the combo box.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.setPendingButtonStyle
(String pendingButtonStyle) WhenshowPending
istrue
, theButton.baseStyle
used onbuttons
that are in the "Pending" visual state.setPickListConstructor
(String pickListConstructor) The Class to use when creating a picker of type "list" for a FormItem.setPickTreeConstructor
(String pickTreeConstructor) The Class to use when creating a picker of type "tree" for a FormItem.setRootNodeId
(Integer rootNodeId) setRootNodeId
(String rootNodeId) setShouldSaveValue
(Boolean shouldSaveValue) Should this item's value be saved in the form's values and hence returned fromform.getValues()
?setUseInsertionOrder
(Boolean useInsertionOrder) Specifies whether to arrange the buttons of the MultiComboBoxItem in the order that they were selected (the default), or to sort the buttons bydisplayField
.setValueField
(String valueField) ThevalueField
of the combo box.void
void
showValue
(Object displayValue, Object dataValue, DynamicForm form, CanvasItem item) This method will be called whenever this FormItem's value is being set via a programmatic call to e.g:DynamicForm.setValues()
orFormItem.setValue()
and may be overridden by CanvasItems intended to support displaying data values to update the embedded Canvas to reflect the value passed in.Methods inherited from class com.smartgwt.client.widgets.form.fields.CanvasItem
addCanEditChangedHandler, addReadOnlyDisplayChangedHandler, addShowValueHandler, createCanvas, getApplyPromptToCanvas, getAutoDestroy, getCanvas, getEditCriteriaInInnerForm, getHeight, getHeightAsString, getMaxHeight, getMinHeight, getMultiple, getOverflow, getPrompt, hasAdvancedCriteria, isFocused, setApplyPromptToCanvas, setAutoDestroy, setCanEditCriterionPredicate, setCanvas, setCriterionGetter, setCriterionSetter, setDefaultProperties, setEditCriteriaInInnerForm, setHeight, setHeight, setMaxHeight, setMinHeight, setMultiple, setOverflow, setPrompt, setShouldDisableCanvasCustomizer, setupCanvasConstructor, storeValue, storeValue, storeValue, updateCanvasTabPosition
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, getApplyAlignToText, getApplyHeightToTextBox, getAriaRole, getAttribute, getAttributeAsBoolean, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsFloat, getAttributeAsInt, getAttributeAsJavaScriptObject, getAttributeAsObject, getAttributeAsString, getAutoComplete, getAutoCompleteKeywords, getBrowserInputType, getBrowserSpellCheck, getCanEdit, getCanEditOpaqueValues, getCanFocus, getCanHover, getCanSelectText, getCanTabToIcons, getCanvasAutoChild, getCellHeight, getCellStyle, getChangeOnKeypress, getClassName, getClipStaticValue, getClipTitle, getConfig, getContainerWidget, getControlStyle, getCriteriaField, getCriterion, getCriterion, getCursorPosition, getCustomState, getDataPath, getDateFormatter, getDecimalPad, getDecimalPrecision, getDefaultIconSrc, getDefaultOperator, getDefaultValue, getDestroyed, getDisabled, getDisabledHover, getDisableIconsOnReadOnly, getDisplayFieldName, getDisplayValue, getDisplayValue, getEditorTypeConfig, getEditPendingCSSText, getEditProxyConstructor, getEmptyDisplayValue, getEmptyValueIcon, getEndRow, getErrorIconHeight, getErrorIconProperties, getErrorIconSrc, getErrorIconWidth, getErrorMessageWidth, getErrors, getEscapeHTML, getExportFormat, getFetchMissingValues, getFieldName, getFilterLocally, getForeignDisplayField, getForm, getFormat, getFormItemAutoChild, getFormula, getFullDataPath, getGlobalTabIndex, getGridColNum, getGridRowNum, 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, getOptionCriteria, getOptionDataSourceAsString, getOptionFilterContext, getOptionTextMatchStyle, getOriginalValueMessage, getPageLeft, getPageRect, getPageTop, getPaletteDefaults, getPicker, getPickerIcon, getPickerIcon, getPickerIconHeight, getPickerIconName, getPickerIconPrompt, getPickerIconProperties, getPickerIconSrc, getPickerIconStyle, getPickerIconTabPosition, getPickerIconWidth, getPixelHeight, getPixelWidth, getPrintReadOnlyTextBoxStyle, getPrintTextBoxStyle, getPrintTitleStyle, getReadOnlyCanSelectText, getReadOnlyControlStyle, getReadOnlyDisplay, getReadOnlyHover, getReadOnlyTextBoxStyle, getReadOnlyWhen, getRect, getRedrawOnChange, getRejectInvalidValueOnChange, getRequired, getRequiredMessage, getRequiredWhen, getRowSpan, getSaveOnEnter, getScClassName, getSelectedRecord, getSelectOnClick, getSelectOnFocus, 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, getTextBoxStyle, 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, getValueFieldName, getValueIconHeight, getValueIconLeftPadding, getValueIconRightPadding, getValueIconSize, getValueIconWidth, getValueMap, getValueMapAsArray, getVisible, getVisibleHeight, getVisibleTitleWidth, getVisibleWhen, getVisibleWidth, getWarnOnEditorTypeConversion, getWarnOnEditorTypeConversionDefault, getWidth, getWidthAsString, getWrapHintText, getWrapStaticValue, getWrapTitle, handleWarnOnEditorTypeConversion, hasErrors, hide, hideIcon, invalidateDisplayValueCache, isAssignableFrom, isConfigOnly, isCreated, isCutEvent, isDisabled, isDrawn, isInGrid, isPasteEvent, isVisible, linkToInstanceUponCreate, mapDisplayToValue, mapValueToDisplay, mapValueToDisplay, mapValueToDisplay, redraw, redraw, removeIcon, selectedRecordChanged, setAccessKey, setAlign, setAllowExpressions, setAlwaysFetchMissingValues, setAlwaysShowControlBox, setApplyAlignToText, setApplyHeightToTextBox, 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, setCanEditOpaqueValues, setCanFocus, setCanHover, setCanSelectText, setCanTabToIcons, setCellHeight, setCellStyle, setChangeOnKeypress, setClipStaticValue, setClipTitle, setColSpan, setColSpan, setConfigOnly, setControlStyle, setCriteriaField, setCriterion, setCustomStateGetter, setDataPath, setDateFormatter, setDecimalPad, setDecimalPrecision, setDefaultIconSrc, setDefaultOperator, setDefaultProperties, setDefaultValue, setDefaultValue, setDefaultValue, setDefaultValue, setDefaultValue, setDefaultValue, setDefaultValue, setDisabled, setDisabledHover, setDisableIconsOnReadOnly, setDisplayFormat, setDisplayFormat, setEditorProperties, setEditorType, setEditorType, setEditorType, setEditorValueFormatter, setEditorValueParser, setEditPendingCSSText, setEditProxyConstructor, setEmptyDisplayValue, setEmptyValueIcon, setEndRow, setErrorFormatter, setErrorIconHeight, setErrorIconProperties, setErrorIconSrc, setErrorIconWidth, setErrorMessageWidth, setErrorOrientation, setErrors, setErrors, setEscapeHTML, setExportFormat, setFetchMissingValues, setFilterLocally, setForeignDisplayField, setFormat, setFormula, setGlobalTabIndex, 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, setOptionCriteria, setOptionDataSource, setOptionFilterContext, setOptionTextMatchStyle, setOriginalValueMessage, setPickerIconHeight, setPickerIconName, setPickerIconPrompt, setPickerIconProperties, setPickerIconSrc, setPickerIconStyle, setPickerIconWidth, setPrintReadOnlyTextBoxStyle, setPrintTextBoxStyle, setPrintTitleStyle, setProperty, setProperty, setProperty, setProperty, setProperty, setReadOnlyCanSelectText, setReadOnlyControlStyle, setReadOnlyDisplay, setReadOnlyHover, setReadOnlyTextBoxStyle, setReadOnlyWhen, setRedrawOnChange, setRejectInvalidValueOnChange, setRequired, setRequiredMessage, setRequiredWhen, setRowSpan, setSaveOnEnter, setScClassName, setSelectOnClick, setSelectOnFocus, 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, setTextBoxStyle, 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, 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
-
MultiComboBoxItem
public MultiComboBoxItem() -
MultiComboBoxItem
-
MultiComboBoxItem
-
MultiComboBoxItem
-
-
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
-
setAddUnknownValues
Similar toComboBoxItem.addUnknownValues
, controls whether additional values can be added to the ComboBox or whether the user must choose from the available values in the picklist only.If this setting is changed after the MultiComboBoxItem has been created, the current value of the item is reset to null and all buttons for non-default values (values not in the
FormItem.defaultValue
array) are removed.- Parameters:
addUnknownValues
- New addUnknownValues value. Default value is false- Returns:
MultiComboBoxItem
instance, for chaining setter calls
-
getAddUnknownValues
Similar toComboBoxItem.addUnknownValues
, controls whether additional values can be added to the ComboBox or whether the user must choose from the available values in the picklist only.If this setting is changed after the MultiComboBoxItem has been created, the current value of the item is reset to null and all buttons for non-default values (values not in the
FormItem.defaultValue
array) are removed.- Returns:
- Current addUnknownValues value. Default value is false
-
setAlwaysExitOnTab
If true, hitting tab always exits the field, and will also add a value to the list of selected values if there is match (and depending on the setting foraddUnknownValues
).If false, if the user has typed in a value and hits tab, focus remains in the field. If there is a match or if
addUnknownValues
is true, a value will be added. Otherwise, the input cursor remains at the end of the entered value.- Parameters:
alwaysExitOnTab
- New alwaysExitOnTab value. Default value is true- Returns:
MultiComboBoxItem
instance, for chaining setter calls
-
getAlwaysExitOnTab
If true, hitting tab always exits the field, and will also add a value to the list of selected values if there is match (and depending on the setting foraddUnknownValues
).If false, if the user has typed in a value and hits tab, focus remains in the field. If there is a match or if
addUnknownValues
is true, a value will be added. Otherwise, the input cursor remains at the end of the entered value.- Returns:
- Current alwaysExitOnTab value. Default value is true
-
setAutoFetchData
Should the MultiComboBoxItem fetch data from thedata source
immediately or wait until the user first opens the pickList.- Parameters:
autoFetchData
- New autoFetchData value. Default value is false- Returns:
MultiComboBoxItem
instance, for chaining setter calls- See Also:
-
getAutoFetchData
Should the MultiComboBoxItem fetch data from thedata source
immediately or wait until the user first opens the pickList.- Returns:
- Current autoFetchData value. Default value is false
- See Also:
-
setAutoFitButtons
Specifies whether to autofit the buttons in the MultiComboBoxItem. The default value is true iflayoutStyle
is "flow", but false for a layoutStyle of "vertical" or "verticalReverse". If thelayoutStyle
is "horizontal" or "horizontalReverse" then the buttons will autofit regardless of the setting of this property.
If this method is called after the component has been drawn/initialized: Sets theautoFitButtons
property.- Parameters:
autoFitButtons
- whether to autofit the buttons. Default value is null- Returns:
MultiComboBoxItem
instance, for chaining setter calls
-
getAutoFitButtons
Specifies whether to autofit the buttons in the MultiComboBoxItem. The default value is true iflayoutStyle
is "flow", but false for a layoutStyle of "vertical" or "verticalReverse". If thelayoutStyle
is "horizontal" or "horizontalReverse" then the buttons will autofit regardless of the setting of this property.- Returns:
- Current autoFitButtons value. Default value is null
-
setAutoOpenTree
When this item is showing a tree-based picker, which nodes should be opened automatically. Options are:- "none" - no nodes are opened automatically
- "root" - opens the top-level node - in databound tree-pickers, this node is always hidden
- "all" - when
loading data on demand
, opens the top-level node and all of it's direct descendants - otherwise, opens all loaded nodes
- Parameters:
autoOpenTree
- New autoOpenTree value. Default value is "none"- Returns:
MultiComboBoxItem
instance, for chaining setter calls
-
getAutoOpenTree
When this item is showing a tree-based picker, which nodes should be opened automatically. Options are:- "none" - no nodes are opened automatically
- "root" - opens the top-level node - in databound tree-pickers, this node is always hidden
- "all" - when
loading data on demand
, opens the top-level node and all of it's direct descendants - otherwise, opens all loaded nodes
- Returns:
- Current autoOpenTree value. Default value is "none"
-
getButton
Note : This API is non-functional (always returns null) and exists only to make you aware that this MultiAutoChild exists. SeeUsing AutoChildren
for details.An
com.smartgwt.client.types.AutoChild
attribute used to create the buttons in the MultiComboBoxItem.- Returns:
- null
-
getComboBox
Ancom.smartgwt.client.types.AutoChild
attribute to create the combo box in a MultiComboBoxItem.This component is an AutoChild named "comboBox". For an overview of how to use and configure AutoChildren, see
Using AutoChildren
.- Returns:
- Current comboBox value. Default value is null
-
setComboBoxWidth
Specifies the size of the combo box field.Note that this attribute only has an effect in "flow", "horizontal", and "horizontalReverse"
modes
. In the other modes, the combo box is as wide as the overall MultiComboBoxItem.- Parameters:
comboBoxWidth
- New comboBoxWidth value. Default value is 130- Returns:
MultiComboBoxItem
instance, for chaining setter calls
-
getComboBoxWidth
public int getComboBoxWidth()Specifies the size of the combo box field.Note that this attribute only has an effect in "flow", "horizontal", and "horizontalReverse"
modes
. In the other modes, the combo box is as wide as the overall MultiComboBoxItem.- Returns:
- Current comboBoxWidth value. Default value is 130
-
getComboForm
TheDynamicForm
holding thecomboBox
.This component is an AutoChild named "comboForm". For an overview of how to use and configure AutoChildren, see
Using AutoChildren
.- Returns:
- Current comboForm value. Default value is null
-
setDataSetType
Whether to show the picker as a flat list, or a collapsible tree.The default value, "list", will use an instance of the pickListConstructor as the picker - "tree" will show an instance of pickTreeConstructor.
- Parameters:
dataSetType
- New dataSetType value. Default value is "list"- Returns:
MultiComboBoxItem
instance, for chaining setter calls
-
getDataSetType
Whether to show the picker as a flat list, or a collapsible tree.The default value, "list", will use an instance of the pickListConstructor as the picker - "tree" will show an instance of pickTreeConstructor.
- Returns:
- Current dataSetType value. Default value is "list"
-
setDeselectedButtonStyle
WhenshowDeletions
istrue
, theButton.baseStyle
used onbuttons
for values that have been deleted (also called "deselected buttons").If unset, then the
baseStyle
of deselected buttons is not changed.NOTE: Deselected buttons are also disabled, so styling should be provided for the
deselectedButtonStyle
+ "Disabled" style name.- Parameters:
deselectedButtonStyle
- New deselectedButtonStyle value. Default value is "buttonDeselected"- Returns:
MultiComboBoxItem
instance, for chaining setter calls- See Also:
-
getDeselectedButtonStyle
WhenshowDeletions
istrue
, theButton.baseStyle
used onbuttons
for values that have been deleted (also called "deselected buttons").If unset, then the
baseStyle
of deselected buttons is not changed.NOTE: Deselected buttons are also disabled, so styling should be provided for the
deselectedButtonStyle
+ "Disabled" style name.- Returns:
- Current deselectedButtonStyle value. Default value is "buttonDeselected"
- See Also:
-
setDisplayField
ThedisplayField
of the combo box.Note : This is an advanced setting
- Overrides:
setDisplayField
in classFormItem
- Parameters:
displayField
- New displayField value. Default value is null- Returns:
MultiComboBoxItem
instance, for chaining setter calls- See Also:
-
getDisplayField
ThedisplayField
of the combo box.- Overrides:
getDisplayField
in classFormItem
- Returns:
- Current displayField value. Default value is null
- See Also:
-
setLayoutStyle
Specifies the layout style of the combo box and the buttons in the MultiComboBoxItem. Available values are "flow" (the default), "horizontal", "horizontalReverse", "vertical", and "verticalReverse".- "flow": The buttons appear to the left of the combo box. When there is no more room, the combo box and/or buttons flow onto a new line. The buttons autoFit by default.
- "horizontal": The combo box appears on right and buttons are horizontally stacked directly left of it. The buttons must autofit.
- "horizontalReverse": Like "horizontal" but the combo box appears on the left. The buttons must autofit.
- "vertical": The combo box appears on top and buttons are stacked beneath it. Buttons do not autofit by default.
- "verticalReverse": Like "vertical" but the combo box appears at bottom. The buttons do not autofit by default.
- Parameters:
layoutStyle
- the new layout style. Default value is "flow"- Returns:
MultiComboBoxItem
instance, for chaining setter calls
-
getLayoutStyle
Specifies the layout style of the combo box and the buttons in the MultiComboBoxItem. Available values are "flow" (the default), "horizontal", "horizontalReverse", "vertical", and "verticalReverse".- "flow": The buttons appear to the left of the combo box. When there is no more room, the combo box and/or buttons flow onto a new line. The buttons autoFit by default.
- "horizontal": The combo box appears on right and buttons are horizontally stacked directly left of it. The buttons must autofit.
- "horizontalReverse": Like "horizontal" but the combo box appears on the left. The buttons must autofit.
- "vertical": The combo box appears on top and buttons are stacked beneath it. Buttons do not autofit by default.
- "verticalReverse": Like "vertical" but the combo box appears at bottom. The buttons do not autofit by default.
- Returns:
- Current layoutStyle value. Default value is "flow"
-
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:
MultiComboBoxItem
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:
-
setPendingButtonStyle
WhenshowPending
istrue
, theButton.baseStyle
used onbuttons
that are in the "Pending" visual state.If unset, then the
baseStyle
of pending buttons is not changed.- Parameters:
pendingButtonStyle
- New pendingButtonStyle value. Default value is "buttonPending"- Returns:
MultiComboBoxItem
instance, for chaining setter calls- See Also:
-
getPendingButtonStyle
WhenshowPending
istrue
, theButton.baseStyle
used onbuttons
that are in the "Pending" visual state.If unset, then the
baseStyle
of pending buttons is not changed.- Returns:
- Current pendingButtonStyle value. Default value is "buttonPending"
- See Also:
-
setPickListConstructor
The Class to use when creating a picker of type "list" for a FormItem. Must be a subclass of the builtin default,PickListMenu
.- Parameters:
pickListConstructor
- New pickListConstructor value. Default value is "PickListMenu"- Returns:
MultiComboBoxItem
instance, for chaining setter calls- See Also:
-
getPickListConstructor
The Class to use when creating a picker of type "list" for a FormItem. Must be a subclass of the builtin default,PickListMenu
.- Returns:
- Current pickListConstructor value. Default value is "PickListMenu"
- See Also:
-
setPickTreeConstructor
The Class to use when creating a picker of type "tree" for a FormItem. Must be a subclass of the builtin default, PickTreeMenu.- Parameters:
pickTreeConstructor
- New pickTreeConstructor value. Default value is "PickTreeMenu"- Returns:
MultiComboBoxItem
instance, for chaining setter calls- See Also:
-
getPickTreeConstructor
The Class to use when creating a picker of type "tree" for a FormItem. Must be a subclass of the builtin default, PickTreeMenu.- Returns:
- Current pickTreeConstructor value. Default value is "PickTreeMenu"
- See Also:
-
setRootNodeId
When this item is showing a tree-based picker, this is theid
of the record to use as theroot
node.- Parameters:
rootNodeId
- New rootNodeId value. Default value is null- Returns:
MultiComboBoxItem
instance, for chaining setter calls
-
getRootNodeId
When this item is showing a tree-based picker, this is theid
of the record to use as theroot
node.- Returns:
- Current rootNodeId value. Default value is null
-
setRootNodeId
When this item is showing a tree-based picker, this is theid
of the record to use as theroot
node.- Parameters:
rootNodeId
- New rootNodeId value. Default value is null- Returns:
MultiComboBoxItem
instance, for chaining setter calls
-
getRootNodeIdAsInt
When this item is showing a tree-based picker, this is theid
of the record to use as theroot
node.- Returns:
- Current rootNodeId value. Default value is null
-
setShouldSaveValue
Should this item's value be saved in the form's values and hence returned fromform.getValues()
?shouldSaveValue:false
is used to mark formItems which do not correspond to the underlying data model and should not save a value into the form'svalues
. Example includes visual separators, password re-type fields, or checkboxes used to show/hide other form items.A
shouldSaveValue:false
item should be given a value either viaFormItem.defaultValue
or by callingform.setValue(item, value)
orformItem.setValue(value)
. Providing a value viaform.values
orform.setValues()
will automatically switch the item toshouldSaveValue:true
.Note that
- if an item is shouldSaveValue true, but has no name, a warning is logged, and shouldSaveValue will be set to false.
- Overrides:
setShouldSaveValue
in classCanvasItem
- Parameters:
shouldSaveValue
- New shouldSaveValue value. Default value is true- Returns:
MultiComboBoxItem
instance, for chaining setter calls
-
getShouldSaveValue
Should this item's value be saved in the form's values and hence returned fromform.getValues()
?shouldSaveValue:false
is used to mark formItems which do not correspond to the underlying data model and should not save a value into the form'svalues
. Example includes visual separators, password re-type fields, or checkboxes used to show/hide other form items.A
shouldSaveValue:false
item should be given a value either viaFormItem.defaultValue
or by callingform.setValue(item, value)
orformItem.setValue(value)
. Providing a value viaform.values
orform.setValues()
will automatically switch the item toshouldSaveValue:true
.Note that
- if an item is shouldSaveValue true, but has no name, a warning is logged, and shouldSaveValue will be set to false.
- Overrides:
getShouldSaveValue
in classCanvasItem
- Returns:
- Current shouldSaveValue value. Default value is true
-
setUseInsertionOrder
Specifies whether to arrange the buttons of the MultiComboBoxItem in the order that they were selected (the default), or to sort the buttons bydisplayField
.- Parameters:
useInsertionOrder
- New useInsertionOrder value. Default value is true- Returns:
MultiComboBoxItem
instance, for chaining setter calls
-
getUseInsertionOrder
Specifies whether to arrange the buttons of the MultiComboBoxItem in the order that they were selected (the default), or to sort the buttons bydisplayField
.- Returns:
- Current useInsertionOrder value. Default value is true
-
setValueField
ThevalueField
of the combo box.- Overrides:
setValueField
in classFormItem
- Parameters:
valueField
- New valueField value. Default value is null- Returns:
MultiComboBoxItem
instance, for chaining setter calls- See Also:
-
getValueField
ThevalueField
of the combo box.- Overrides:
getValueField
in classFormItem
- Returns:
- Current valueField value. Default value is null
- See Also:
-
getValueLayout
Note : This API is non-functional (always returns null) and exists only to make you aware that this MultiAutoChild exists. SeeUsing AutoChildren
for details.The layout used to arrange the
comboForm
and the buttons representing the values of the MultiComboBoxItem. Note that the constructor cannot be changed (setting a valueLayoutConstructor has no effect) because the exact layout class used depends on the currentlayout style
.- Returns:
- null
-
pendingStatusChanged
public boolean pendingStatusChanged(DynamicForm form, FormItem item, boolean pendingStatus, Object newValue, Object value) Notification method called whenshowPending
is enabled and thisMultiComboBoxItem
should either clear or show its pending visual state.The default behavior is that the
titleStyle
andcellStyle
are updated to include/exclude the "Pending" suffix. In addition, when displayed in the pending state and apendingButtonStyle
is set, then:- If
useInsertionOrder
isfalse
, buttons for any new values will have theirbaseStyle
set topendingButtonStyle
; otherwise - (
useInsertionOrder
istrue
) buttons for values will have theirbaseStyle
set topendingButtonStyle
if either the value is new or it is in a different place within the value array.
false
will cancel this default behavior.- Parameters:
form
- the managingDynamicForm
instance.item
- the form item itself (also available as "this").pendingStatus
-true
if the item should show its pending visual state;false
otherwise.newValue
- the current form item value.value
- the value that would be restored by a call toDynamicForm.resetValues()
.- Returns:
false
to cancel the default behavior.
- If
-
showValue
This method will be called whenever this FormItem's value is being set via a programmatic call to e.g:DynamicForm.setValues()
orFormItem.setValue()
and may be overridden by CanvasItems intended to support displaying data values to update the embedded Canvas to reflect the value passed in.The value of a MultiComboBoxItem to the form is an array of valueField values corresponding to the selected combo box options.
- Parameters:
displayValue
- new display value for the item. This is the value after applying any custom formatter or valueMapdataValue
- underlying data value for the itemform
- the dynamicForm in which this item is containeditem
- the live form item instance
-
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:
multiComboBoxItemProperties
- properties that should be used as new defaults when instances of this class are created- See Also:
-
getButtonDefaults
Default properties to be used in creating eachIButton
.- Returns:
- IButton
-
setButtonProperties
Properties to be used in creating each option button.Note : This is an advanced setting
- Parameters:
buttonProperties
- buttonProperties
-
getButtonProperties
Properties to be used in creating each option button.- Returns:
- IButton
-
getComboBoxDefaults
Default properties for theComboBoxItem
in a MultiComboBoxItem.- Returns:
- ComboBoxItem
-
setComboBoxProperties
Properties to be used in creating aComboBoxItem
.Note : This is an advanced setting
- Parameters:
comboBoxProperties
- comboBoxProperties Default value is null
-
getComboBoxProperties
Properties to be used in creating aComboBoxItem
.- Returns:
- ComboBoxItem
-
setOptionDataSource
TheoptionDataSource
of the combo box.- Overrides:
setOptionDataSource
in classFormItem
- Parameters:
optionDataSource
- optionDataSource Default value is null- Returns:
MultiComboBoxItem
instance, for chaining setter calls- See Also:
-
getOptionDataSource
TheoptionDataSource
of the combo box.- Overrides:
getOptionDataSource
in classFormItem
- Returns:
- DataSource
- See Also:
-
getValues
-
setValues
-