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, 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.core.RefDataClass

      `id`

    - ### 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, 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` | `setJavaScriptObject(com.google.gwt.core.client.JavaScriptObject jsObj)`
    `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, getClientPickListData, getControlStyle, getDefaultToFirstOption, getDefaultValue, getDisplayField, getDisplayFieldName, getEmptyDisplayValue, getEmptyPickListHeight, getEmptyPickListMessage, getEscapeHTML, getFetchDelay, getFetchDisplayedFieldsOnly, getFilterLocally, getHeight, getHideEmptyPickList, getMultiple, getMultipleAppearance, getOpenOnDownArrow, getOpenOnSpace, getOptionDataSource, getOptionOperationId, getPickerIconHeight, getPickerIconSrc, getPickerIconStyle, getPickerIconWidth, getPickListBaseStyle, getPickListCriteria, getPickListFields, getPickListFilterCriteria, getPickListHeaderHeight, getPickListHeight, getPickListWidth, getProgressiveLoading, getSaveOnEnter, getSelectedRecord, getSelectedRecords, getShowAllOptions, getShowFocused, getShowHintInField, getShowOptionsFromDataSource, getShowOver, getShowPickerIcon, getSortField, getSortFieldAsInt, getTextBoxStyle, getTextMatchStyle, getUseClientFiltering, getValueAsString, getValueField, getValueFieldName, getValueIconField, getValues, isMultiple, setAddUnknownValues, setAllowEmptyValue, setAnimatePickList, setAnimationTime, setAutoFetchData, setCachePickListResults, setControlStyle, setDefaultProperties, setDefaultToFirstOption, setDefaultValue, setDefaultValues, setDefaultValues, setDisplayField, setEmptyDisplayValue, setEmptyPickListHeight, setEmptyPickListMessage, setEscapeHTML, setFetchDelay, setFetchDisplayedFieldsOnly, setFilterLocally, setHeight, setHideEmptyPickList, setMultiple, setMultipleAppearance, setOpenOnDownArrow, setOpenOnSpace, setOptionDataSource, setOptionFilterContext, setOptionOperationId, setPickerIconHeight, setPickerIconSrc, setPickerIconStyle, setPickerIconWidth, setPickListBaseStyle, setPickListCriteria, setPickListCriteria, setPickListFields, setPickListFilterCriteriaFunction, setPickListFilterCriteriaFunction, setPickListHeaderHeight, setPickListHeight, setPickListProperties, setPickListSort, setPickListWidth, setProgressiveLoading, setSaveOnEnter, setSeparatorRows, setShowAllOptions, setShowFocused, setShowHintInField, setShowOptionsFromDataSource, setShowOver, setShowPickerIcon, setSortField, setSortField, 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, asSGWTComponent, blurItem, canEditCriterion, clearValue, disable, enable, focusInItem, getAccessKey, getAlign, getAllowExpressions, getAlwaysFetchMissingValues, getApplyHeightToTextBox, getAriaRole, getAttribute, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsFloat, getAttributeAsInt, getAttributeAsJavaScriptObject, getAttributeAsString, getBrowserSpellCheck, getCanEdit, getCanFocus, getCanvasAutoChild, getCellHeight, getCellStyle, 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, getFetchMissingValues, getFieldName, getForm, getFormItemAutoChild, getFullDataPath, getGlobalTabIndex, getHint, getHintStyle, getHoverAlign, getHoverDelay, getHoverHeight, getHoverOpacity, getHoverStyle, getHoverVAlign, getHoverWidth, getIcon, getIconHeight, getIconHSpace, getIconPageRect, getIconPrompt, getIconRect, getIconVAlign, getIconWidth, getImageURLPrefix, getImageURLSuffix, getImplicitSave, getImplicitSaveOnBlur, getInputFormat, getLeft, getLocateItemBy, getMultipleValueSeparator, getName, getOperator, getOptionCriteria, getOptionFilterContext, getPageLeft, getPageRect, getPageTop, getPicker, getPickerIconName, getPickerIconPrompt, getPickerIconProperties, getPrintTextBoxStyle, getPrintTitleStyle, getPrompt, getReadOnlyDisplay, getReadOnlyTextBoxStyle, getRect, getRedrawOnChange, getRejectInvalidValueOnChange, getRequired, getRequiredMessage, getRowSpan, getSelectOnClick, getSelectOnFocus, getShouldSaveValue, getShowClippedTitleOnHover, getShowClippedValueOnHover, getShowDisabled, getShowErrorIcon, getShowErrorStyle, getShowErrorText, getShowFocusedErrorState, getShowFocusedIcons, getShowFocusedPickerIcon, getShowHint, getShowIcons, getShowOverIcons, getShowRTL, getShowTitle, getShowValueIconOnly, getStartRow, 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, getWrapTitle, hasAdvancedCriteria, hide, hideIcon, invalidateDisplayValueCache, isCreated, isDisabled, isDrawn, isVisible, redraw, setAccessKey, setAlign, setAllowExpressions, setAlwaysFetchMissingValues, setApplyHeightToTextBox, setAriaRole, setAriaState, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAutoChildConstructor, setAutoChildProperties, setAutoChildProperties, setAutoChildVisibility, setBrowserSpellCheck, setCanEdit, setCanEditCriterionPredicate, setCanFocus, setCellHeight, setCellStyle, 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, setFetchMissingValues, setGlobalTabIndex, 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, setLocateItemBy, setMultipleValueSeparator, setName, setOperator, setOptionCriteria, setOptionFilterContext, setPickerIconName, setPickerIconPrompt, setPickerIconProperties, setPrintTextBoxStyle, setPrintTitleStyle, setPrompt, setProperty, setProperty, setProperty, setProperty, setProperty, setReadOnlyDisplay, setReadOnlyTextBoxStyle, setRedrawOnChange, setRejectInvalidValueOnChange, setRequired, setRequiredMessage, setRowSpan, setSelectOnClick, setSelectOnFocus, setShouldSaveValue, setShowClippedTitleOnHover, setShowClippedValueOnHover, setShowDisabled, setShowErrorIcon, setShowErrorStyle, setShowErrorText, setShowFocusedErrorState, setShowFocusedIcons, setShowFocusedPickerIcon, setShowHint, setShowIcons, setShowIfCondition, setShowOverIcons, setShowRTL, setShowTitle, setShowValueIconOnly, setStartRow, 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, show, showIcon, stopHover, updateState, validate, valueClipped`

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

      `getRef, getRef, internalSetID`

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

      `doAddHandler, fireEvent, getAttributeAsDoubleArray, getAttributeAsIntArray, getAttributeAsLong, getAttributeAsMap, getAttributeAsObject, getAttributeAsRecord, getAttributeAsStringArray, getAttributes, getHandlerCount, getJsObj, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttributeAsJavaObject`

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

      `equals, hashCode, 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)

    - #### setJavaScriptObject

          public void setJavaScriptObject(com.google.gwt.core.client.JavaScriptObject jsObj)

      Overrides:
        `setJavaScriptObject` in class `SelectItem`

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

    - #### changePickerIconDefaults

          public static void changePickerIconDefaults(FormItemIcon defaults)

    - #### setDialogWidth

          public void setDialogWidth(int dialogWidth)

      Width for the "other value" prompt dialog.
      Parameters:
        `dialogWidth` - 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` - . See `String`. 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:
        . See `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` - . See `String`. 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:
        . See `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 `String`. 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 `String`

    - #### 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` - . See `String`. 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:
        . See `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` - . See `String`. 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:
        . See `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 subsequent instances of this class will automatically have the default properties that were set when this method was called. 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 effect 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.

      Parameters:
        `selectOtherItemProperties` - properties that should be used as new defaults when instances of this class are created