public class MultiComboBoxItem extends CanvasItem
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()
.ComboBoxItem
FormItem.CustomStateGetter, FormItem.StateCustomizer
scClassName, warnOnEditorTypeConversion, warnOnEditorTypeConversionDefault
id
factoryCreated, factoryProperties, readOnly
Constructor and Description |
---|
MultiComboBoxItem() |
MultiComboBoxItem(com.google.gwt.core.client.JavaScriptObject jsObj) |
MultiComboBoxItem(java.lang.String name) |
MultiComboBoxItem(java.lang.String name,
java.lang.String title) |
Modifier and Type | Method and Description |
---|---|
static void |
changeAutoChildDefaults(java.lang.String autoChildName,
Canvas defaults)
Changes the defaults for Canvas AutoChildren named
autoChildName . |
static void |
changeAutoChildDefaults(java.lang.String autoChildName,
FormItem defaults)
Changes the defaults for FormItem AutoChildren named
autoChildName . |
static void |
changePickerIconDefaults(FormItemIcon defaults) |
java.lang.Boolean |
getAddUnknownValues()
Similar to
ComboBoxItem.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. |
java.lang.Boolean |
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 for
addUnknownValues ). |
java.lang.Boolean |
getAutoFetchData()
Should the MultiComboBoxItem fetch data from the
data source immediately or wait until the
user first opens the pickList. |
java.lang.Boolean |
getAutoFitButtons()
Specifies whether to autofit the buttons in the MultiComboBoxItem.
|
IButton |
getButton()
Note : This API is non-functional (always returns null) and exists only to make
you aware that this MultiAutoChild exists.
|
IButton |
getButtonDefaults()
Default properties to be used in creating each
IButton . |
IButton |
getButtonProperties()
Properties to be used in creating each option button.
|
ComboBoxItem |
getComboBox()
An
com.smartgwt.client.types.AutoChild attribute to create the combo box in a MultiComboBoxItem. |
ComboBoxItem |
getComboBoxDefaults()
Default properties for the
ComboBoxItem in a MultiComboBoxItem. |
ComboBoxItem |
getComboBoxProperties()
Properties to be used in creating a
ComboBoxItem . |
int |
getComboBoxWidth()
Specifies the size of the combo box field.
|
DynamicForm |
getComboForm()
The
DynamicForm holding the comboBox . |
java.lang.String |
getDeselectedButtonStyle()
When
showDeletions is true , the
Button.baseStyle used on buttons for values that have been deleted (also
called "deselected buttons"). |
java.lang.String |
getDisplayField()
The
displayField of the combo box. |
MultiComboBoxLayoutStyle |
getLayoutStyle()
Specifies the layout style of the combo box and the buttons in the MultiComboBoxItem.
|
DataSource |
getOptionDataSource()
The
optionDataSource of the combo box. |
static MultiComboBoxItem |
getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj) |
java.lang.String |
getPendingButtonStyle()
When
showPending is true , the
Button.baseStyle used on buttons that are in the "Pending" visual state. |
java.lang.Boolean |
getShouldSaveValue()
Should this item's value be saved in the form's values and hence returned from
form.getValues() ? |
java.lang.Boolean |
getUseInsertionOrder()
Specifies whether to arrange the buttons of the MultiComboBoxItem in the order that they were selected (the default), or
to sort the buttons by
displayField . |
java.lang.String |
getValueField()
The
valueField of the combo box. |
Layout |
getValueLayout()
Note : This API is non-functional (always returns null) and exists only to make
you aware that this MultiAutoChild exists.
|
java.lang.String[] |
getValues() |
boolean |
pendingStatusChanged(DynamicForm form,
FormItem item,
boolean pendingStatus,
java.lang.Object newValue,
java.lang.Object value)
Notification method called when
showPending is
enabled and this MultiComboBoxItem should either clear or show its pending visual state. |
void |
setAddUnknownValues(java.lang.Boolean addUnknownValues)
Similar to
ComboBoxItem.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. |
void |
setAlwaysExitOnTab(java.lang.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 for
addUnknownValues ). |
void |
setAutoFetchData(java.lang.Boolean autoFetchData)
Should the MultiComboBoxItem fetch data from the
data source immediately or wait until the
user first opens the pickList. |
void |
setAutoFitButtons(java.lang.Boolean autoFitButtons)
Specifies whether to autofit the buttons in the MultiComboBoxItem.
|
void |
setButtonProperties(IButton buttonProperties)
Properties to be used in creating each option button.
|
void |
setComboBoxProperties(ComboBoxItem comboBoxProperties)
Properties to be used in creating a
ComboBoxItem . |
void |
setComboBoxWidth(int comboBoxWidth)
Specifies the size of the combo box field.
|
static void |
setDefaultProperties(MultiComboBoxItem multiComboBoxItemProperties)
Class level method to set the default properties of this class.
|
void |
setDeselectedButtonStyle(java.lang.String deselectedButtonStyle)
When
showDeletions is true , the
Button.baseStyle used on buttons for values that have been deleted (also
called "deselected buttons"). |
void |
setDisplayField(java.lang.String displayField)
The
displayField of the combo box. |
void |
setLayoutStyle(MultiComboBoxLayoutStyle layoutStyle)
Specifies the layout style of the combo box and the buttons in the MultiComboBoxItem.
|
void |
setOptionDataSource(DataSource optionDataSource)
The
optionDataSource of the combo box. |
void |
setPendingButtonStyle(java.lang.String pendingButtonStyle)
When
showPending is true , the
Button.baseStyle used on buttons that are in the "Pending" visual state. |
void |
setShouldSaveValue(java.lang.Boolean shouldSaveValue)
Should this item's value be saved in the form's values and hence returned from
form.getValues() ? |
void |
setUseInsertionOrder(java.lang.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 by
displayField . |
void |
setValueField(java.lang.String valueField)
The
valueField of the combo box. |
void |
setValues(java.lang.Object... values) |
void |
showValue(java.lang.Object displayValue,
java.lang.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() or FormItem.setValue() and may be overridden by CanvasItems
intended to support displaying data values to update the embedded Canvas to reflect the value passed in. |
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
_getValue, addBlurHandler, addChangedHandler, addChangeHandler, addClickHandler, addDoubleClickHandler, addEditorEnterHandler, addEditorExitHandler, addFocusHandler, addIconClickHandler, addIconKeyPressHandler, addItemHoverHandler, addKeyDownHandler, addKeyPressHandler, addKeyUpHandler, addPendingStatusChangedHandler, addPickerIconClickHandler, addShowContextMenuHandler, addTitleClickHandler, addTitleDoubleClickHandler, addTitleHoverHandler, addValueHoverHandler, addValueIconClickHandler, applyFormula, asSGWTComponent, blurItem, canEditCriterion, clearErrors, clearValue, disable, disableIcon, enable, enableIcon, error, error, errorIfNotCreated, focusInItem, getAccessKey, getAlign, getAllowExpressions, getAlwaysFetchMissingValues, getApplyAlignToText, getApplyHeightToTextBox, getAriaRole, getAttribute, getAttributeAsBoolean, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsFloat, getAttributeAsInt, getAttributeAsJavaScriptObject, getAttributeAsObject, getAttributeAsString, getAutoComplete, getBrowserInputType, getBrowserSpellCheck, getCanEdit, getCanEditOpaqueValues, getCanFocus, getCanSelectText, getCanTabToIcons, getCanvasAutoChild, getCellHeight, getCellStyle, getChangeOnKeypress, getClassName, getClipStaticValue, getClipTitle, getConfig, getContainerWidget, getControlStyle, getCriteriaField, getCriterion, getCriterion, getCursorPosition, getCustomState, getDataPath, getDateFormatter, getDecimalPad, getDecimalPrecision, getDefaultIconSrc, getDisabled, getDisableIconsOnReadOnly, getDisplayFieldName, getDisplayValue, getDisplayValue, getEditorTypeConfig, getEditPendingCSSText, getEditProxyConstructor, getEmptyDisplayValue, getEmptyValueIcon, getEndRow, getErrorIconHeight, getErrorIconSrc, getErrorIconWidth, getErrorMessageWidth, getErrors, getExportFormat, getFetchMissingValues, getFieldName, getFilterLocally, getForeignDisplayField, getForm, getFormat, getFormItemAutoChild, getFormula, getFullDataPath, getGlobalTabIndex, getGridColNum, getGridRowNum, getHidden, getHint, getHintStyle, getHoverAlign, getHoverDelay, getHoverHeight, getHoverOpacity, getHoverStyle, getHoverVAlign, getHoverWidth, getIcon, getIconHeight, getIconHSpace, getIconPageRect, getIconPrompt, getIconRect, getIconVAlign, getIconWidth, getImageURLPrefix, getImageURLSuffix, getImplicitSave, getImplicitSaveOnBlur, getInputFormat, getLeft, getLoadingDisplayValue, getLocateItemBy, getMinHintWidth, getMultipleValueSeparator, getName, getOperator, getOptionCriteria, getOptionDataSourceAsString, getOptionFilterContext, getOptionOperationId, getOriginalValueMessage, getPageLeft, getPageRect, getPageTop, getPicker, getPickerIconHeight, getPickerIconName, getPickerIconPrompt, getPickerIconProperties, getPickerIconSrc, getPickerIconStyle, getPickerIconWidth, getPixelHeight, getPixelWidth, getPrintTextBoxStyle, getPrintTitleStyle, getReadOnlyDisplay, getReadOnlyHover, getReadOnlyTextBoxStyle, getReadOnlyWhen, getRect, getRedrawOnChange, getRejectInvalidValueOnChange, getRequired, getRequiredMessage, getRequiredWhen, getRowSpan, getSaveOnEnter, getScClassName, getSelectedRecord, getSelectOnClick, getSelectOnFocus, getShowClippedTitleOnHover, getShowClippedValueOnHover, getShowDeletions, getShowDisabled, getShowErrorIcon, getShowErrorStyle, getShowErrorText, getShowFocused, getShowFocusedErrorState, getShowFocusedIcons, getShowFocusedPickerIcon, getShowHint, getShowIcons, getShowOldValueInHover, getShowOver, getShowOverIcons, getShowPending, getShowPickerIcon, getShowRTL, getShowTitle, getShowValueIconOnly, getStartRow, getStaticHeight, getStopOnError, getSupportsCutPasteEvents, getSuppressValueIcon, getSynchronousValidation, getTabIndex, getTextAlign, getTextBoxStyle, getTextFormula, getTimeFormatter, getTitle, getTitleAlign, getTitleColSpan, getTitleOrientation, getTitleStyle, getTitleVAlign, getTooltip, getTop, getType, getUpdateControlOnOver, getUpdatePickerIconOnOver, getUpdateTextBoxOnOver, getUseDisabledHintStyleForReadOnly, getValidateOnChange, getValidateOnExit, getValidOperators, getVAlign, getValue, getValueAsRecordList, getValueDeselectedCSSText, getValueFieldName, getValueIconHeight, getValueIconLeftPadding, getValueIconRightPadding, getValueIconSize, getValueIconWidth, getVisible, getVisibleHeight, getVisibleTitleWidth, getVisibleWhen, getVisibleWidth, getWarnOnEditorTypeConversion, getWarnOnEditorTypeConversionDefault, getWidth, getWidthAsString, getWrapHintText, getWrapTitle, handleWarnOnEditorTypeConversion, hasErrors, hide, hideIcon, invalidateDisplayValueCache, isCreated, isCutEvent, isDisabled, isDrawn, isInGrid, isPasteEvent, isVisible, linkToInstanceUponCreate, mapDisplayToValue, mapValueToDisplay, mapValueToDisplay, mapValueToDisplay, redraw, redraw, setAccessKey, setAlign, setAllowExpressions, setAlwaysFetchMissingValues, 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, setBrowserInputType, setBrowserSpellCheck, setCanEdit, setCanEditOpaqueValues, setCanFocus, setCanSelectText, setCanTabToIcons, setCellHeight, setCellStyle, setChangeOnKeypress, setClipStaticValue, setClipTitle, setColSpan, setColSpan, setControlStyle, setCriteriaField, setCriterion, setCustomStateGetter, setDataPath, setDateFormatter, setDecimalPad, setDecimalPrecision, setDefaultIconSrc, setDefaultProperties, setDefaultValue, setDefaultValue, setDefaultValue, setDefaultValue, setDefaultValue, setDefaultValue, setDefaultValue, setDisabled, setDisableIconsOnReadOnly, setDisplayFormat, setDisplayFormat, setEditorProperties, setEditorType, setEditorType, setEditorType, setEditorValueFormatter, setEditorValueParser, setEditPendingCSSText, setEditProxyConstructor, setEmptyDisplayValue, setEmptyValueIcon, setEndRow, setErrorFormatter, setErrorIconHeight, setErrorIconSrc, setErrorIconWidth, setErrorMessageWidth, setErrorOrientation, setErrors, setErrors, setExportFormat, setFetchMissingValues, setFilterLocally, setForeignDisplayField, setFormat, setFormula, setGlobalTabIndex, setHidden, setHint, setHintStyle, setHoverAlign, setHoverDelay, setHoverHeight, setHoverOpacity, setHoverStyle, setHoverVAlign, setHoverWidth, setIconDisabled, setIconHeight, setIconHSpace, setIconPrompt, setIcons, setIconVAlign, setIconWidth, setImageURLPrefix, setImageURLSuffix, setImplicitSave, setImplicitSaveOnBlur, setInitHandler, setInputFormat, setInputTransformer, setItemHoverFormatter, setItemTitleHoverFormatter, setItemValueHoverFormatter, setJavaScriptObject, setLeft, setLoadingDisplayValue, setLocateItemBy, setMinHintWidth, setMultipleValueSeparator, setName, setNullProperty, setOperator, setOptionCriteria, setOptionDataSource, setOptionFilterContext, setOptionOperationId, setOriginalValueMessage, setPickerIconHeight, setPickerIconName, setPickerIconPrompt, setPickerIconProperties, setPickerIconSrc, setPickerIconStyle, setPickerIconWidth, setPrintTextBoxStyle, setPrintTitleStyle, setProperty, setProperty, setProperty, setProperty, setProperty, setReadOnlyDisplay, setReadOnlyHover, setReadOnlyTextBoxStyle, setReadOnlyWhen, setRedrawOnChange, setRejectInvalidValueOnChange, setRequired, setRequiredMessage, setRequiredWhen, setRowSpan, setSaveOnEnter, setScClassName, setSelectOnClick, setSelectOnFocus, setShowClippedTitleOnHover, setShowClippedValueOnHover, setShowDeletions, setShowDisabled, setShowErrorIcon, setShowErrorStyle, setShowErrorText, setShowFocused, setShowFocusedErrorState, setShowFocusedIcons, setShowFocusedPickerIcon, setShowHint, setShowIcons, setShowIfCondition, setShowOldValueInHover, setShowOver, setShowOverIcons, setShowPending, setShowPickerIcon, setShowRTL, setShowTitle, setShowValueIconOnly, setStartRow, setStateCustomizer, setStaticHeight, setStopOnError, setSupportsCutPasteEvents, setSuppressValueIcon, setSynchronousValidation, setTabIndex, setTextAlign, setTextBoxStyle, setTextFormula, setTimeFormatter, setTitle, setTitleAlign, setTitleColSpan, setTitleHoverFormatter, setTitleOrientation, setTitleStyle, setTitleVAlign, setTooltip, setTop, setType, setUpdateControlOnOver, setUpdatePickerIconOnOver, setUpdateTextBoxOnOver, setUseDisabledHintStyleForReadOnly, 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, setWrapTitle, shouldApplyHeightToTextBox, shouldFetchMissingValue, shouldSaveOnEnter, shouldStopKeyPressBubbling, show, showIcon, showPicker, stopHover, storeValue, updateState, validate, valueClipped
getRef, getRef, internalSetID
applyFactoryProperties, doAddHandler, fireEvent, getAttributeAsDoubleArray, getAttributeAsIntArray, getAttributeAsLong, getAttributeAsMap, getAttributeAsObject, getAttributeAsRecord, getAttributeAsStringArray, getAttributes, getHandlerCount, getReadOnly, isFactoryCreated, logConfiguration, setAttribute, setAttribute, setAttribute, setAttributeAsJavaObject, setFactoryCreated, setReadOnly
public MultiComboBoxItem()
public MultiComboBoxItem(com.google.gwt.core.client.JavaScriptObject jsObj)
public MultiComboBoxItem(java.lang.String name)
public MultiComboBoxItem(java.lang.String name, java.lang.String title)
public static MultiComboBoxItem getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)
public static void changeAutoChildDefaults(java.lang.String autoChildName, Canvas defaults)
autoChildName
.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, see SGWTProperties
.AutoChildUsage
public static void changeAutoChildDefaults(java.lang.String autoChildName, FormItem defaults)
autoChildName
.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, see SGWTProperties
.AutoChildUsage
public static void changePickerIconDefaults(FormItemIcon defaults)
public void setAddUnknownValues(java.lang.Boolean addUnknownValues)
ComboBoxItem.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.
addUnknownValues
- Default value is falsepublic java.lang.Boolean getAddUnknownValues()
ComboBoxItem.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.
public void setAlwaysExitOnTab(java.lang.Boolean alwaysExitOnTab)
addUnknownValues
). 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.
alwaysExitOnTab
- Default value is truepublic java.lang.Boolean getAlwaysExitOnTab()
addUnknownValues
). 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.
public void setAutoFetchData(java.lang.Boolean autoFetchData)
data source
immediately or wait until the
user first opens the pickList.autoFetchData
- Default value is falseComboBoxItem.setAutoFetchData(java.lang.Boolean)
public java.lang.Boolean getAutoFetchData()
data source
immediately or wait until the
user first opens the pickList.ComboBoxItem.getAutoFetchData()
public void setAutoFitButtons(java.lang.Boolean autoFitButtons)
layoutStyle
is "flow", but false for a
layoutStyle of "vertical" or "verticalReverse". If the layoutStyle
is "horizontal" or "horizontalReverse"
then the buttons will autofit regardless of the setting of this property.
autoFitButtons
property.autoFitButtons
- whether to autofit the buttons. Default value is nullpublic java.lang.Boolean getAutoFitButtons()
layoutStyle
is "flow", but false for a
layoutStyle of "vertical" or "verticalReverse". If the layoutStyle
is "horizontal" or "horizontalReverse"
then the buttons will autofit regardless of the setting of this property.public IButton getButton()
Using AutoChildren
for details.
An com.smartgwt.client.types.AutoChild
attribute used to create the buttons in the MultiComboBoxItem.
public ComboBoxItem getComboBox()
com.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
.
public void setComboBoxWidth(int comboBoxWidth)
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.
comboBoxWidth
- Default value is 130public int getComboBoxWidth()
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.
public DynamicForm getComboForm()
DynamicForm
holding the comboBox
.
This component is an AutoChild named "comboForm". For an overview of how to use and
configure AutoChildren, see Using AutoChildren
.
public void setDeselectedButtonStyle(java.lang.String deselectedButtonStyle)
showDeletions
is true
, the
Button.baseStyle
used on buttons
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.
deselectedButtonStyle
- CSSStyleName . Default value is "buttonDeselected"
,
setPendingButtonStyle(java.lang.String)
public java.lang.String getDeselectedButtonStyle()
showDeletions
is true
, the
Button.baseStyle
used on buttons
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.
CSSStyleName
,
getPendingButtonStyle()
public void setDisplayField(java.lang.String displayField)
displayField
of the combo box.
Note : This is an advanced setting
setDisplayField
in class FormItem
displayField
- Default value is nullComboBoxItem.setDisplayField(java.lang.String)
public java.lang.String getDisplayField()
displayField
of the combo box.getDisplayField
in class FormItem
ComboBoxItem.getDisplayField()
public void setLayoutStyle(MultiComboBoxLayoutStyle layoutStyle)
layoutStyle
- the new layout style. Default value is "flow"public MultiComboBoxLayoutStyle getLayoutStyle()
public void setPendingButtonStyle(java.lang.String pendingButtonStyle)
showPending
is true
, the
Button.baseStyle
used on buttons
that are in the "Pending" visual state.
If unset, then the baseStyle
of pending buttons is not changed.
pendingButtonStyle
- CSSStyleName . Default value is "buttonPending"
,
setDeselectedButtonStyle(java.lang.String)
public java.lang.String getPendingButtonStyle()
showPending
is true
, the
Button.baseStyle
used on buttons
that are in the "Pending" visual state.
If unset, then the baseStyle
of pending buttons is not changed.
CSSStyleName
,
getDeselectedButtonStyle()
public void setShouldSaveValue(java.lang.Boolean shouldSaveValue)
form.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's
values
. 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 via FormItem.defaultValue
or by calling form.setValue(item,
value)
or formItem.setValue(value)
. Providing a
value via form.values
or form.setValues()
will automatically switch the item to
shouldSaveValue:true
.
Note that
setShouldSaveValue
in class CanvasItem
shouldSaveValue
- Default value is truepublic java.lang.Boolean getShouldSaveValue()
form.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's
values
. 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 via FormItem.defaultValue
or by calling form.setValue(item,
value)
or formItem.setValue(value)
. Providing a
value via form.values
or form.setValues()
will automatically switch the item to
shouldSaveValue:true
.
Note that
getShouldSaveValue
in class CanvasItem
public void setUseInsertionOrder(java.lang.Boolean useInsertionOrder)
displayField
.useInsertionOrder
- Default value is truepublic java.lang.Boolean getUseInsertionOrder()
displayField
.public void setValueField(java.lang.String valueField)
valueField
of the combo box.setValueField
in class FormItem
valueField
- Default value is nullComboBoxItem.setValueField(java.lang.String)
public java.lang.String getValueField()
valueField
of the combo box.getValueField
in class FormItem
ComboBoxItem.getValueField()
public Layout getValueLayout()
Using 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 current layout style
.
public boolean pendingStatusChanged(DynamicForm form, FormItem item, boolean pendingStatus, java.lang.Object newValue, java.lang.Object value)
showPending
is
enabled and this MultiComboBoxItem
should either clear or show its pending visual state. The default
behavior is that the titleStyle
and cellStyle
are updated to include/exclude the "Pending"
suffix. In addition, when displayed in the pending state and a pendingButtonStyle
is set, then:
useInsertionOrder
is
false
, buttons for any new values will have their baseStyle
set to pendingButtonStyle
; otherwise
useInsertionOrder
is true
) buttons for values will have their baseStyle
set to pendingButtonStyle
if either the
value is new or it is in a different place within the value array. false
will cancel this
default behavior.form
- the managing DynamicForm
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 to DynamicForm.resetValues()
.false
to cancel the default behavior.public void showValue(java.lang.Object displayValue, java.lang.Object dataValue, DynamicForm form, CanvasItem item)
DynamicForm.setValues()
or FormItem.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.
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 instancepublic static void setDefaultProperties(MultiComboBoxItem multiComboBoxItemProperties)
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.
multiComboBoxItemProperties
- properties that should be used as new defaults when instances of this class are createdSGWTProperties
public IButton getButtonDefaults()
IButton
.public void setButtonProperties(IButton buttonProperties)
Note : This is an advanced setting
buttonProperties
- buttonPropertiespublic IButton getButtonProperties()
public ComboBoxItem getComboBoxDefaults()
ComboBoxItem
in a MultiComboBoxItem.public void setComboBoxProperties(ComboBoxItem comboBoxProperties)
ComboBoxItem
.
Note : This is an advanced setting
comboBoxProperties
- comboBoxProperties Default value is nullpublic ComboBoxItem getComboBoxProperties()
ComboBoxItem
.public void setOptionDataSource(DataSource optionDataSource)
optionDataSource
of the combo box.setOptionDataSource
in class FormItem
optionDataSource
- optionDataSource Default value is nullComboBoxItem.setOptionDataSource(com.smartgwt.client.data.DataSource)
public DataSource getOptionDataSource()
optionDataSource
of the combo box.getOptionDataSource
in class FormItem
ComboBoxItem.getOptionDataSource()
public final java.lang.String[] getValues()
public void setValues(java.lang.Object... values)