com.smartgwt.client.widgets.form.fields
Class SelectOtherItem

java.lang.Object
  extended by com.smartgwt.client.core.JsObject
      extended by com.smartgwt.client.core.DataClass
          extended by com.smartgwt.client.core.RefDataClass
              extended by com.smartgwt.client.widgets.form.fields.FormItem
                  extended by com.smartgwt.client.widgets.form.fields.SelectItem
                      extended by com.smartgwt.client.widgets.form.fields.SelectOtherItem
All Implemented Interfaces:
HasHandlers, HasBlurHandlers, HasChangedHandlers, HasChangeHandlers, HasClickHandlers, HasDataArrivedHandlers, HasDoubleClickHandlers, HasFocusHandlers, HasIconClickHandlers, HasIconKeyPressHandlers, HasItemHoverHandlers, HasKeyDownHandlers, HasKeyPressHandlers, HasKeyUpHandlers, HasTitleHoverHandlers, 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.JsObject
jsObj
 
Constructor Summary
SelectOtherItem()
           
SelectOtherItem(JavaScriptObject jsObj)
           
SelectOtherItem(String name)
           
SelectOtherItem(String name, String title)
           
 
Method Summary
 int getDialogWidth()
          Width for the "other value" prompt dialog.
static SelectOtherItem getOrCreateRef(JavaScriptObject jsObj)
           
 String getOtherTitle()
          Title for the Other... item.
 String getOtherValue()
          Data value for the Other... item.
 String getSelectOtherPrompt()
          Title to show in prompt for "other" value.
 String getSeparatorTitle()
          Title for the separator between normal items and the Other... item in the drop down list.
 String getSeparatorValue()
          Value for the separator item between normal items and the Other... value.
 void setDialogWidth(int dialogWidth)
          Width for the "other value" prompt dialog.
 void setOtherTitle(String otherTitle)
          Title for the Other... item.
 void setOtherValue(String otherValue)
          Data value for the Other... item.
 void setSelectOtherPrompt(String selectOtherPrompt)
          Title to show in prompt for "other" value.
 void setSeparatorTitle(String separatorTitle)
          Title for the separator between normal items and the Other... item in the drop down list.
 void setSeparatorValue(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, getClientPickListData, getControlStyle, getDefaultToFirstOption, getDefaultValue, getDisplayField, getDisplayFieldName, getEmptyPickListHeight, getEmptyPickListMessage, getFetchDelay, getFilterLocally, getHeight, getHideEmptyPickList, getMultiple, getOptionDataSource, getOptionOperationId, getPickerIconHeight, getPickerIconSrc, getPickerIconStyle, getPickerIconWidth, getPickListBaseStyle, getPickListCriteria, getPickListFilterCriteria, getPickListHeaderHeight, getPickListHeight, getPickListWidth, getSelectedRecord, getShowAllOptions, getShowFocused, getShowHintInField, getShowOptionsFromDataSource, getShowOver, getShowPickerIcon, getSortField, getSortFieldAsInt, getTextBoxStyle, getTextMatchStyle, getValueField, getValueFieldName, getValueIconField, getValues, setAddUnknownValues, setAllowEmptyValue, setAnimatePickList, setAnimationTime, setAutoFetchData, setControlStyle, setDefaultToFirstOption, setDefaultValue, setDefaultValues, setDefaultValues, setDisplayField, setEmptyPickListHeight, setEmptyPickListMessage, setFetchDelay, setFields, setFilterLocally, setHeight, setHideEmptyPickList, setMultiple, setOptionDataSource, setOptionOperationId, setPickerIconHeight, setPickerIconSrc, setPickerIconStyle, setPickerIconWidth, setPickListBaseStyle, setPickListCriteria, setPickListCriteria, setPickListFields, setPickListFilterCriteriaFunction, setPickListHeaderHeight, setPickListHeight, setPickListWidth, setSeparatorRows, setShowAllOptions, setShowFocused, setShowHintInField, setShowOptionsFromDataSource, setShowOver, setShowPickerIcon, setSortField, setSortField, setTextBoxStyle, setTextMatchStyle, setValueField, setValueIconField, setValues, showPicker
 
Methods inherited from class com.smartgwt.client.widgets.form.fields.FormItem
addBlurHandler, addChangedHandler, addChangeHandler, addClickHandler, addDoubleClickHandler, addFocusHandler, addIconClickHandler, addIconKeyPressHandler, addItemHoverHandler, addKeyDownHandler, addKeyPressHandler, addKeyUpHandler, addTitleHoverHandler, blurItem, clearValue, disable, enable, focusInItem, getAccessKey, getAlign, getAttribute, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsFloat, getAttributeAsInt, getAttributeAsJavaScriptObject, getAttributeAsString, getCellStyle, getConfig, getCriteriaField, getCriterion, getDataPath, getDateFormatter, getDefaultIconSrc, getDisabled, getDisplayValue, getDisplayValue, getEmptyDisplayValue, getEmptyValueIcon, getEndRow, getErrorIconHeight, getErrorIconSrc, getErrorIconWidth, getErrorMessageWidth, getFetchMissingValues, getFieldName, getForm, getGlobalTabIndex, getHint, getHintStyle, getHoverAlign, getHoverDelay, getHoverHeight, getHoverOpacity, getHoverStyle, getHoverVAlign, getHoverWidth, getIconHeight, getIconPageRect, getIconPrompt, getIconRect, getIconVAlign, getIconWidth, getImageURLPrefix, getImageURLSuffix, getLeft, getName, getOperator, getOptionCriteria, getOptionFilterContext, getPrompt, getRejectInvalidValueOnChange, getRequired, getRowSpan, getSelectOnFocus, getShouldSaveValue, getShowDisabled, getShowErrorIcon, getShowErrorStyle, getShowErrorText, getShowFocusedIcons, getShowFocusedPickerIcon, getShowHint, getShowIcons, getShowOverIcons, getShowTitle, getShowValueIconOnly, getStartRow, getSuppressValueIcon, getTabIndex, getTextAlign, getTimeFormatter, getTitle, getTitleAlign, getTitleOrientation, getTitleStyle, getTooltip, getTop, getType, getValidateOnChange, getValue, getValueIconHeight, getValueIconLeftPadding, getValueIconRightPadding, getValueIconSize, getValueIconWidth, getVisible, getWidth, getWrapTitle, hide, isCreated, isDisabled, isDrawn, redraw, setAccessKey, setAlign, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setCellStyle, setColSpan, setColSpan, setCriteriaField, setDataPath, setDateFormatter, setDefaultIconSrc, setDefaultValue, setDefaultValue, setDefaultValue, setDefaultValue, setDisabled, setEditorType, setEditorValueFormatter, setEditorValueParser, setEmptyDisplayValue, setEmptyValueIcon, setEndRow, setErrorFormatter, setErrorIconHeight, setErrorIconSrc, setErrorIconWidth, setErrorMessageWidth, setErrorOrientation, setFetchMissingValues, setGlobalTabIndex, setHeight, setHint, setHintStyle, setHoverAlign, setHoverDelay, setHoverHeight, setHoverOpacity, setHoverStyle, setHoverVAlign, setHoverWidth, setIconHeight, setIconPrompt, setIcons, setIconVAlign, setIconWidth, setImageURLPrefix, setImageURLSuffix, setInputTransformer, setItemHoverFormatter, setItemTitleHoverFormatter, setLeft, setName, setOperator, setOptionCriteria, setOptionFilterContext, setPrompt, setProperty, setProperty, setProperty, setProperty, setRedrawOnChange, setRejectInvalidValueOnChange, setRequired, setRowSpan, setSelectOnFocus, setShouldSaveValue, setShowDisabled, setShowErrorIcon, setShowErrorStyle, setShowErrorText, setShowFocusedIcons, setShowFocusedPickerIcon, setShowHint, setShowIcons, setShowIfCondition, setShowOverIcons, setShowTitle, setShowValueIconOnly, setStartRow, setSuppressValueIcon, setTabIndex, setTextAlign, setTimeFormatter, setTitle, setTitleAlign, setTitleOrientation, setTitleStyle, setTooltip, setTop, setType, setValidateOnChange, setValidators, setValue, setValue, setValue, setValue, setValue, setValue, setValueFormatter, setValueIconHeight, setValueIconLeftPadding, setValueIconRightPadding, setValueIcons, setValueIconSize, setValueIconWidth, setValueMap, setValueMap, setVisible, setWidth, setWidth, setWrapTitle, show, stopHover, updateState
 
Methods inherited from class com.smartgwt.client.core.RefDataClass
getRef, getRef
 
Methods inherited from class com.smartgwt.client.core.DataClass
doAddHandler, fireEvent, getAttributeAsIntArray, getAttributeAsMap, getAttributeAsObject, getAttributeAsStringArray, getAttributes, getHandlerCount, getJsObj, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute
 
Methods inherited from class com.smartgwt.client.core.JsObject
setJsObj
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, 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(JavaScriptObject jsObj)

SelectOtherItem

public SelectOtherItem(String name)

SelectOtherItem

public SelectOtherItem(String name,
                       String title)
Method Detail

getOrCreateRef

public static SelectOtherItem getOrCreateRef(JavaScriptObject jsObj)

setSeparatorTitle

public void setSeparatorTitle(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 - separatorTitle Default value is "--------------------"

getSeparatorTitle

public 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

setSeparatorValue

public void setSeparatorValue(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 - separatorValue Default value is "----"

getSeparatorValue

public 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

setOtherTitle

public void setOtherTitle(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 - otherTitle Default value is "Other..."

getOtherTitle

public 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

setOtherValue

public void setOtherValue(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 - otherValue Default value is "***other***"

getOtherValue

public 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

setSelectOtherPrompt

public void setSelectOtherPrompt(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 - selectOtherPrompt Default value is "Other value for
${item.getTitle()}?"

getSelectOtherPrompt

public 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:
String

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