com.smartgwt.client.widgets.form.fields

## Class SelectOtherItem

- java.lang.Object
- - com.smartgwt.client.core.JsObject
  - - com.smartgwt.client.core.DataClass
    - - com.smartgwt.client.core.RefDataClass
      - - com.smartgwt.client.widgets.form.fields.FormItem
        - - com.smartgwt.client.widgets.form.fields.SelectItem
          - - com.smartgwt.client.widgets.form.fields.SelectOtherItem

- All Implemented Interfaces:
    com.google.gwt.event.shared.HasHandlers, HasBlurHandlers, HasChangedHandlers, HasChangeHandlers, HasClickHandlers, HasDataArrivedHandlers, HasDoubleClickHandlers, HasEditorEnterHandlers, HasEditorExitHandlers, HasFocusHandlers, HasIconClickHandlers, HasIconKeyPressHandlers, HasItemHoverHandlers, HasKeyDownHandlers, HasKeyPressHandlers, HasKeyUpHandlers, HasPickerIconClickHandlers, HasTitleClickHandlers, HasTitleDoubleClickHandlers, HasTitleHoverHandlers, HasValueHoverHandlers, HasValueIconClickHandlers, PickList

      public class SelectOtherItem
      extends SelectItem

  FormItem that shows a list of options, plus an "Other..." option that allows them to enter another value.

- - ### Field Summary

    - ### Fields inherited from class com.smartgwt.client.widgets.form.fields.FormItem

      `scClassName`

    - ### Fields inherited from class com.smartgwt.client.core.RefDataClass

      `id`

    - ### Fields inherited from class com.smartgwt.client.core.DataClass

      `factoryCreated, factoryProperties`

    - ### Fields inherited from class com.smartgwt.client.core.JsObject

      `jsObj`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SelectOtherItem()`
    `SelectOtherItem(com.google.gwt.core.client.JavaScriptObject jsObj)`
    `SelectOtherItem(java.lang.String name)`
    `SelectOtherItem(java.lang.String name, java.lang.String title)`

  - ### Method Summary

    Methods
    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, DrawItem defaults)` Changes the defaults for DrawItem 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)`
    `int` | `getDialogWidth()` Width for the "other value" prompt dialog.
    `static SelectOtherItem` | `getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)`
    `java.lang.String` | `getOtherTitle()` Title for the `Other...` item.
    `java.lang.String` | `getOtherValue()` Data value for the `Other...` item.
    `java.lang.String` | `getSelectOtherPrompt()` Title to show in prompt for "other" value.
    `java.lang.String` | `getSeparatorTitle()` Title for the separator between normal items and the `Other...` item in the drop down list.
    `java.lang.String` | `getSeparatorValue()` Value for the separator item between normal items and the `Other...` value.
    `static void` | `setDefaultProperties(SelectOtherItem selectOtherItemProperties)` Class level method to set the default properties of this class.
    `void` | `setDialogWidth(int dialogWidth)` Width for the "other value" prompt dialog.
    `void` | `setOtherTitle(java.lang.String otherTitle)` Title for the `Other...` item.
    `void` | `setOtherValue(java.lang.String otherValue)` Data value for the `Other...` item.
    `void` | `setSelectOtherPrompt(java.lang.String selectOtherPrompt)` Title to show in prompt for "other" value.
    `void` | `setSeparatorTitle(java.lang.String separatorTitle)` Title for the separator between normal items and the `Other...` item in the drop down list.
    `void` | `setSeparatorValue(java.lang.String separatorValue)` Value for the separator item between normal items and the `Other...` value.

    - ### Methods inherited from class com.smartgwt.client.widgets.form.fields.SelectItem

      `addDataArrivedHandler, defaultDynamicValue, fetchData, fetchData, fetchData, filterClientPickListData, getAddUnknownValues, getAllowEmptyValue, getAnimatePickList, getAnimationTime, getAutoFetchData, getCachePickListResults, getCanSelectText, getClientPickListData, getControlStyle, getDefaultToFirstOption, getDefaultValue, getDisplayField, getDisplayFieldName, getEditProxyConstructor, getEmptyDisplayValue, getEmptyPickListHeight, getEmptyPickListMessage, getEscapeHTML, getFetchDelay, getFetchDisplayedFieldsOnly, getFilterLocally, getHideEmptyPickList, getIconPlacement, getMultiple, getMultipleAppearance, getOpenOnDownArrow, getOpenOnSpace, getOptionDataSource, getOptionOperationId, getPickerClearButton, getPickerClearButtonTitle, getPickerExitButton, getPickerExitButtonTitle, getPickerIconHeight, getPickerIconSrc, getPickerIconStyle, getPickerIconWidth, getPickerNavigationBar, getPickListBaseStyle, getPickListCriteria, getPickListFields, getPickListFilterCriteria, getPickListHeaderHeight, getPickListHeight, getPickListPlacement, getPickListPlacementAsCanvas, getPickListPlacementAsString, getPickListWidth, getProgressiveLoading, getSaveOnEnter, getSelectedRecord, getSelectedRecords, getSeparateSpecialValues, getSeparateValuesList, getShowAllOptions, getShowFocused, getShowHintInField, getShowOptionsFromDataSource, getShowOver, getShowPickerIcon, getSortField, getSortFieldAsInt, getSpecialValues, getTextBoxStyle, getTextMatchStyle, getUseClientFiltering, getValueAsString, getValueField, getValueFieldName, getValueIconField, getValues, isMultiple, setAddUnknownValues, setAllowEmptyValue, setAnimatePickList, setAnimationTime, setAutoFetchData, setCachePickListResults, setCanSelectText, setControlStyle, setDefaultProperties, setDefaultToFirstOption, setDefaultValue, setDefaultValues, setDefaultValues, setDisplayField, setEditProxyConstructor, setEmptyDisplayValue, setEmptyPickListHeight, setEmptyPickListMessage, setEscapeHTML, setFetchDelay, setFetchDisplayedFieldsOnly, setFilterLocally, setHideEmptyPickList, setIconPlacement, setMultiple, setMultipleAppearance, setOpenOnDownArrow, setOpenOnSpace, setOptionDataSource, setOptionFilterContext, setOptionOperationId, setPickerClearButtonTitle, setPickerExitButtonTitle, setPickerIconHeight, setPickerIconSrc, setPickerIconStyle, setPickerIconWidth, setPickListBaseStyle, setPickListCriteria, setPickListCriteria, setPickListFields, setPickListFilterCriteriaFunction, setPickListFilterCriteriaFunction, setPickListHeaderHeight, setPickListHeight, setPickListPlacement, setPickListPlacement, setPickListPlacement, setPickListProperties, setPickListSort, setPickListWidth, setProgressiveLoading, setSaveOnEnter, setSeparateSpecialValues, setSeparatorRows, setShowAllOptions, setShowFocused, setShowHintInField, setShowOptionsFromDataSource, setShowOver, setShowPickerIcon, setSortField, setSortField, setSpecialValues, setSpecialValues, setSpecialValues, setTextBoxStyle, setTextMatchStyle, setUseClientFiltering, setValueField, setValueIconField, setValues, showPicker`

    - ### Methods inherited from class com.smartgwt.client.widgets.form.fields.FormItem

      `_getValue, addBlurHandler, addChangedHandler, addChangeHandler, addClickHandler, addDoubleClickHandler, addEditorEnterHandler, addEditorExitHandler, addFocusHandler, addIconClickHandler, addIconKeyPressHandler, addItemHoverHandler, addKeyDownHandler, addKeyPressHandler, addKeyUpHandler, addPickerIconClickHandler, addTitleClickHandler, addTitleDoubleClickHandler, addTitleHoverHandler, addValueHoverHandler, addValueIconClickHandler, asSGWTComponent, blurItem, canEditCriterion, clearValue, disable, enable, error, error, errorIfNotCreated, focusInItem, getAccessKey, getAlign, getAllowExpressions, getAlwaysFetchMissingValues, getApplyHeightToTextBox, getAriaRole, getAttribute, getAttributeAsBoolean, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsFloat, getAttributeAsInt, getAttributeAsJavaScriptObject, getAttributeAsObject, getAttributeAsString, getAutoComplete, getBrowserSpellCheck, getCanEdit, getCanEditOpaqueValues, getCanFocus, getCanvasAutoChild, getCellHeight, getCellStyle, getChangeOnKeypress, getClassName, getClipStaticValue, getClipTitle, getConfig, getContainerWidget, getCriteriaField, getCriterion, getCriterion, getDataPath, getDateFormatter, getDecimalPad, getDecimalPrecision, getDefaultIconSrc, getDisabled, getDisableIconsOnReadOnly, getDisplayValue, getDisplayValue, getEditorTypeConfig, getEditPendingCSSText, getEmptyValueIcon, getEndRow, getErrorIconHeight, getErrorIconSrc, getErrorIconWidth, getErrorMessageWidth, getExportFormat, getFetchMissingValues, getFieldName, getForeignDisplayField, getForm, getFormat, getFormItemAutoChild, getFullDataPath, getGlobalTabIndex, getHeight, getHeightAsString, 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, getMultipleValueSeparator, getName, getOperator, getOptionCriteria, getOptionFilterContext, getPageLeft, getPageRect, getPageTop, getPicker, getPickerIconName, getPickerIconPrompt, getPickerIconProperties, getPixelHeight, getPixelWidth, getPrintTextBoxStyle, getPrintTitleStyle, getPrompt, getReadOnlyDisplay, getReadOnlyTextBoxStyle, getRect, getRedrawOnChange, getRejectInvalidValueOnChange, getRequired, getRequiredMessage, getRowSpan, getScClassName, getSelectOnClick, getSelectOnFocus, getShouldSaveValue, getShowClippedTitleOnHover, getShowClippedValueOnHover, getShowDisabled, getShowErrorIcon, getShowErrorStyle, getShowErrorText, getShowFocusedErrorState, getShowFocusedIcons, getShowFocusedPickerIcon, getShowHint, getShowIcons, getShowOverIcons, getShowRTL, getShowTitle, getShowValueIconOnly, getStartRow, getStaticHeight, getStopOnError, getSuppressValueIcon, getSynchronousValidation, getTabIndex, getTextAlign, getTimeFormatter, getTitle, getTitleAlign, getTitleColSpan, getTitleOrientation, getTitleStyle, getTitleVAlign, getTooltip, getTop, getType, getValidateOnChange, getValidateOnExit, getValidOperators, getVAlign, getValue, getValueAsRecordList, getValueIconHeight, getValueIconLeftPadding, getValueIconRightPadding, getValueIconSize, getValueIconWidth, getVisible, getVisibleHeight, getVisibleWidth, getWidth, getWidthAsString, getWrapTitle, hasAdvancedCriteria, hide, hideIcon, invalidateDisplayValueCache, isCreated, isDisabled, isDrawn, isVisible, redraw, redraw, setAccessKey, setAlign, setAllowExpressions, setAlwaysFetchMissingValues, 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, setBrowserSpellCheck, setCanEdit, setCanEditCriterionPredicate, setCanEditOpaqueValues, setCanFocus, setCellHeight, setCellStyle, setChangeOnKeypress, setClipStaticValue, setClipTitle, setColSpan, setColSpan, setCriteriaField, setCriterion, setCriterionGetter, setCriterionSetter, setDataPath, setDateFormatter, setDecimalPad, setDecimalPrecision, setDefaultIconSrc, setDefaultProperties, setDefaultValue, setDefaultValue, setDefaultValue, setDefaultValue, setDefaultValue, setDefaultValue, setDisabled, setDisableIconsOnReadOnly, setDisplayFormat, setDisplayFormat, setEditorProperties, setEditorType, setEditorType, setEditorType, setEditorValueFormatter, setEditorValueParser, setEditPendingCSSText, setEmptyValueIcon, setEndRow, setErrorFormatter, setErrorIconHeight, setErrorIconSrc, setErrorIconWidth, setErrorMessageWidth, setErrorOrientation, setExportFormat, setFetchMissingValues, setForeignDisplayField, setFormat, setGlobalTabIndex, setHeight, setHeight, setHint, setHintStyle, setHoverAlign, setHoverDelay, setHoverHeight, setHoverOpacity, setHoverStyle, setHoverVAlign, setHoverWidth, setIconHeight, setIconHSpace, setIconPrompt, setIcons, setIconVAlign, setIconWidth, setImageURLPrefix, setImageURLSuffix, setImplicitSave, setImplicitSaveOnBlur, setInitHandler, setInputFormat, setInputTransformer, setItemHoverFormatter, setItemTitleHoverFormatter, setItemValueHoverFormatter, setLeft, setLoadingDisplayValue, setLocateItemBy, setMultipleValueSeparator, setName, setNullProperty, setOperator, setOptionCriteria, setOptionFilterContext, setPickerIconName, setPickerIconPrompt, setPickerIconProperties, setPrintTextBoxStyle, setPrintTitleStyle, setPrompt, setProperty, setProperty, setProperty, setProperty, setProperty, setReadOnlyDisplay, setReadOnlyTextBoxStyle, setRedrawOnChange, setRejectInvalidValueOnChange, setRequired, setRequiredMessage, setRowSpan, setScClassName, setSelectOnClick, setSelectOnFocus, setShouldSaveValue, setShowClippedTitleOnHover, setShowClippedValueOnHover, setShowDisabled, setShowErrorIcon, setShowErrorStyle, setShowErrorText, setShowFocusedErrorState, setShowFocusedIcons, setShowFocusedPickerIcon, setShowHint, setShowIcons, setShowIfCondition, setShowOverIcons, setShowRTL, setShowTitle, setShowValueIconOnly, setStartRow, setStaticHeight, setStopOnError, setSuppressValueIcon, setSynchronousValidation, setTabIndex, setTextAlign, setTimeFormatter, setTitle, setTitleAlign, setTitleColSpan, setTitleHoverFormatter, setTitleOrientation, setTitleStyle, setTitleVAlign, setTooltip, setTop, setType, setValidateOnChange, setValidateOnExit, setValidators, setValidOperators, setVAlign, setValue, setValue, setValue, setValue, setValue, setValue, setValueFormatter, setValueHoverFormatter, setValueIconHeight, setValueIconLeftPadding, setValueIconMapper, setValueIconRightPadding, setValueIcons, setValueIconSize, setValueIconWidth, setValueMap, setValueMap, setVisible, setWidth, setWidth, setWrapTitle, shouldApplyHeightToTextBox, shouldFetchMissingValue, shouldSaveOnEnter, shouldStopKeyPressBubbling, show, showIcon, stopHover, storeValue, storeValue, updateState, validate, valueClipped`

    - ### 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, getAttributeAsIntArray, getAttributeAsLong, getAttributeAsMap, getAttributeAsObject, getAttributeAsRecord, getAttributeAsStringArray, getAttributes, getHandlerCount, isFactoryCreated, setAttribute, setAttribute, setAttribute, setAttributeAsJavaObject, setFactoryCreated`

    - ### Methods inherited from class com.smartgwt.client.core.JsObject

      `equals, getJsObj, hashCode, setJavaScriptObject, setJsObj`

    - ### 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 Detail

    - #### SelectOtherItem

          public SelectOtherItem()

    - #### SelectOtherItem

          public SelectOtherItem(com.google.gwt.core.client.JavaScriptObject jsObj)

    - #### SelectOtherItem

          public SelectOtherItem(java.lang.String name)

    - #### SelectOtherItem

          public SelectOtherItem(java.lang.String name,
                         java.lang.String title)

  - ### Method Detail

    - #### getOrCreateRef

          public static SelectOtherItem getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)

    - #### changeAutoChildDefaults

          public static void changeAutoChildDefaults(java.lang.String autoChildName,
                                     Canvas defaults)

      Changes the defaults for Canvas AutoChildren named `autoChildName`.
      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.
      See Also:
        `AutoChildUsage`

    - #### changeAutoChildDefaults

          public static void changeAutoChildDefaults(java.lang.String autoChildName,
                                     FormItem defaults)

      Changes the defaults for FormItem AutoChildren named `autoChildName`.
      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.
      See Also:
        `AutoChildUsage`

    - #### changeAutoChildDefaults

          public static void changeAutoChildDefaults(java.lang.String autoChildName,
                                     DrawItem defaults)

      Changes the defaults for DrawItem AutoChildren named `autoChildName`.
      Parameters:
        `autoChildName` - name of an AutoChild to customize the defaults for.
        `defaults` - DrawItem defaults to apply. These defaults override any existing properties without destroying or wiping out non-overridden properties.
      See Also:
        `AutoChildUsage`

    - #### changePickerIconDefaults

          public static void changePickerIconDefaults(FormItemIcon defaults)

    - #### setDialogWidth

          public void setDialogWidth(int dialogWidth)

      Width for the "other value" prompt dialog.
      Parameters:
        `dialogWidth` - Default value is 250

    - #### getDialogWidth

          public int getDialogWidth()

      Width for the "other value" prompt dialog.
      Returns:
        int

    - #### setOtherTitle

          public void setOtherTitle(java.lang.String otherTitle)

      Title for the `Other...` item. When this item is selected, the user will be shown a prompt allowing them to enter a new value for the item.
      Parameters:
        `otherTitle` - Default value is "Other..."
      See Also:
        `Appearance overview and related methods`

    - #### getOtherTitle

          public java.lang.String getOtherTitle()

      Title for the `Other...` item. When this item is selected, the user will be shown a prompt allowing them to enter a new value for the item.
      Returns:
        String
      See Also:
        `Appearance overview and related methods`

    - #### setOtherValue

          public void setOtherValue(java.lang.String otherValue)

      Data value for the `Other...` item. If necessary this value may be changed to ensure it doesn't collide with any data values in this item's `valueMap`.

      Note : This is an advanced setting

      Parameters:
        `otherValue` - Default value is "***other***"
      See Also:
        `Appearance overview and related methods`

    - #### getOtherValue

          public java.lang.String getOtherValue()

      Data value for the `Other...` item. If necessary this value may be changed to ensure it doesn't collide with any data values in this item's `valueMap`.
      Returns:
        String
      See Also:
        `Appearance overview and related methods`

    - #### setSelectOtherPrompt

          public void setSelectOtherPrompt(java.lang.String selectOtherPrompt)

      Title to show in prompt for "other" value. Note this is a dynamic string. JavaScript content is supported within `${...}` tags, with local variables for `item` (a pointer to this item) and `value` a pointer to the currently selected item value.
      Parameters:
        `selectOtherPrompt` - See `HTMLString` . Default value is "Other value for <br>${item.getTitle()}?"

    - #### getSelectOtherPrompt

          public java.lang.String getSelectOtherPrompt()

      Title to show in prompt for "other" value. Note this is a dynamic string. JavaScript content is supported within `${...}` tags, with local variables for `item` (a pointer to this item) and `value` a pointer to the currently selected item value.
      Returns:
        See `HTMLString`

    - #### setSeparatorTitle

          public void setSeparatorTitle(java.lang.String separatorTitle)

      Title for the separator between normal items and the `Other...` item in the drop down list. Selecting this item will not change the FormItem's value.
      Parameters:
        `separatorTitle` - Default value is "--------------------"
      See Also:
        `Appearance overview and related methods`

    - #### getSeparatorTitle

          public java.lang.String getSeparatorTitle()

      Title for the separator between normal items and the `Other...` item in the drop down list. Selecting this item will not change the FormItem's value.
      Returns:
        String
      See Also:
        `Appearance overview and related methods`

    - #### setSeparatorValue

          public void setSeparatorValue(java.lang.String separatorValue)

      Value for the separator item between normal items and the `Other...` value. If necessary the value may be changed to ensure it doesn't collide with any data values in this item's `valueMap`.

      Note : This is an advanced setting

      Parameters:
        `separatorValue` - Default value is "----"
      See Also:
        `Appearance overview and related methods`

    - #### getSeparatorValue

          public java.lang.String getSeparatorValue()

      Value for the separator item between normal items and the `Other...` value. If necessary the value may be changed to ensure it doesn't collide with any data values in this item's `valueMap`.
      Returns:
        String
      See Also:
        `Appearance overview and related methods`

    - #### setDefaultProperties

          public static void setDefaultProperties(SelectOtherItem selectOtherItemProperties)

      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:
        `selectOtherItemProperties` - properties that should be used as new defaults when instances of this class are created