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

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.CanvasItem
                      extended by com.smartgwt.client.widgets.form.fields.PickTreeItem
All Implemented Interfaces:
HasHandlers, HasBlurHandlers, HasChangedHandlers, HasChangeHandlers, HasClickHandlers, HasDoubleClickHandlers, HasFocusHandlers, HasIconClickHandlers, HasIconKeyPressHandlers, HasItemHoverHandlers, HasKeyDownHandlers, HasKeyPressHandlers, HasKeyUpHandlers, HasTitleHoverHandlers

public class PickTreeItem
extends CanvasItem

FormItem that allows picking a value from a hierarchical data model.


Field Summary
 
Fields inherited from class com.smartgwt.client.core.JsObject
jsObj
 
Constructor Summary
PickTreeItem()
           
PickTreeItem(com.google.gwt.core.client.JavaScriptObject jsObj)
           
PickTreeItem(java.lang.String name)
           
PickTreeItem(java.lang.String name, java.lang.String title)
           
 
Method Summary
 java.lang.Boolean getCanSelectParentItems()
          If true, clicking or pressing Enter on a menu item that has a submenu will select that item (with standard behavior of hiding the menus, calling click handlers, etc) instead of showing the submenu.
 DataSource getDataSource()
          The DataSource that this component should bind to for default fields and for performing DSRequest.
 java.lang.String getDisplayField()
          Specifies an alternative field from which display values should be retrieved for this item.
If this item is not databound (dataSource is unset), this is implemented by picking up the value of the specified field from the valueTree.
Otherwise this item will attempt to map its underlying value to a display value by retrieving a record from the dataSource where the valueField matches this item's value, and displaying the displayField value from that record.
 java.lang.String getEmptyMenuMessage()
          This message will be displayed as a single, disabled option in any empty menu/submenu created from this item's data tree.
 java.lang.Boolean getLoadDataOnDemand()
          If this is a databound item, should the load our set of possible options be loaded on demand (as submenus are displayed), or upfront?
static PickTreeItem getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)
           
 java.lang.String getValueField()
          Which field in the tree-data should be returned as this item's value? If unspecified, the path will be used
 void setCanSelectParentItems(java.lang.Boolean canSelectParentItems)
          If true, clicking or pressing Enter on a menu item that has a submenu will select that item (with standard behavior of hiding the menus, calling click handlers, etc) instead of showing the submenu.
 void setDataSource(DataSource dataSource)
          If specified, the tree of possible options will be derived from the dataSource as a ResultTree, rather than using this.valueTree.
 void setDisplayField(java.lang.String displayField)
          Specifies an alternative field from which display values should be retrieved for this item.
If this item is not databound (dataSource is unset), this is implemented by picking up the value of the specified field from the valueTree.
Otherwise this item will attempt to map its underlying value to a display value by retrieving a record from the dataSource where the valueField matches this item's value, and displaying the displayField value from that record.
 void setEmptyMenuMessage(java.lang.String emptyMenuMessage)
          This message will be displayed as a single, disabled option in any empty menu/submenu created from this item's data tree.
 void setLoadDataOnDemand(java.lang.Boolean loadDataOnDemand)
          If this is a databound item, should the load our set of possible options be loaded on demand (as submenus are displayed), or upfront?
 void setValueField(java.lang.String valueField)
          Which field in the tree-data should be returned as this item's value? If unspecified, the path will be used
 void setValueTree(Tree valueTree)
          A Tree of options from which the user can select.
 
Methods inherited from class com.smartgwt.client.widgets.form.fields.CanvasItem
getCanvas, setCanvas
 
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, disable, enable, focusInItem, getAccessKey, getAlign, getAttribute, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsFloat, getAttributeAsInt, getAttributeAsJavaScriptObject, getAttributeAsString, getCellStyle, getConfig, getCriteriaField, getCriterion, getDateFormatter, getDefaultIconSrc, getDisabled, getDisplayFieldName, getDisplayValue, getDisplayValue, getEmptyDisplayValue, getEmptyValueIcon, getEndRow, getErrorIconHeight, getErrorIconSrc, getErrorIconWidth, getErrorMessageWidth, getFetchMissingValues, getFieldName, getFilterLocally, getGlobalTabIndex, getHeight, getHint, getHintStyle, getHoverAlign, getHoverDelay, getHoverHeight, getHoverOpacity, getHoverStyle, getHoverVAlign, getHoverWidth, getIconHeight, getIconPageRect, getIconPrompt, getIconRect, getIconVAlign, getIconWidth, getImageURLPrefix, getImageURLSuffix, getLeft, getName, getOperator, getPickerIconHeight, getPickerIconSrc, getPickerIconWidth, getPrompt, getRejectInvalidValueOnChange, getRequired, getRowSpan, getSelectOnFocus, getShouldSaveValue, getShowDisabled, getShowErrorIcon, getShowErrorStyle, getShowErrorText, getShowFocused, getShowFocusedIcons, getShowFocusedPickerIcon, getShowHint, getShowIcons, getShowOverIcons, getShowPickerIcon, getShowTitle, getShowValueIconOnly, getStartRow, getSuppressValueIcon, getTabIndex, getTextAlign, getTextBoxStyle, getTimeFormatter, getTitle, getTitleAlign, getTitleOrientation, getTitleStyle, getTooltip, getTop, getType, getValidateOnChange, getValue, getValueFieldName, 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, setDateFormatter, setDefaultIconSrc, setDefaultValue, setDefaultValue, setDefaultValue, setDefaultValue, setDefaultValue, setDisabled, setEditorType, setEmptyDisplayValue, setEmptyValueIcon, setEndRow, setErrorFormatter, setErrorIconHeight, setErrorIconSrc, setErrorIconWidth, setErrorMessageWidth, setErrorOrientation, setFetchMissingValues, setFilterLocally, setGlobalTabIndex, setHeight, setHeight, setHint, setHintStyle, setHoverAlign, setHoverDelay, setHoverHeight, setHoverOpacity, setHoverStyle, setHoverVAlign, setHoverWidth, setIconHeight, setIconPrompt, setIcons, setIconVAlign, setIconWidth, setImageURLPrefix, setImageURLSuffix, setInputTransformer, setItemHoverFormatter, setItemTitleHoverFormatter, setLeft, setName, setOperator, setOptionDataSource, setPickerIconHeight, setPickerIconSrc, setPickerIconWidth, setPrompt, setProperty, setProperty, setProperty, setProperty, setRedrawOnChange, setRejectInvalidValueOnChange, setRequired, setRowSpan, setSelectOnFocus, setShouldSaveValue, setShowDisabled, setShowErrorIcon, setShowErrorStyle, setShowErrorText, setShowFocused, setShowFocusedIcons, setShowFocusedPickerIcon, setShowHint, setShowIcons, setShowIfCondition, setShowOverIcons, setShowPickerIcon, setShowTitle, setShowValueIconOnly, setStartRow, setSuppressValueIcon, setTabIndex, setTextAlign, setTextBoxStyle, setTimeFormatter, setTitle, setTitleAlign, setTitleOrientation, setTitleStyle, setTooltip, setTop, setType, setValidateOnChange, setValidators, setValue, setValue, setValue, setValue, setValue, setValue, 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
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 

Constructor Detail

PickTreeItem

public PickTreeItem()

PickTreeItem

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

PickTreeItem

public PickTreeItem(java.lang.String name)

PickTreeItem

public PickTreeItem(java.lang.String name,
                    java.lang.String title)
Method Detail

getOrCreateRef

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

setLoadDataOnDemand

public void setLoadDataOnDemand(java.lang.Boolean loadDataOnDemand)
If this is a databound item, should the load our set of possible options be loaded on demand (as submenus are displayed), or upfront?

Note : This is an advanced setting

Parameters:
loadDataOnDemand - loadDataOnDemand Default value is null

getLoadDataOnDemand

public java.lang.Boolean getLoadDataOnDemand()
If this is a databound item, should the load our set of possible options be loaded on demand (as submenus are displayed), or upfront?

Returns:
Boolean

setDisplayField

public void setDisplayField(java.lang.String displayField)
Specifies an alternative field from which display values should be retrieved for this item.
If this item is not databound (dataSource is unset), this is implemented by picking up the value of the specified field from the valueTree.
Otherwise this item will attempt to map its underlying value to a display value by retrieving a record from the dataSource where the valueField matches this item's value, and displaying the displayField value from that record.

Overrides:
setDisplayField in class FormItem
Parameters:
displayField - displayField Default value is null

getDisplayField

public java.lang.String getDisplayField()
Specifies an alternative field from which display values should be retrieved for this item.
If this item is not databound (dataSource is unset), this is implemented by picking up the value of the specified field from the valueTree.
Otherwise this item will attempt to map its underlying value to a display value by retrieving a record from the dataSource where the valueField matches this item's value, and displaying the displayField value from that record.

Overrides:
getDisplayField in class FormItem
Returns:
String

setValueField

public void setValueField(java.lang.String valueField)
Which field in the tree-data should be returned as this item's value? If unspecified, the path will be used

Overrides:
setValueField in class FormItem
Parameters:
valueField - valueField Default value is null

getValueField

public java.lang.String getValueField()
Which field in the tree-data should be returned as this item's value? If unspecified, the path will be used

Overrides:
getValueField in class FormItem
Returns:
String

setEmptyMenuMessage

public void setEmptyMenuMessage(java.lang.String emptyMenuMessage)
This message will be displayed as a single, disabled option in any empty menu/submenu created from this item's data tree.

Note : This is an advanced setting

Parameters:
emptyMenuMessage - emptyMenuMessage Default value is "No items to display"

getEmptyMenuMessage

public java.lang.String getEmptyMenuMessage()
This message will be displayed as a single, disabled option in any empty menu/submenu created from this item's data tree.

Returns:
String

setCanSelectParentItems

public void setCanSelectParentItems(java.lang.Boolean canSelectParentItems)
If true, clicking or pressing Enter on a menu item that has a submenu will select that item (with standard behavior of hiding the menus, calling click handlers, etc) instead of showing the submenu.

Parameters:
canSelectParentItems - canSelectParentItems Default value is null

getCanSelectParentItems

public java.lang.Boolean getCanSelectParentItems()
If true, clicking or pressing Enter on a menu item that has a submenu will select that item (with standard behavior of hiding the menus, calling click handlers, etc) instead of showing the submenu.

Returns:
Boolean

setDataSource

public void setDataSource(DataSource dataSource)
If specified, the tree of possible options will be derived from the dataSource as a ResultTree, rather than using this.valueTree. Options can be loaded on demand or up front according tp loadDataOnDemand.

Note : This is an advanced setting

Parameters:
dataSource - dataSource Default value is null

getDataSource

public DataSource getDataSource()
The DataSource that this component should bind to for default fields and for performing DSRequest.

Can be specified as either a DataSource instance or the String ID of a DataSource.

Returns:
DataSource

setValueTree

public void setValueTree(Tree valueTree)
A Tree of options from which the user can select.

Parameters:
valueTree - valueTree Default value is null