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, HasShowValueHandlers, HasTitleClickHandlers, HasTitleDoubleClickHandlers, HasTitleHoverHandlers

public class SectionItem
extends CanvasItem

Header item for a collapsible 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".

See Also:
DynamicForm.getSectionVisibilityMode()

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.
 Boolean getCanTabToHeader()
          If true, the header for this Section will be included in the page's tab order for accessibility.
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 setCanTabToHeader(Boolean canTabToHeader)
          If true, the header for this Section will be included in the page's tab order for accessibility.
 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
addShowValueHandler, canEditCriterion, createCanvas, getApplyPromptToCanvas, getCanvas, getCriterion, getEditCriteriaInInnerForm, getOverflow, getPrompt, getShouldSaveValue, hasAdvancedCriteria, setApplyPromptToCanvas, setCanvas, setCriterion, setEditCriteriaInInnerForm, setOverflow, setPrompt, setShouldSaveValue, setupCanvasConstructor, storeValue, storeValue, storeValue
 
Methods inherited from class com.smartgwt.client.widgets.form.fields.FormItem
addBlurHandler, addChangedHandler, addChangeHandler, addClickHandler, addDoubleClickHandler, addFocusHandler, addIconClickHandler, addIconKeyPressHandler, addItemHoverHandler, addKeyDownHandler, addKeyPressHandler, addKeyUpHandler, addTitleClickHandler, addTitleDoubleClickHandler, addTitleHoverHandler, blurItem, clearValue, disable, enable, focusInItem, getAccessKey, getAlign, getAllowExpressions, getAlwaysFetchMissingValues, getAttribute, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsFloat, getAttributeAsInt, getAttributeAsJavaScriptObject, getAttributeAsString, getBrowserSpellCheck, getCanEdit, getCanFocus, getCellHeight, getCellStyle, getConfig, getContainerWidget, getCriteriaField, getCriterion, getDataPath, getDateFormatter, getDefaultIconSrc, getDisabled, getDisplayField, getDisplayFieldName, getDisplayValue, getDisplayValue, getEditorTypeConfig, getEmptyDisplayValue, getEmptyValueIcon, getEndRow, getErrorIconHeight, getErrorIconSrc, getErrorIconWidth, getErrorMessageWidth, getFetchMissingValues, getFieldName, getFilterLocally, getForm, getFullDataPath, getGlobalTabIndex, getHeight, getHint, getHintStyle, getHoverAlign, getHoverDelay, getHoverHeight, getHoverOpacity, getHoverStyle, getHoverVAlign, getHoverWidth, getIcon, getIconHeight, getIconPageRect, getIconPrompt, getIconRect, getIconVAlign, getIconWidth, getImageURLPrefix, getImageURLSuffix, getImplicitSave, getImplicitSaveOnBlur, getInputFormat, getLeft, getLocateItemBy, getMultipleValueSeparator, getName, getOperator, getOptionCriteria, getOptionFilterContext, getOptionOperationId, getPageLeft, getPageRect, getPageTop, getPickerIconHeight, getPickerIconName, getPickerIconSrc, getPickerIconWidth, getPrintTextBoxStyle, getPrintTitleStyle, getRect, getRejectInvalidValueOnChange, getRequired, getRequiredMessage, getRowSpan, getSelectedRecord, getSelectOnFocus, getShowDisabled, getShowErrorIcon, getShowErrorStyle, getShowErrorText, getShowFocused, getShowFocusedIcons, getShowFocusedPickerIcon, getShowHint, getShowIcons, getShowOverIcons, getShowPickerIcon, getShowTitle, getShowValueIconOnly, getStartRow, getStopOnError, getSuppressValueIcon, getSynchronousValidation, getTabIndex, getTextAlign, getTextBoxStyle, getTimeFormatter, getTitle, getTitleAlign, getTitleColSpan, getTitleOrientation, getTitleStyle, getTitleVAlign, getTooltip, getTop, getType, getValidateOnChange, getValidateOnExit, getValidOperators, getVAlign, getValue, getValueField, getValueFieldName, getValueIconHeight, getValueIconLeftPadding, getValueIconRightPadding, getValueIconSize, getValueIconWidth, getVisible, getVisibleHeight, getVisibleWidth, getWidth, getWrapTitle, hide, invalidateDisplayValueCache, isCreated, isDisabled, isDrawn, isVisible, redraw, setAccessKey, setAlign, setAllowExpressions, setAlwaysFetchMissingValues, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setBrowserSpellCheck, setCanEdit, setCanFocus, setCellHeight, setCellStyle, setColSpan, setColSpan, setCriteriaField, setDataPath, setDateFormatter, setDefaultIconSrc, setDefaultValue, setDefaultValue, setDefaultValue, setDefaultValue, setDefaultValue, setDisabled, setDisplayField, setDisplayFormat, setDisplayFormat, 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, setImplicitSave, setImplicitSaveOnBlur, setInitHandler, setInputFormat, setInputTransformer, setItemHoverFormatter, setItemTitleHoverFormatter, setLeft, setLocateItemBy, setMultipleValueSeparator, setName, setOperator, setOptionCriteria, setOptionDataSource, setOptionFilterContext, setOptionOperationId, setPickerIconHeight, setPickerIconName, setPickerIconSrc, setPickerIconWidth, setPrintTextBoxStyle, setPrintTitleStyle, setProperty, setProperty, setProperty, setProperty, setProperty, setRedrawOnChange, setRejectInvalidValueOnChange, setRequired, setRequiredMessage, setRowSpan, setSelectOnFocus, setShowDisabled, setShowErrorIcon, setShowErrorStyle, setShowErrorText, setShowFocused, setShowFocusedIcons, setShowFocusedPickerIcon, setShowHint, setShowIcons, setShowIfCondition, setShowOverIcons, setShowPickerIcon, setShowTitle, setShowValueIconOnly, setStartRow, setStopOnError, setSuppressValueIcon, setSynchronousValidation, setTabIndex, setTextAlign, setTextBoxStyle, setTimeFormatter, setTitle, setTitleAlign, setTitleColSpan, setTitleOrientation, setTitleStyle, setTitleVAlign, setTooltip, setTop, setType, setValidateOnChange, setValidateOnExit, setValidators, setValidOperators, setVAlign, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValueField, setValueFormatter, setValueIconHeight, setValueIconLeftPadding, setValueIconMapper, setValueIconRightPadding, setValueIcons, setValueIconSize, setValueIconWidth, setValueMap, setValueMap, setVisible, setWidth, setWidth, setWrapTitle, shouldFetchMissingValue, show, showPicker, stopHover, updateState, validate
 
Methods inherited from class com.smartgwt.client.core.RefDataClass
getRef, getRef
 
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, 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)

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

setCanTabToHeader

public void setCanTabToHeader(Boolean canTabToHeader)
If true, the header for this Section will be included in the page's tab order for accessibility. May also be set at the DynamicForm level via canTabToSectionHeaders.

See Accessibility.

Parameters:
canTabToHeader - canTabToHeader Default value is null

getCanTabToHeader

public Boolean getCanTabToHeader()
If true, the header for this Section will be included in the page's tab order for accessibility. May also be set at the DynamicForm level via canTabToSectionHeaders.

See Accessibility.

Returns:
Boolean

setSectionExpanded

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

Parameters:
sectionExpanded - sectionExpanded Default value is true
See Also:
Sections Example

getSectionExpanded

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

Returns:
Boolean
See Also:
Sections Example

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

collapseSection

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


expandSection

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


isExpanded

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

Returns:
true if the section is expanded false if not

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