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

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.SectionItem
All Implemented Interfaces:
HasHandlers, HasBlurHandlers, HasChangedHandlers, HasChangeHandlers, HasClickHandlers, HasDoubleClickHandlers, HasFocusHandlers, HasIconClickHandlers, HasIconKeyPressHandlers, HasItemHoverHandlers, HasKeyDownHandlers, HasKeyPressHandlers, HasKeyUpHandlers, HasTitleHoverHandlers

public class SectionItem
extends CanvasItem

Header item for a collapsable section in a DynamicForm. Each SectionItem is associated with a number of other items in the form, which will be shown or hidden as a group when the section is expanded or collapsed. Clicking on a SectionItem will expand or collapse the section.

To make a form where only one section is expanded at a time, set sectionVisibilityMode to "mutex".


Field Summary
 
Fields inherited from class com.smartgwt.client.core.JsObject
jsObj
 
Constructor Summary
SectionItem()
           
SectionItem(JavaScriptObject jsObj)
           
SectionItem(String name)
           
SectionItem(String name, String title)
           
 
Method Summary
 void collapseSection()
          Collapse a sectionItem, and hide all the items within the section (not including the header).
 void expandSection()
          Expands a section, showing all the items contained within the section.
 Boolean getCanCollapse()
          Whether this section header can be collapsed.
static SectionItem getOrCreateRef(JavaScriptObject jsObj)
           
 Boolean getSectionExpanded()
          Whether this form section should be initially collapsed.
 String getSectionHeaderClass()
          Name of the Canvas subclass to use as a header that labels the section and allows showing and hiding.
 Boolean isExpanded()
          Returns a boolean indicating whether this SectionItem is expanded.
 void setCanCollapse(Boolean canCollapse)
          Whether this section header can be collapsed.
 void setItemIds(String... itemIds)
          IDs of the items that should be considered a member of this section.
 void setSectionExpanded(Boolean sectionExpanded)
          Whether this form section should be initially collapsed.
 void setSectionHeaderClass(String sectionHeaderClass)
          Name of the Canvas subclass to use as a header that labels the section and allows showing and hiding.
 
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, clearValue, disable, enable, focusInItem, getAccessKey, getAlign, getAttribute, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsFloat, getAttributeAsInt, getAttributeAsJavaScriptObject, getAttributeAsString, getCellStyle, getConfig, getCriteriaField, getCriterion, getDataPath, getDateFormatter, getDefaultIconSrc, getDisabled, getDisplayField, getDisplayFieldName, getDisplayValue, getDisplayValue, getEmptyDisplayValue, getEmptyValueIcon, getEndRow, getErrorIconHeight, getErrorIconSrc, getErrorIconWidth, getErrorMessageWidth, getFetchMissingValues, getFieldName, getFilterLocally, getForm, getGlobalTabIndex, getHeight, getHint, getHintStyle, getHoverAlign, getHoverDelay, getHoverHeight, getHoverOpacity, getHoverStyle, getHoverVAlign, getHoverWidth, getIconHeight, getIconPageRect, getIconPrompt, getIconRect, getIconVAlign, getIconWidth, getImageURLPrefix, getImageURLSuffix, getLeft, getName, getOperator, getOptionCriteria, getOptionFilterContext, getOptionOperationId, 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, getValueField, 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, setDataPath, setDateFormatter, setDefaultIconSrc, setDefaultValue, setDefaultValue, setDefaultValue, setDefaultValue, setDefaultValue, setDisabled, setDisplayField, setEditorType, setEditorValueFormatter, setEditorValueParser, 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, setOptionCriteria, setOptionDataSource, setOptionFilterContext, setOptionOperationId, 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, setValueField, 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

SectionItem

public SectionItem()

SectionItem

public SectionItem(JavaScriptObject jsObj)

SectionItem

public SectionItem(String name)

SectionItem

public SectionItem(String name,
                   String title)
Method Detail

getOrCreateRef

public static SectionItem getOrCreateRef(JavaScriptObject jsObj)

setSectionExpanded

public void setSectionExpanded(Boolean sectionExpanded)
Whether this form section should be initially collapsed. Can be set programatically via expandSection() and collapseSection().

Parameters:
sectionExpanded - sectionExpanded Default value is true

getSectionExpanded

public Boolean getSectionExpanded()
Whether this form section should be initially collapsed. Can be set programatically via expandSection() and collapseSection().

Returns:
Boolean

setSectionHeaderClass

public void setSectionHeaderClass(String sectionHeaderClass)
Name of the Canvas subclass to use as a header that labels the section and allows showing and hiding. The default class be skinned, or trivial subclasses created to allow different appearances for SectionItems in different forms. Very advanced developers can use the following information to create custom header classes.

Note : This is an advanced setting

Parameters:
sectionHeaderClass - sectionHeaderClass Default value is "SectionHeader"

getSectionHeaderClass

public String getSectionHeaderClass()
Name of the Canvas subclass to use as a header that labels the section and allows showing and hiding. The default class be skinned, or trivial subclasses created to allow different appearances for SectionItems in different forms. Very advanced developers can use the following information to create custom header classes.

Returns:
String

setCanCollapse

public void setCanCollapse(Boolean canCollapse)
Whether this section header can be collapsed. If set false, suppresses open/close state icon

Parameters:
canCollapse - canCollapse Default value is true

getCanCollapse

public Boolean getCanCollapse()
Whether this section header can be collapsed. If set false, suppresses open/close state icon

Returns:
Boolean

isExpanded

public Boolean isExpanded()
Returns a boolean indicating whether this SectionItem is expanded.

Returns:
true if the section is expanded false if not

expandSection

public void expandSection()
Expands a section, showing all the items contained within the section.


collapseSection

public void collapseSection()
Collapse a sectionItem, and hide all the items within the section (not including the header).


setItemIds

public void setItemIds(String... itemIds)
IDs of the items that should be considered a member of this section.

Parameters:
itemIds - itemIds Default value is null