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

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
All Implemented Interfaces:
HasHandlers, HasBlurHandlers, HasChangedHandlers, HasChangeHandlers, HasClickHandlers, HasDoubleClickHandlers, HasEditorEnterHandlers, HasEditorExitHandlers, HasFocusHandlers, HasIconClickHandlers, HasIconKeyPressHandlers, HasItemHoverHandlers, HasKeyDownHandlers, HasKeyPressHandlers, HasKeyUpHandlers, HasPickerIconClickHandlers, HasTitleClickHandlers, HasTitleDoubleClickHandlers, HasTitleHoverHandlers, HasValueHoverHandlers
Direct Known Subclasses:
BlurbItem, CanvasItem, CheckboxItem, DateItem, HeaderItem, HiddenItem, NativeCheckboxItem, RadioGroupItem, SelectItem, SpacerItem, StaticTextItem, TextAreaItem, TextItem

public class FormItem
extends RefDataClass
implements HasBlurHandlers, HasChangeHandlers, HasChangedHandlers, HasClickHandlers, HasDoubleClickHandlers, HasEditorEnterHandlers, HasEditorExitHandlers, HasFocusHandlers, HasIconClickHandlers, HasIconKeyPressHandlers, HasItemHoverHandlers, HasKeyDownHandlers, HasKeyPressHandlers, HasKeyUpHandlers, HasPickerIconClickHandlers, HasTitleClickHandlers, HasTitleDoubleClickHandlers, HasTitleHoverHandlers, HasValueHoverHandlers

A UI component that can participate in a DynamicForm, allowing editing or display of one of the values tracked by the form.

FormItems do not render themselves, instead, they are provided to a DynamicForm via DynamicForm.setItems

See the DynamicForm documentation for details and sample code.


Field Summary
protected  String scClassName
           
 
Fields inherited from class com.smartgwt.client.core.RefDataClass
id
 
Fields inherited from class com.smartgwt.client.core.JsObject
jsObj
 
Constructor Summary
FormItem()
           
FormItem(JavaScriptObject jsObj)
           
FormItem(String name)
           
 
Method Summary
 Object _getValue()
           
 HandlerRegistration addBlurHandler(BlurHandler handler)
          Add a blur handler.
 HandlerRegistration addChangedHandler(ChangedHandler handler)
          Add a changed handler.
 HandlerRegistration addChangeHandler(ChangeHandler handler)
          Add a change handler.
 HandlerRegistration addClickHandler(ClickHandler handler)
          Add a click handler.
 HandlerRegistration addDoubleClickHandler(DoubleClickHandler handler)
          Add a doubleClick handler.
 HandlerRegistration addEditorEnterHandler(EditorEnterHandler handler)
          Add a editorEnter handler.
 HandlerRegistration addEditorExitHandler(EditorExitHandler handler)
          Add a editorExit handler.
 HandlerRegistration addFocusHandler(FocusHandler handler)
          Add a focus handler.
 HandlerRegistration addIconClickHandler(IconClickHandler handler)
          Add a iconClick handler.
 HandlerRegistration addIconKeyPressHandler(IconKeyPressHandler handler)
          Add a iconKeyPress handler.
 HandlerRegistration addItemHoverHandler(ItemHoverHandler handler)
          Add a itemHover handler.
 HandlerRegistration addKeyDownHandler(KeyDownHandler handler)
          Add a keyDown handler.
 HandlerRegistration addKeyPressHandler(KeyPressHandler handler)
          Add a keyPress handler.
 HandlerRegistration addKeyUpHandler(KeyUpHandler handler)
          Add a keyUp handler.
 HandlerRegistration addPickerIconClickHandler(PickerIconClickHandler handler)
          Add a pickerIconClick handler.
 HandlerRegistration addTitleClickHandler(TitleClickHandler handler)
          Add a titleClick handler.
 HandlerRegistration addTitleDoubleClickHandler(TitleDoubleClickHandler handler)
          Add a titleDoubleClick handler.
 HandlerRegistration addTitleHoverHandler(TitleHoverHandler handler)
          Add a titleHover handler.
 HandlerRegistration addValueHoverHandler(ValueHoverHandler handler)
          Add a valueHover handler.
static
<T extends RefDataClass>
T
asSGWTComponent(JavaScriptObject jsObj)
          Returns the existing SGWT FormItem, or creates and returns one if none exist, associated with the supplied JavaScriptObject.
 void blurItem()
          Takes focus from this form item's focusable element.
 Boolean canEditCriterion(Criterion criterion)
          Calls the canEditCriterion() method of the FormItemCanEditCriterionPredicate that is registered with this field.
static void changeAutoChildDefaults(String autoChildName, Canvas defaults)
          Changes the defaults for Canvas AutoChildren named autoChildName.
static void changeAutoChildDefaults(String autoChildName, FormItem defaults)
          Changes the defaults for FormItem AutoChildren named autoChildName.
static void changePickerIconDefaults(FormItemIcon defaults)
           
 void clearValue()
          Clear the value for this form item.
 void disable()
          Set this item to be disabled at runtime.
 void enable()
          Set this item to be enabled at runtime.
 void focusInItem()
          Move the keyboard focus into this item's focusable element
 String getAccessKey()
          If specified this governs the HTML accessKey for the item.
 Alignment getAlign()
          Alignment of this item in its cell.
 Boolean getAllowExpressions()
          For a form that produces filter criteria (see form.getValuesAsCriteria()), allows the user to type in simple expressions to cause filtering with that operator.
 Boolean getAlwaysFetchMissingValues()
          If this form item has a specified optionDataSource and fetchMissingValues is true, when the item value changes, a fetch will be performed against the optionDataSource to retrieve the related record if displayField is specified and the new item value is not present in any valueMap explicitly specified on the item.
 Boolean getApplyHeightToTextBox()
          If height is specified, should it be applied to the item's text box element?
 String getAriaRole()
          ARIA role of this formItem.
 String getAttribute(String attribute)
          Returns attribute value as a String
 Boolean getAttributeAsBoolean(String attribute)
          Returns attribute value set as a Boolean.
 Date getAttributeAsDate(String property)
          Returns attribute value as a Date.
 Double getAttributeAsDouble(String property)
          Returns attribute as a Double.
 Float getAttributeAsFloat(String property)
          Returns attribute value as a Float.
 Integer getAttributeAsInt(String property)
          Returns attribute value as an Integer.
 JavaScriptObject getAttributeAsJavaScriptObject(String property)
          Returns attribute value as a JavaScript Object.
 Object getAttributeAsObject(String property, JavaScriptObject convertToObject)
           
 String getAttributeAsString(String property)
          Returns attribute value as a String.
 Boolean getBrowserSpellCheck()
          If this browser supports spell-checking of text editing elements, do we want this enabled for this item? If unset the property will be inherited from the containing form.
 Boolean getCanEdit()
          Is this form item editable (canEdit:true) or read-only (canEdit:false)? Setting the form item to non-editable causes it to render as read-only.
 Boolean getCanFocus()
          Is this form item focusable? Setting this property to true on an otherwise non-focusable element such as a StaticTextItem will cause the item to be included in the page's tab order and respond to keyboard events.
 Canvas getCanvasAutoChild(String autoChildName)
          Returns the Canvas AutoChild named autoChildName if already created.
 Integer getCellHeight()
          If specified, this property will govern the height of the cell in which this form item is rendered.
 String getCellStyle()
          CSS style applied to the form item as a whole, including the text element, any icons, and any hint text for the item.
 Boolean getChangeOnKeypress()
          Should this form item fire its change handler (and store its value in the form) on every keypress? Set to false to suppress the 'change' handler firing (and the value stored) on every keypress.
 String getClassName()
          Returns the JavaScript class name.
 Boolean getClipTitle()
          If the title for this form item is showing, and is too large for the available space should the title be clipped?
 JavaScriptObject getConfig()
          Returns the FormItem's config object suitable for use in API's that set the editorType
 Canvas getContainerWidget()
          A Read-Only pointer to the Smart GWT canvas that holds this form item.
 String getControlStyle()
          Base CSS class name for a form item's control box (surrounds text box and picker).
 String getCriteriaField()
          When using operator, the name of the DataSource field for the Criterion this FormItem generates.
 Criterion getCriterion()
          Calls the getCriterion() method of the FormItemCriterionGetter that is registered with this field.
 Criterion getCriterion(TextMatchStyle textMatchStyle)
          Calls the getCriterion() method of the FormItemCriterionGetter that is registered with this field.
 String getDataPath()
          dataPath for this item.
 DateDisplayFormat getDateFormatter()
          Display format to use for date type values within this formItem.
 Integer getDecimalPad()
          Applies only to fields of type "float" and enforces a minimum number of digits shown after the decimal point.
 Integer getDecimalPrecision()
          Applies only to fields of type "float" and affects how many significant digits are shown.
 String getDefaultIconSrc()
          Default icon image source.
 Boolean getDisabled()
          Whether this item is disabled.
 Boolean getDisableIconsOnReadOnly()
          If canEdit is set to false, should icons be disabled by default?
 String getDisplayField()
          Specifies an alternative field from which display values should be retrieved for this item.
 String getDisplayFieldName()
          Returns the displayField for this item.
 String getDisplayValue()
          Returns this item's value with any valueMap applied to it - the value as currently displayed to the user.
 String getDisplayValue(String value)
          Returns this item's value with any valueMap applied to it - the value as currently displayed to the user.
 JavaScriptObject getEditorTypeConfig()
           
 String getEditPendingCSSText()
          Custom CSS text to be applied to cells with pending edits that have not yet been submitted.
 String getEmptyDisplayValue()
          Text to display when this form item has a null or undefined value.
 String getEmptyValueIcon()
          This property allows the developer to specify an icon to display when this item has no value.
 Boolean getEndRow()
          Whether this item should end the row it's in in the form layout
 int getErrorIconHeight()
          Height of the error icon, if we're showing icons when validation errors occur.
 String getErrorIconSrc()
          URL of the image to show as an error icon, if we're showing icons when validation errors occur.
 int getErrorIconWidth()
          Height of the error icon, if we're showing icons when validation errors occur.
 int getErrorMessageWidth()
          When showInlineErrors and showErrorText are both true and errorOrientation is "left" or "right", errorMessageWidth is the amount to reduce the width of the editor to accommodate the error message and icon.
 String getExportFormat()
          FormatString used during exports for numeric or date formatting.
 Boolean getFetchMissingValues()
          If this form item has a specified optionDataSource, should the item ever perform a fetch against this dataSource to retrieve the related record.
 String getFieldName()
          Return the name for the this formItem.
 Boolean getFilterLocally()
          If this form item is mapping data values to a display value by fetching records from a dataSource (see optionDataSource, displayField and fetchMissingValues), setting this property to true ensures that when the form item value is set, entire data-set from the dataSource is loaded at once and used as a valueMap, rather than just loading the display value for the current value.
 DynamicForm getForm()
          A reference to the FormItem's DynamicForm.
 String getFormat()
          FormatString for numeric or date formatting.
 FormItem getFormItemAutoChild(String autoChildName)
          Returns the FormItem AutoChild named autoChildName if already created.
 String getFullDataPath()
          Return the fully-qualified dataPath for the this formItem (ie, the dataPath expressed in absolute terms from the root of the hierarchy, rather than relative to the item's parent form).
 Integer getGlobalTabIndex()
          TabIndex for the form item within the page.
 int getHeight()
          Height of the FormItem.
 String getHeightAsString()
          Height of the FormItem.
 String getHint()
          Specifies "hint" string to show next to the form item to indicate something to the user.
 String getHintStyle()
          CSS class for the "hint" string.
 Alignment getHoverAlign()
          Text alignment for text displayed in this item's hover canvas, if shown.
 Integer getHoverDelay()
          If specified, this is the number of milliseconds to wait between the user rolling over this form item, and triggering any hover action for it.
If not specified this.form.itemHoverDelay will be used instead.
 Integer getHoverHeight()
          Option to specify a height for any hover shown for this item.
 Integer getHoverOpacity()
          Opacity for any hover shown for this item
 String getHoverStyle()
          Explicit CSS Style for any hover shown for this item.
 VerticalAlignment getHoverVAlign()
          Vertical text alignment for text displayed in this item's hover canvas, if shown.
 Integer getHoverWidth()
          Option to specify a width for any hover shown for this item.
 FormItemIcon getIcon(String name)
          Given an name return a pointer to the icon definition
 int getIconHeight()
          Default height for form item icons
 Integer getIconHSpace()
          Horizontal space (in px) to leave between form item icons.
 Rectangle getIconPageRect(FormItemIcon icon)
           
 String getIconPrompt()
          Default prompt (and tooltip-text) for icons.
 Rectangle getIconRect(FormItemIcon icon)
           
 VerticalAlignment getIconVAlign()
          How should icons be aligned vertically for this form item.
 int getIconWidth()
          Default width for form item icons
 String getImageURLPrefix()
          Prefix to apply to the beginning of any valueIcons when determining the URL for the image.
 String getImageURLSuffix()
          Suffix to apply to the end of any valueIcons when determining the URL for the image.
 Boolean getImplicitSave()
          When true, indicates that changes to this item will cause an automatic save on a delay, as well as when the entire form is submitted.
 Boolean getImplicitSaveOnBlur()
          If not set to false, form item values will be saved when this item's "editorExit" handler is fired as well as on a delay and when the entire form is submitted.
 String getInputFormat()
          For fields of type "date", if this is an editable field such as a TextItem, this property allows you to specify the inputFormat applied to the item.
 int getLeft()
          Left coordinate of this item in pixels.
 String getLoadingDisplayValue()
          Value shown in field when fetchMissingValues is active and a fetch is pending.
 String getLocateItemBy()
          When AutoTest.getElement is used to parse locator strings generated by link{isc.AutoTest.getLocator()} for this form item, should the item be identified? By default if the item has a name this will always be used, however for items with no name, the following options are available: "title" use the title as an identifier within this form "value" use the value of the item to identify it (often used for items with a static defaultValue such as HeaderItems "index" use the index within the form's items array.
 String getMultipleValueSeparator()
          If this item is displaying multiple values, this property will be the string that separates those values for display purposes.
 String getName()
          Name for this form field.
 OperatorId getOperator()
          OperatorId to be used when DynamicForm.getValuesAsCriteria is called.
 Criteria getOptionCriteria()
          If this item has a specified optionDataSource, and this property may be used to specify criteria to pass to the datasource when performing the fetch operation on the dataSource to obtain a data-value to display-value mapping
 RPCRequest getOptionFilterContext()
          If this item has a specified optionDataSource, and this property is not null, this will be passed to the datasource as RPCRequest properties when performing the fetch operation on the dataSource to obtain a data-value to display-value mapping
 String getOptionOperationId()
          If this item has a specified optionDataSource, this attribute may be set to specify an explicit operationId when performing a fetch against the option dataSource to pick up display value mapping.
static FormItem getOrCreateRef(JavaScriptObject jsObj)
           
 int getPageLeft()
          Returns the drawn page-left coordinate of this form item in pixels.
 Rectangle getPageRect()
          Return the page-level coordinates of this object.
 int getPageTop()
          Returns the drawn page-top coordinate of this form item in pixels.
 Canvas getPicker()
          The component that will be displayed when FormItem.showPicker is called due to a click on the picker icon.
 Integer getPickerIconHeight()
          If showPickerIcon is true for this item, this property governs the size of the picker icon.
 String getPickerIconName()
          If showPickerIcon is true, this attribute specifies the name applied to the picker icon
 String getPickerIconPrompt()
          Prompt to show when the user hovers the mouse over the picker icon.
 FormItemIcon getPickerIconProperties()
          If showPickerIcon is true for this item, this block of properties will be applied to the pickerIcon.
 String getPickerIconSrc()
          If showPickerIcon is true for this item, this property governs the src of the picker icon image to be displayed.
 String getPickerIconStyle()
          Base CSS class name for a form item's picker icon cell.
 Integer getPickerIconWidth()
          If showPickerIcon is true for this item, this property governs the size of the picker icon.
 int getPixelHeight()
          Returns the specified height of this formItem in pixels.
 int getPixelWidth()
          Returns the specified width of this formItem in pixels.
 String getPrintTextBoxStyle()
          Base CSS class name for a form item's text box element when getting printable HTML for the form.
 String getPrintTitleStyle()
          Base CSS stylename for a form item's title when generating print HTML for the item.
 String getPrompt()
          This text is shown as a tooltip prompt when the cursor hovers over this item.
 Boolean getReadOnlyClipValue()
          If this item is canEdit:false, and has readOnlyDisplay set to "static", should the item value be clipped if it overflows the specified size of the item?
 ReadOnlyDisplayAppearance getReadOnlyDisplay()
          If canEdit is set to false, how should this item be displayed to the user?
 String getReadOnlyTextBoxStyle()
          TextBoxStyle to apply to canEdit:false items with readOnlyDisplay set to "static".
 Rectangle getRect()
          Return the coordinates of this object.
 Boolean getRedrawOnChange()
          If true, this item will cause the entire form to be redrawn when the item's "elementChanged" event is done firing
 Boolean getRejectInvalidValueOnChange()
          If validateOnChange is true, and validation fails for this item on change, with no suggested value, should we revert to the previous value, or continue to display the bad value entered by the user.
 Boolean getRequired()
          Whether a non-empty value is required for this field to pass validation.
 String getRequiredMessage()
          The required message for required field errors.
 int getRowSpan()
          Number of rows that this item spans
 Boolean getSaveOnEnter()
          Set this to true to allow the parent form to save it's data when 'Enter' is pressed on this formItem and saveOnEnter is true on the parent form.
 String getScClassName()
          Get the name of the underlying SmartClient class
 ListGridRecord getSelectedRecord()
          Get the record returned from the optionDataSource when fetchMissingValues is true, and the missing value is fetched.
 Boolean getSelectOnClick()
          Allows the selectOnClick behavior to be configured on a per-FormItem basis.
 Boolean getSelectOnFocus()
          Allows the selectOnFocus behavior to be configured on a per-FormItem basis.
 Boolean getShouldSaveValue()
          Should this item's value be saved in the form's values and hence returned from form.getValues()?
 boolean getShowClippedTitleOnHover()
          If true and the title is clipped, then a hover containing the full title of this item is enabled.
 Boolean getShowClippedValueOnHover()
          If true and the value is clipped, then a hover containing the full value of this item is enabled.
 Boolean getShowDisabled()
          When this item is disabled, should it be re-styled to indicate its disabled state?
 Boolean getShowErrorIcon()
          showErrorIcons, showErrorText, and showErrorStyle control how validation errors are displayed when they are displayed inline in the form (next to the form item where there is a validation error).
 Boolean getShowErrorStyle()
          showErrorIcons, showErrorText, and showErrorStyle control how validation errors are displayed when they are displayed inline in the form (next to the form item where there is a validation error).
 Boolean getShowErrorText()
          showErrorIcons, showErrorText, and showErrorStyle control how validation errors are displayed when they are displayed inline in the form (next to the form item where there is a validation error).
 Boolean getShowFocused()
          When this item receives focus, should it be re-styled to indicate it has focus?
 Boolean getShowFocusedErrorState()
          If set to true, when an item has errors and is focused, an "ErrorFocused" suffix will appear on the stylename.
 Boolean getShowFocusedIcons()
          If we're showing icons, should we change their image source to the appropriate focused source when this item has focus? Can be overridden on a per icon basis by the formItemIcon showFocused property.
 Boolean getShowFocusedPickerIcon()
          If showPickerIcon is true for this item, should the picker icon show a focused image when the form item has focus?
 Boolean getShowHint()
          If a hint is defined for this form item, should it be shown?
 Boolean getShowIcons()
          Set to false to suppress writing out any icons for this item.
 Boolean getShowOverIcons()
          If we're showing icons, should we change their image source to the appropriate over source when the user rolls over (or puts focus onto) them? Can be overridden on a per icon basis by the formItemIcon showOver property.
 Boolean getShowPickerIcon()
          Should we show a special 'picker' icon for this form item? Picker icons are customizable via pickerIconProperties.
 boolean getShowRTL()
          When this item is in RTL mode, should its style name include an "RTL" suffix?
 Boolean getShowTitle()
          Should we show a title cell for this formItem?
 Boolean getShowValueIconOnly()
          If valueIcons is set, this property may be set to show the valueIcon only and prevent the standard form item element or text from displaying
 Boolean getStartRow()
          Whether this item should always start a new row in the form layout.
 Boolean getStopOnError()
          Indicates that if validation fails, the user should not be allowed to exit the field - focus will be forced back into the field until the error is corrected.
 Boolean getSuppressValueIcon()
          If valueIcons is set, this property may be set to prevent the value icons from showing up next to the form items value
 Boolean getSynchronousValidation()
          If enabled, whenever validation is triggered and a request to the server is required, user interactivity will be blocked until the request returns.
 Integer getTabIndex()
          TabIndex for the form item within the form, which controls the order in which controls are visited when the user hits the tab or shift-tab keys to navigate between items.
 Alignment getTextAlign()
          Alignment of the text / content within this form item.
 String getTextBoxStyle()
          Base CSS class name for a form item's text box element.
 TimeDisplayFormat getTimeFormatter()
          Time-format to apply to date type values within this formItem.
 String getTitle()
          User visible title for this form item.
 Alignment getTitleAlign()
          Alignment of this item's title in its cell.
 int getTitleColSpan()
          Number of columns that this item's title spans.
 TitleOrientation getTitleOrientation()
          On which side of this item should the title be placed.
 String getTitleStyle()
          Base CSS class name for a form item's title.
 VerticalAlignment getTitleVAlign()
          Vertical alignment of this item's title in its cell.
 String getTooltip()
          This text is shown as a tooltip prompt when the cursor hovers over this item.
 int getTop()
          Top coordinate of this item in pixels.
 String getType()
          The DynamicForm picks a field renderer based on the type of the field (and sometimes other attributes of the field).
 Boolean getValidateOnChange()
          If true, form items will be validated when each item's "change" handler is fired as well as when the entire form is submitted or validated.
 Boolean getValidateOnExit()
          If true, form items will be validated when each item's "editorExit" handler is fired as well as when the entire form is submitted or validated.
 OperatorId[] getValidOperators()
          Array of valid filtering operators (eg "greaterThan") that are legal for this FormItem.
 VerticalAlignment getVAlign()
          Vertical alignment of this item within its cell.
 Object getValue()
          Return the value tracked by this form item.
 RecordList getValueAsRecordList()
           
 String getValueField()
          If this form item maps data values to display values by retrieving the displayField values from an optionDataSource, this property denotes the the field to use as the underlying data value in records from the optionDataSource.
If unset, assumed to be the name of this form item.
 String getValueFieldName()
          Getter method to retrieve the valueField for this item.
 Integer getValueIconHeight()
          If valueIcons is specified, use this property to specify a height for the value icon written out.
 int getValueIconLeftPadding()
          If we're showing a value icon, this attribute governs the amount of space between the icon and the start edge of the form item cell.
 int getValueIconRightPadding()
          If we're showing a value icon, this attribute governs the amount of space between the icon and the value text.
 int getValueIconSize()
          If valueIcons is specified, this property may be used to specify both the width and height of the icon written out.
 Integer getValueIconWidth()
          If valueIcons is specified, use this property to specify a width for the value icon written out.
 Boolean getVisible()
          Whether this item is currently visible.
 int getVisibleHeight()
          Output the drawn height for this item in pixels.
 int getVisibleWidth()
          Output the drawn width for this item in pixels.
 int getWidth()
          Width of the FormItem.
 String getWidthAsString()
          Width of the FormItem.
 Boolean getWrapTitle()
          If specified determines whether this items title should wrap.
 Boolean hasAdvancedCriteria()
          Does this form item produce an AdvancedCriteria sub criterion object? If this method returns true, DynamicForm.getValuesAsCriteria on the form containing this item will always return an AdvancedCriteria object, calling FormItemCriterionGetter.getCriterion() on each item to retrieve the individual criteria.
 void hide()
          Hide this form item.
 void hideIcon(String icon)
          This method will hide some icon in this item's icons array, if it is currently visible.
 void invalidateDisplayValueCache()
          If this item has a specified displayField, the value displayed to the user for this item may be derived from another field.
protected  boolean isCreated()
           
 Boolean isDisabled()
          Is this item disabled?
 Boolean isDrawn()
          Returns true if this item has been written out into the DOM.
 Boolean isVisible()
          Return true if the form item is currently visible.
 void redraw()
          Causes the FormItem to be redrawn immediately with the new properties.
 void setAccessKey(String accessKey)
          If specified this governs the HTML accessKey for the item.
 void setAlign(Alignment align)
          Alignment of this item in its cell.
 void setAllowExpressions(Boolean allowExpressions)
          For a form that produces filter criteria (see form.getValuesAsCriteria()), allows the user to type in simple expressions to cause filtering with that operator.
 void setAlwaysFetchMissingValues(Boolean alwaysFetchMissingValues)
          If this form item has a specified optionDataSource and fetchMissingValues is true, when the item value changes, a fetch will be performed against the optionDataSource to retrieve the related record if displayField is specified and the new item value is not present in any valueMap explicitly specified on the item.
 void setApplyHeightToTextBox(Boolean applyHeightToTextBox)
          If height is specified, should it be applied to the item's text box element?
 void setAriaRole(String ariaRole)
          ARIA role of this formItem.
 void setAriaState(String stateName, Object stateValue)
          Set a specific ARIA state mapping for this formItem.
 void setAttribute(String attribute, BaseClass value)
          Set attribute value to a BaseClass.
 void setAttribute(String attribute, BaseClass[] value)
          Set attribute value to a BaseClass array.
 void setAttribute(String attribute, boolean value)
          Set attribute value to a boolean.
 void setAttribute(String attribute, Boolean value)
          Set attribute value to a Boolean.
 void setAttribute(String attribute, DataClass value)
          Set attribute value to a DataClass.
 void setAttribute(String attribute, DataClass[] value)
          Set attribute value to a DataClass array.
 void setAttribute(String attribute, Date value)
          Set attribute value to a Date.
 void setAttribute(String attribute, double value)
          Set attribute value to a double.
 void setAttribute(String attribute, int value)
          Set attribute value to an int.
 void setAttribute(String attribute, int[] value)
          Set attribute value to an int array.
 void setAttribute(String attribute, JavaScriptObject value)
          Set attribute value to a JavaScriptObject.
 void setAttribute(String attribute, Map value)
          Set attribute value to a Map.
 void setAttribute(String attribute, String value)
          Set attribute value to a String
 void setAttribute(String attribute, String[] value)
          Set attribute value to a String array.
 void setAttribute(String attribute, ValueEnum[] value)
          Set attribute value to a ValueEnum array.
 void setAutoChildConstructor(String autoChildName, String className)
          Sets the SmartClient constructor for the AutoChild named autoChildName.
 void setAutoChildProperties(String autoChildName, Canvas properties)
          Sets the properties for creating a Canvas AutoChild named autoChildName.
 void setAutoChildProperties(String autoChildName, FormItem properties)
          Sets the properties for creating a FormItem AutoChild named autoChildName.
 void setAutoChildVisibility(String autoChildName, boolean visible)
          Sets whether to create and show the AutoChild named autoChildName.
 void setBrowserSpellCheck(Boolean browserSpellCheck)
          If this browser supports spell-checking of text editing elements, do we want this enabled for this item? If unset the property will be inherited from the containing form.
 void setCanEdit(Boolean canEdit)
          Is this form item editable (canEdit:true) or read-only (canEdit:false)? Setting the form item to non-editable causes it to render as read-only.
 void setCanEditCriterionPredicate(FormItemCanEditCriterionPredicate predicate)
          When a dynamic form is editing an advanced criteria object via DynamicForm.setValuesAsCriteria, this predicate is used to determine which sub-criteria apply to which form item(s).
 void setCanFocus(Boolean canFocus)
          Is this form item focusable? Setting this property to true on an otherwise non-focusable element such as a StaticTextItem will cause the item to be included in the page's tab order and respond to keyboard events.
 void setCellHeight(Integer cellHeight)
          If specified, this property will govern the height of the cell in which this form item is rendered.
 void setCellStyle(String cellStyle)
          CSS style applied to the form item as a whole, including the text element, any icons, and any hint text for the item.
 void setChangeOnKeypress(Boolean changeOnKeypress)
          Should this form item fire its change handler (and store its value in the form) on every keypress? Set to false to suppress the 'change' handler firing (and the value stored) on every keypress.
 void setClipTitle(Boolean clipTitle)
          If the title for this form item is showing, and is too large for the available space should the title be clipped?
 void setColSpan(int colSpan)
          Number of columns that this item spans.
 void setColSpan(String colSpan)
          Number of columns that this item spans.
 void setControlStyle(String controlStyle)
          Base CSS class name for a form item's control box (surrounds text box and picker).
 void setCriteriaField(String criteriaField)
          When using operator, the name of the DataSource field for the Criterion this FormItem generates.
 void setCriterion(Criterion criterion)
          Calls the setCriterion() method of the FormItemCriterionSetter that is registered with this field.
 void setCriterionGetter(FormItemCriterionGetter getter)
          Provides a specialized criterion from this formItem when creating an AdvancedCriteria via DynamicForm.getValuesAsCriteria.
 void setCriterionSetter(FormItemCriterionSetter setter)
          Set the method to update this form item to reflect a criterion object from within an AdvancedCriteria.
 void setDataPath(String dataPath)
          dataPath for this item.
 void setDateFormatter(DateDisplayFormat dateFormatter)
          Display format to use for date type values within this formItem.
 void setDecimalPad(Integer decimalPad)
          Applies only to fields of type "float" and enforces a minimum number of digits shown after the decimal point.
 void setDecimalPrecision(Integer decimalPrecision)
          Applies only to fields of type "float" and affects how many significant digits are shown.
 void setDefaultIconSrc(String defaultIconSrc)
          Default icon image source.
static void setDefaultProperties(FormItem formItemProperties)
          Class level method to set the default properties of this class.
 void setDefaultValue(Boolean defaultValue)
          Value used when no value is provided for this item.
 void setDefaultValue(Date defaultValue)
          Value used when no value is provided for this item.
 void setDefaultValue(Double defaultValue)
          Value used when no value is provided for this item.
 void setDefaultValue(Float defaultValue)
          Value used when no value is provided for this item.
 void setDefaultValue(Integer defaultValue)
          Value used when no value is provided for this item.
 void setDefaultValue(Object value)
           
 void setDefaultValue(String defaultValue)
          Value used when no value is provided for this item.
 void setDisabled(Boolean disabled)
          Whether this item is disabled.
 void setDisableIconsOnReadOnly(Boolean disableIconsOnReadOnly)
          If canEdit is set to false, should icons be disabled by default?
 void setDisplayField(String displayField)
          Specifies an alternative field from which display values should be retrieved for this item.
 void setDisplayFormat(DateDisplayFormat displayFormat)
          Fields of type "date" or "time" will be edited using a DateItem or TimeItem by default.
 void setDisplayFormat(TimeFormatter displayFormat)
          Fields of type "date" or "time" will be edited using a DateItem or TimeItem by default.
 void setEditorProperties(FormItem editorProperties)
          Set default properties to use when editing.
 void setEditorType(Class<? extends FormItem> editorType)
          Set the FormItem subclass to use when editing.
 void setEditorType(FormItem editorType)
          Deprecated. Renamed to setEditorProperties(FormItem). You can also consider using setEditorType(Class) or setEditorType(String) instead.
 void setEditorType(String editorType)
          Set the FormItem subclass to use when editing.
 void setEditorValueFormatter(FormItemValueFormatter formatter)
          An optional FormItemValueFormatter to map this item's current data value to a display value.
 void setEditorValueParser(FormItemValueParser valueParser)
          An optional FormItemValueParser to map a user-entered display value to a data value for storage.
 void setEditPendingCSSText(String editPendingCSSText)
          Custom CSS text to be applied to cells with pending edits that have not yet been submitted.
 void setEmptyDisplayValue(String emptyDisplayValue)
          Text to display when this form item has a null or undefined value.
 void setEmptyValueIcon(String emptyValueIcon)
          This property allows the developer to specify an icon to display when this item has no value.
 void setEndRow(Boolean endRow)
          Whether this item should end the row it's in in the form layout
 void setErrorFormatter(FormItemErrorFormatter errorFormatter)
          Register a custom error formatter for this FormItem.
 void setErrorIconHeight(int errorIconHeight)
          Height of the error icon, if we're showing icons when validation errors occur.
 void setErrorIconSrc(String errorIconSrc)
          URL of the image to show as an error icon, if we're showing icons when validation errors occur.
 void setErrorIconWidth(int errorIconWidth)
          Height of the error icon, if we're showing icons when validation errors occur.
 void setErrorMessageWidth(int errorMessageWidth)
          When showInlineErrors and showErrorText are both true and errorOrientation is "left" or "right", errorMessageWidth is the amount to reduce the width of the editor to accommodate the error message and icon.
 void setErrorOrientation(FormErrorOrientation errorOrientation)
          If showInlineErrors is true, where should the error icon and text appear relative to the form item itself.
 void setExportFormat(String exportFormat)
          FormatString used during exports for numeric or date formatting.
 void setFetchMissingValues(Boolean fetchMissingValues)
          If this form item has a specified optionDataSource, should the item ever perform a fetch against this dataSource to retrieve the related record.
 void setFilterLocally(Boolean filterLocally)
          If this form item is mapping data values to a display value by fetching records from a dataSource (see optionDataSource, displayField and fetchMissingValues), setting this property to true ensures that when the form item value is set, entire data-set from the dataSource is loaded at once and used as a valueMap, rather than just loading the display value for the current value.
 void setFormat(String format)
          FormatString for numeric or date formatting.
 void setGlobalTabIndex(Integer globalTabIndex)
          TabIndex for the form item within the page.
 void setHeight(int height)
          Height of the FormItem.
 void setHeight(String height)
          Height of the FormItem.
 void setHint(String hint)
          Specifies "hint" string to show next to the form item to indicate something to the user.
 void setHintStyle(String hintStyle)
          CSS class for the "hint" string.
 void setHoverAlign(Alignment hoverAlign)
          Text alignment for text displayed in this item's hover canvas, if shown.
 void setHoverDelay(Integer hoverDelay)
          If specified, this is the number of milliseconds to wait between the user rolling over this form item, and triggering any hover action for it.
If not specified this.form.itemHoverDelay will be used instead.
 void setHoverHeight(Integer hoverHeight)
          Option to specify a height for any hover shown for this item.
 void setHoverOpacity(Integer hoverOpacity)
          Opacity for any hover shown for this item
 void setHoverStyle(String hoverStyle)
          Explicit CSS Style for any hover shown for this item.
 void setHoverVAlign(VerticalAlignment hoverVAlign)
          Vertical text alignment for text displayed in this item's hover canvas, if shown.
 void setHoverWidth(Integer hoverWidth)
          Option to specify a width for any hover shown for this item.
 void setIconHeight(int iconHeight)
          Default height for form item icons
 void setIconHSpace(Integer iconHSpace)
          Horizontal space (in px) to leave between form item icons.
 void setIconPrompt(String iconPrompt)
          Default prompt (and tooltip-text) for icons.
 void setIcons(FormItemIcon... icons)
          An array of descriptor objects for icons to display in a line after this form item.
 void setIconVAlign(VerticalAlignment iconVAlign)
          How should icons be aligned vertically for this form item.
 void setIconWidth(int iconWidth)
          Default width for form item icons
 void setImageURLPrefix(String imageURLPrefix)
          Prefix to apply to the beginning of any valueIcons when determining the URL for the image.
 void setImageURLSuffix(String imageURLSuffix)
          Suffix to apply to the end of any valueIcons when determining the URL for the image.
 void setImplicitSave(Boolean implicitSave)
          When true, indicates that changes to this item will cause an automatic save on a delay, as well as when the entire form is submitted.
 void setImplicitSaveOnBlur(Boolean implicitSaveOnBlur)
          If not set to false, form item values will be saved when this item's "editorExit" handler is fired as well as on a delay and when the entire form is submitted.
 void setInitHandler(FormItemInitHandler initHandler)
          Specify a notification method to fire when this formItem is initialized in JavaScript.
 void setInputFormat(String inputFormat)
          For fields of type "date", if this is an editable field such as a TextItem, this property allows you to specify the inputFormat applied to the item.
 void setInputTransformer(FormItemInputTransformer inputTransformer)
          The transformer is called when a FormItem's value is about to change as the result of user interaction.
 void setItemHoverFormatter(FormItemHoverFormatter hoverFormatter)
          The FormItemHoverFormatter should return the HTML to display in a hover canvas when the user holds the mousepointer over this item.
 void setItemTitleHoverFormatter(FormItemHoverFormatter hoverFormatter)
          The FormItemHoverFormatter should return the HTML to display in a hover canvas when the user holds the mouse pointer over this item's title and the title is clipped.
 void setItemValueHoverFormatter(FormItemHoverFormatter hoverFormatter)
          The FormItemHoverFormatter should return the HTML to display in a hover canvas when the user holds the mouse pointer over this item's value and the value is clipped.
 void setLeft(int left)
          Left coordinate of this item in pixels.
 void setLoadingDisplayValue(String loadingDisplayValue)
          Value shown in field when fetchMissingValues is active and a fetch is pending.
 void setLocateItemBy(String locateItemBy)
          When AutoTest.getElement is used to parse locator strings generated by link{isc.AutoTest.getLocator()} for this form item, should the item be identified? By default if the item has a name this will always be used, however for items with no name, the following options are available: "title" use the title as an identifier within this form "value" use the value of the item to identify it (often used for items with a static defaultValue such as HeaderItems "index" use the index within the form's items array.
 void setMultipleValueSeparator(String multipleValueSeparator)
          If this item is displaying multiple values, this property will be the string that separates those values for display purposes.
 void setName(String name)
          Name for this form field.
 void setOperator(OperatorId operator)
          OperatorId to be used when DynamicForm.getValuesAsCriteria is called.
 void setOptionCriteria(Criteria optionCriteria)
          If this item has a specified optionDataSource, and this property may be used to specify criteria to pass to the datasource when performing the fetch operation on the dataSource to obtain a data-value to display-value mapping
 void setOptionDataSource(DataSource dataSource)
           
 void setOptionFilterContext(RPCRequest rpcRequestProperties)
          If this item has a specified optionDataSource, and this property is not null, this will be passed to the datasource as RPCRequest properties when performing the fetch operation on the dataSource to obtain a data-value to display-value mapping
 void setOptionOperationId(String optionOperationId)
          If this item has a specified optionDataSource, this attribute may be set to specify an explicit operationId when performing a fetch against the option dataSource to pick up display value mapping.
 void setPickerIconHeight(Integer pickerIconHeight)
          If showPickerIcon is true for this item, this property governs the size of the picker icon.
 void setPickerIconName(String pickerIconName)
          If showPickerIcon is true, this attribute specifies the name applied to the picker icon
 void setPickerIconPrompt(String pickerIconPrompt)
          Prompt to show when the user hovers the mouse over the picker icon.
 void setPickerIconProperties(FormItemIcon pickerIconProperties)
          If showPickerIcon is true for this item, this block of properties will be applied to the pickerIcon.
 void setPickerIconSrc(String pickerIconSrc)
          If showPickerIcon is true for this item, this property governs the src of the picker icon image to be displayed.
 void setPickerIconStyle(String pickerIconStyle)
          Base CSS class name for a form item's picker icon cell.
 void setPickerIconWidth(Integer pickerIconWidth)
          If showPickerIcon is true for this item, this property governs the size of the picker icon.
 void setPrintTextBoxStyle(String printTextBoxStyle)
          Base CSS class name for a form item's text box element when getting printable HTML for the form.
 void setPrintTitleStyle(String printTitleStyle)
          Base CSS stylename for a form item's title when generating print HTML for the item.
 void setPrompt(String prompt)
          This text is shown as a tooltip prompt when the cursor hovers over this item.
 void setProperty(String property, boolean value)
           
 void setProperty(String property, double value)
           
 void setProperty(String property, int value)
           
 void setProperty(String property, JavaScriptObject value)
           
 void setProperty(String property, String value)
           
 void setReadOnlyClipValue(Boolean readOnlyClipValue)
          If this item is canEdit:false, and has readOnlyDisplay set to "static", should the item value be clipped if it overflows the specified size of the item?
 void setReadOnlyDisplay(ReadOnlyDisplayAppearance readOnlyDisplay)
          If canEdit is set to false, how should this item be displayed to the user?

If this method is called after the component has been drawn/initialized: Setter for the readOnlyDisplay attribute.
 void setReadOnlyTextBoxStyle(String readOnlyTextBoxStyle)
          TextBoxStyle to apply to canEdit:false items with readOnlyDisplay set to "static".
 void setRedrawOnChange(Boolean redrawOnChange)
          If true, this item will cause the entire form to be redrawn when the item's "elementChanged" event is done firing
 void setRejectInvalidValueOnChange(Boolean rejectInvalidValueOnChange)
          If validateOnChange is true, and validation fails for this item on change, with no suggested value, should we revert to the previous value, or continue to display the bad value entered by the user.
 void setRequired(Boolean required)
          Whether a non-empty value is required for this field to pass validation.
 void setRequiredMessage(String requiredMessage)
          The required message for required field errors.
 void setRowSpan(int rowSpan)
          Number of rows that this item spans
 void setSaveOnEnter(Boolean saveOnEnter)
          Set this to true to allow the parent form to save it's data when 'Enter' is pressed on this formItem and saveOnEnter is true on the parent form.
 void setScClassName(String scClassName)
          Set the name of the underlying SmartClient class.
 void setSelectOnClick(Boolean selectOnClick)
          Allows the selectOnClick behavior to be configured on a per-FormItem basis.
 void setSelectOnFocus(Boolean selectOnFocus)
          Allows the selectOnFocus behavior to be configured on a per-FormItem basis.
 void setShouldSaveValue(Boolean shouldSaveValue)
          Should this item's value be saved in the form's values and hence returned from form.getValues()?
 void setShowClippedTitleOnHover(boolean showClippedTitleOnHover)
          If true and the title is clipped, then a hover containing the full title of this item is enabled.
 void setShowClippedValueOnHover(Boolean showClippedValueOnHover)
          If true and the value is clipped, then a hover containing the full value of this item is enabled.
 void setShowDisabled(Boolean showDisabled)
          When this item is disabled, should it be re-styled to indicate its disabled state?

If this method is called after the component has been drawn/initialized: Setter method for showDisabled
 void setShowErrorIcon(Boolean showErrorIcon)
          showErrorIcons, showErrorText, and showErrorStyle control how validation errors are displayed when they are displayed inline in the form (next to the form item where there is a validation error).
 void setShowErrorStyle(Boolean showErrorStyle)
          showErrorIcons, showErrorText, and showErrorStyle control how validation errors are displayed when they are displayed inline in the form (next to the form item where there is a validation error).
 void setShowErrorText(Boolean showErrorText)
          showErrorIcons, showErrorText, and showErrorStyle control how validation errors are displayed when they are displayed inline in the form (next to the form item where there is a validation error).
 void setShowFocused(Boolean showFocused)
          When this item receives focus, should it be re-styled to indicate it has focus?
 void setShowFocusedErrorState(Boolean showFocusedErrorState)
          If set to true, when an item has errors and is focused, an "ErrorFocused" suffix will appear on the stylename.
 void setShowFocusedIcons(Boolean showFocusedIcons)
          If we're showing icons, should we change their image source to the appropriate focused source when this item has focus? Can be overridden on a per icon basis by the formItemIcon showFocused property.
 void setShowFocusedPickerIcon(Boolean showFocusedPickerIcon)
          If showPickerIcon is true for this item, should the picker icon show a focused image when the form item has focus?
 void setShowHint(Boolean showHint)
          If a hint is defined for this form item, should it be shown?
 void setShowIcons(Boolean showIcons)
          Set to false to suppress writing out any icons for this item.
 void setShowIfCondition(FormItemIfFunction showIf)
          Expression that's evaluated to see if an item should be dynamically hidden.
 void setShowOverIcons(Boolean showOverIcons)
          If we're showing icons, should we change their image source to the appropriate over source when the user rolls over (or puts focus onto) them? Can be overridden on a per icon basis by the formItemIcon showOver property.
 void setShowPickerIcon(Boolean showPickerIcon)
          Should we show a special 'picker' icon for this form item? Picker icons are customizable via pickerIconProperties.
 void setShowRTL(boolean showRTL)
          When this item is in RTL mode, should its style name include an "RTL" suffix?
 void setShowTitle(Boolean showTitle)
          Should we show a title cell for this formItem?
 void setShowValueIconOnly(Boolean showValueIconOnly)
          If valueIcons is set, this property may be set to show the valueIcon only and prevent the standard form item element or text from displaying
 void setStartRow(Boolean startRow)
          Whether this item should always start a new row in the form layout.
 void setStopOnError(Boolean stopOnError)
          Indicates that if validation fails, the user should not be allowed to exit the field - focus will be forced back into the field until the error is corrected.
 void setSuppressValueIcon(Boolean suppressValueIcon)
          If valueIcons is set, this property may be set to prevent the value icons from showing up next to the form items value
 void setSynchronousValidation(Boolean synchronousValidation)
          If enabled, whenever validation is triggered and a request to the server is required, user interactivity will be blocked until the request returns.
 void setTabIndex(Integer tabIndex)
          TabIndex for the form item within the form, which controls the order in which controls are visited when the user hits the tab or shift-tab keys to navigate between items.
 void setTextAlign(Alignment textAlign)
          Alignment of the text / content within this form item.
 void setTextBoxStyle(String textBoxStyle)
          Base CSS class name for a form item's text box element.
 void setTimeFormatter(TimeDisplayFormat timeFormatter)
          Time-format to apply to date type values within this formItem.
 void setTitle(String title)
          User visible title for this form item.
 void setTitleAlign(Alignment titleAlign)
          Alignment of this item's title in its cell.
 void setTitleColSpan(int titleColSpan)
          Number of columns that this item's title spans.
 void setTitleHoverFormatter(FormItemHoverFormatter hoverFormatter)
          Synonym for setItemTitleHoverFormatter(FormItemHoverFormatter).
 void setTitleOrientation(TitleOrientation titleOrientation)
          On which side of this item should the title be placed.
 void setTitleStyle(String titleStyle)
          Base CSS class name for a form item's title.
 void setTitleVAlign(VerticalAlignment titleVAlign)
          Vertical alignment of this item's title in its cell.
 void setTooltip(String tooltip)
          This text is shown as a tooltip prompt when the cursor hovers over this item.
 void setTop(int top)
          Top coordinate of this item in pixels.
 void setType(String type)
          The DynamicForm picks a field renderer based on the type of the field (and sometimes other attributes of the field).
 void setValidateOnChange(Boolean validateOnChange)
          If true, form items will be validated when each item's "change" handler is fired as well as when the entire form is submitted or validated.
 void setValidateOnExit(Boolean validateOnExit)
          If true, form items will be validated when each item's "editorExit" handler is fired as well as when the entire form is submitted or validated.
 void setValidators(Validator... validators)
          Validators for this form item.
 void setValidOperators(OperatorId... validOperators)
          Array of valid filtering operators (eg "greaterThan") that are legal for this FormItem.
 void setVAlign(VerticalAlignment vAlign)
          Vertical alignment of this item within its cell.
 void setValue(boolean value)
          Set the value of the form item.
 void setValue(Date value)
          Set the value of the form item.
 void setValue(double value)
          Set the value of the form item.
 void setValue(int value)
          Set the value of the form item.
 void setValue(Object value)
          Set the value of the form item as an object.
 void setValue(String value)
          Set the value of the form item.
 void setValueField(String valueField)
          If this form item maps data values to display values by retrieving the displayField values from an optionDataSource, this property denotes the the field to use as the underlying data value in records from the optionDataSource.
If unset, assumed to be the name of this form item.
 void setValueFormatter(FormItemValueFormatter formatter)
          Optional FormItemValueFormatter, if provided, is evaluated to get the display value to show for this form items underlying data value.
 void setValueHoverFormatter(FormItemHoverFormatter hoverFormatter)
          Synonym for setItemValueHoverFormatter(FormItemHoverFormatter).
 void setValueIconHeight(Integer valueIconHeight)
          If valueIcons is specified, use this property to specify a height for the value icon written out.
 void setValueIconLeftPadding(int valueIconLeftPadding)
          If we're showing a value icon, this attribute governs the amount of space between the icon and the start edge of the form item cell.
 void setValueIconMapper(ValueIconMapper valueIconMapper)
          Set the FormItem Value Icon mapper that allows the developer to specify the image source for an icon to be displayed for the current form item value.
 void setValueIconRightPadding(int valueIconRightPadding)
          If we're showing a value icon, this attribute governs the amount of space between the icon and the value text.
 void setValueIcons(Map valueIcons)
          Set the valueIcons for this item.
 void setValueIconSize(int valueIconSize)
          If valueIcons is specified, this property may be used to specify both the width and height of the icon written out.
 void setValueIconWidth(Integer valueIconWidth)
          If valueIcons is specified, use this property to specify a width for the value icon written out.
 void setValueMap(LinkedHashMap valueMap)
          Set the valueMap for this item.
 void setValueMap(String... valueMap)
          Set the valueMap for this item.
 void setVisible(Boolean visible)
          Whether this item is currently visible.
 void setWidth(int width)
          Width of the FormItem.
 void setWidth(String width)
          Width of the FormItem.
 void setWrapTitle(Boolean wrapTitle)
          If specified determines whether this items title should wrap.
 boolean shouldApplyHeightToTextBox()
          If height is specified, should it be applied to the item's text box element? If this method returns false, the text box will not have an explicit height applied, though the containing cell will be sized to accomodiate any specified height.
 Boolean shouldFetchMissingValue(Object newValue)
          If this field has a specified optionDataSource, should we perform a fetch against that dataSource to find the record that matches this field's value?
 Boolean shouldSaveOnEnter()
          Returns true if 'Enter' key presses in this formItem should allow a saveOnEnter: true parent form to save it's data.
 void show()
          Show this form item.
 void showIcon(String icon)
          This method will show some icon in this item's icons array, if it is not already visible.
 void showPicker()
          Method to show a picker for this item.
 void stopHover()
          This method is fired when the user rolls off this item (or the title for this item) and will clear any hover canvas shown by the item.
 void storeValue(Object value)
          Store (and optionally show) a value for this form item.
 void storeValue(Object value, Boolean showValue)
          Store (and optionally show) a value for this form item.
 void updateState()
          Update the visual state of a FormItem to reflect any changes in state or any changes in style settings (eg textBoxStyle).
 Boolean validate()
          Validate this item.
 boolean valueClipped()
          Is the value clipped?
 
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, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttributeAsJavaObject
 
Methods inherited from class com.smartgwt.client.core.JsObject
equals, getJsObj, hashCode, setJavaScriptObject, 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
 

Field Detail

scClassName

protected String scClassName
Constructor Detail

FormItem

public FormItem()

FormItem

public FormItem(JavaScriptObject jsObj)

FormItem

public FormItem(String name)
Method Detail

getOrCreateRef

public static FormItem getOrCreateRef(JavaScriptObject jsObj)

changeAutoChildDefaults

public static void changeAutoChildDefaults(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(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)

setAccessKey

public void setAccessKey(String accessKey)
If specified this governs the HTML accessKey for the item.

This should be set to a character - when a user hits the html accessKey modifier for the browser, plus this character, focus will be given to the item. The accessKey modifier can vary by browser and platform.

The following list of default behavior is for reference only, developers should also consult browser documentation for additional information.

Parameters:
accessKey - Default value is null
See Also:
Focus overview and related methods

getAccessKey

public String getAccessKey()
If specified this governs the HTML accessKey for the item.

This should be set to a character - when a user hits the html accessKey modifier for the browser, plus this character, focus will be given to the item. The accessKey modifier can vary by browser and platform.

The following list of default behavior is for reference only, developers should also consult browser documentation for additional information.

Returns:
String
See Also:
Focus overview and related methods

setAlign

public void setAlign(Alignment align)
Alignment of this item in its cell. Note that the alignment of content within this item can be separately controlled via textAlign (typically only applies to items showing a "textBox", such as textItems or selectItems).

Parameters:
align - Default value is Canvas.LEFT
See Also:
Appearance overview and related methods

getAlign

public Alignment getAlign()
Alignment of this item in its cell. Note that the alignment of content within this item can be separately controlled via textAlign (typically only applies to items showing a "textBox", such as textItems or selectItems).

Returns:
Alignment
See Also:
Appearance overview and related methods

setAllowExpressions

public void setAllowExpressions(Boolean allowExpressions)
For a form that produces filter criteria (see form.getValuesAsCriteria()), allows the user to type in simple expressions to cause filtering with that operator. For example, entering ">5" means values greater than 5, and ">0 and <5" means values between 0 and 5.

The following table lists character sequences that can be entered as a prefix to a value, and the corresponding operator that will be used.

PrefixOperator
<lessThan
>greaterThan
<=lessThanOrEqual
>=greaterThanOrEqual
someValue...someValuebetweenInclusive
!notEqual
^startsWith
|endsWith
!^notStartsWith plus logical not
!@notEndsWith plus logical not
~contains
!~notContains
#isNull
!#isNotNull
==exact match (for fields where 'contains' is the default)

Two further special notations are allowed:

In all cases, if an operator is disallowed for the field (via field.validOperators at either the dataSource or field level), the operator character is ignored (treated as part of a literal value).

By default, the case-insensitive version of the operator is used (eg, startsWith will actually use "iStartsWith"). To avoid this, explicitly set item.operator (the default operator) to any case sensitive operator (eg "equals" or "contains") and case sensitive operators will be used for user-entered expressions.

Compound expressions (including "and" and "or") are allowed only for numeric or date/time types.

Note that if the user does not type a prefix or use other special notation as described above, the operator specified via operator is used, or if formItem.operator is unspecified, a default operator chosen as described under operator.

Also note that whatever you enter will be used literally, including any whitespace characters. For example if you input '== China ' then ' China ' will be the value.

The allowExpression behavior can be enabled for every field in a form via allowExpressions.

Finally, note that, like operator, enabling allowExpressions:true causes form.getValuesAsCriteria()) to return AdvancedCriteria.

Parameters:
allowExpressions - Default value is null

getAllowExpressions

public Boolean getAllowExpressions()
For a form that produces filter criteria (see form.getValuesAsCriteria()), allows the user to type in simple expressions to cause filtering with that operator. For example, entering ">5" means values greater than 5, and ">0 and <5" means values between 0 and 5.

The following table lists character sequences that can be entered as a prefix to a value, and the corresponding operator that will be used.

PrefixOperator
<lessThan
>greaterThan
<=lessThanOrEqual
>=greaterThanOrEqual
someValue...someValuebetweenInclusive
!notEqual
^startsWith
|endsWith
!^notStartsWith plus logical not
!@notEndsWith plus logical not
~contains
!~notContains
#isNull
!#isNotNull
==exact match (for fields where 'contains' is the default)

Two further special notations are allowed:

In all cases, if an operator is disallowed for the field (via field.validOperators at either the dataSource or field level), the operator character is ignored (treated as part of a literal value).

By default, the case-insensitive version of the operator is used (eg, startsWith will actually use "iStartsWith"). To avoid this, explicitly set item.operator (the default operator) to any case sensitive operator (eg "equals" or "contains") and case sensitive operators will be used for user-entered expressions.

Compound expressions (including "and" and "or") are allowed only for numeric or date/time types.

Note that if the user does not type a prefix or use other special notation as described above, the operator specified via operator is used, or if formItem.operator is unspecified, a default operator chosen as described under operator.

Also note that whatever you enter will be used literally, including any whitespace characters. For example if you input '== China ' then ' China ' will be the value.

The allowExpression behavior can be enabled for every field in a form via allowExpressions.

Finally, note that, like operator, enabling allowExpressions:true causes form.getValuesAsCriteria()) to return AdvancedCriteria.

Returns:
Boolean

setAlwaysFetchMissingValues

public void setAlwaysFetchMissingValues(Boolean alwaysFetchMissingValues)
If this form item has a specified optionDataSource and fetchMissingValues is true, when the item value changes, a fetch will be performed against the optionDataSource to retrieve the related record if displayField is specified and the new item value is not present in any valueMap explicitly specified on the item.

Setting this property to true means that a fetch will occur against the optionDataSource to retrieve the related record even if displayField is unset, or the item has a valueMap which explicitly contains this field's value.

An example of a use case where this might be set would be if FormItem.formatValue or FormItem.formatEditorValue were written to display properties from the selected record.

Note - for efficiency we cache the associated record once a fetch has been performed, meaning if the value changes, then reverts to a previously seen value, we do not kick off an additional fetch even if this property is true. If necessary this cache may be explicitly invalidated via a call to FormItem.invalidateDisplayValueCache

Note : This is an advanced setting

Parameters:
alwaysFetchMissingValues - Default value is false

getAlwaysFetchMissingValues

public Boolean getAlwaysFetchMissingValues()
If this form item has a specified optionDataSource and fetchMissingValues is true, when the item value changes, a fetch will be performed against the optionDataSource to retrieve the related record if displayField is specified and the new item value is not present in any valueMap explicitly specified on the item.

Setting this property to true means that a fetch will occur against the optionDataSource to retrieve the related record even if displayField is unset, or the item has a valueMap which explicitly contains this field's value.

An example of a use case where this might be set would be if FormItem.formatValue or FormItem.formatEditorValue were written to display properties from the selected record.

Note - for efficiency we cache the associated record once a fetch has been performed, meaning if the value changes, then reverts to a previously seen value, we do not kick off an additional fetch even if this property is true. If necessary this cache may be explicitly invalidated via a call to FormItem.invalidateDisplayValueCache

Returns:
Boolean

setApplyHeightToTextBox

public void setApplyHeightToTextBox(Boolean applyHeightToTextBox)
If height is specified, should it be applied to the item's text box element?

If unset, behavior is determined as described in FormItem.shouldApplyHeightToTextBox

Note : This is an advanced setting

Parameters:
applyHeightToTextBox - Default value is null

getApplyHeightToTextBox

public Boolean getApplyHeightToTextBox()
If height is specified, should it be applied to the item's text box element?

If unset, behavior is determined as described in FormItem.shouldApplyHeightToTextBox

Returns:
Boolean

setAriaRole

public void setAriaRole(String ariaRole)
ARIA role of this formItem. Usually does not need to be manually set - see Accessibility.

Note : This is an advanced setting

Parameters:
ariaRole - Default value is null
See Also:
Accessibility overview and related methods

getAriaRole

public String getAriaRole()
ARIA role of this formItem. Usually does not need to be manually set - see Accessibility.

Returns:
String
See Also:
Accessibility overview and related methods

setBrowserSpellCheck

public void setBrowserSpellCheck(Boolean browserSpellCheck)
If this browser supports spell-checking of text editing elements, do we want this enabled for this item? If unset the property will be inherited from the containing form.

Notes:
- this property only applies to text based items such as TextItem and TextAreaItem.
- this property is not supported on all browsers.

Note : This is an advanced setting

Parameters:
browserSpellCheck - Default value is null
See Also:
DynamicForm.setBrowserSpellCheck(java.lang.Boolean)

getBrowserSpellCheck

public Boolean getBrowserSpellCheck()
If this browser supports spell-checking of text editing elements, do we want this enabled for this item? If unset the property will be inherited from the containing form.

Notes:
- this property only applies to text based items such as TextItem and TextAreaItem.
- this property is not supported on all browsers.

Returns:
Boolean
See Also:
DynamicForm.getBrowserSpellCheck()

setCanEdit

public void setCanEdit(Boolean canEdit)
Is this form item editable (canEdit:true) or read-only (canEdit:false)? Setting the form item to non-editable causes it to render as read-only. Can be updated at runtime via the setCanEdit() method.

Read-only appearance may be specified via readOnlyDisplay. The default setting for this value ("readOnly") differs from the disabled state in that the form item is not rendered with disabled styling and most form items will allow copying of the contents while read-only but do not while disabled.

Note that for forms bound to a DataSource, if this property is not explicitly set at the item level, its default value will match the canEditFieldAttribute on the associated dataSource field.

Developers should also be aware that the readOnlyDisplay attribute is unrelated to the readOnlyEditorType attribute. When a DynamicForm is first bound to a dataSource, for canEdit:false DataSourceFields, readOnlyEditorType will determine what FormItemType should be created for the field. Once created, a FormItem's type can not be changed. Setting canEdit at runtime will simply change the appearance of the item to allow or disallow editing of the item.

If this method is called after the component has been drawn/initialized: Is this form item editable (canEdit:true) or read-only (canEdit:false)? Setting the form item to non-editable causes it to render as read-only, using the appearance specified via readOnlyDisplay.

The default appearance for canEdit:false items (readOnlyDisplay:"readOnly") differs from the disabled state in that the form item is not rendered with disabled styling and most form items will allow copying of the contents while read-only but do not while disabled.

Parameters:
canEdit - Can this form item be edited?. Default value is null
See Also:
setCanEdit(java.lang.Boolean), DynamicForm.setCanEdit(java.lang.Boolean)

getCanEdit

public Boolean getCanEdit()
Is this form item editable (canEdit:true) or read-only (canEdit:false)? Setting the form item to non-editable causes it to render as read-only. Can be updated at runtime via the setCanEdit() method.

Read-only appearance may be specified via readOnlyDisplay. The default setting for this value ("readOnly") differs from the disabled state in that the form item is not rendered with disabled styling and most form items will allow copying of the contents while read-only but do not while disabled.

Note that for forms bound to a DataSource, if this property is not explicitly set at the item level, its default value will match the canEditFieldAttribute on the associated dataSource field.

Developers should also be aware that the readOnlyDisplay attribute is unrelated to the readOnlyEditorType attribute. When a DynamicForm is first bound to a dataSource, for canEdit:false DataSourceFields, readOnlyEditorType will determine what FormItemType should be created for the field. Once created, a FormItem's type can not be changed. Setting canEdit at runtime will simply change the appearance of the item to allow or disallow editing of the item.

Returns:
Is this form item editable or read-only?

This setting differs from the enabled/disabled state in that most form items will allow copying of the contents while read-only but do not while disabled.

See Also:
setCanEdit(java.lang.Boolean), DynamicForm.setCanEdit(java.lang.Boolean)

setCanFocus

public void setCanFocus(Boolean canFocus)
Is this form item focusable? Setting this property to true on an otherwise non-focusable element such as a StaticTextItem will cause the item to be included in the page's tab order and respond to keyboard events.

Note : This is an advanced setting

Parameters:
canFocus - Default value is null
See Also:
Focus overview and related methods

getCanFocus

public Boolean getCanFocus()
Is this form item focusable? Setting this property to true on an otherwise non-focusable element such as a StaticTextItem will cause the item to be included in the page's tab order and respond to keyboard events.

Returns:
Returns true for items that can accept keyboard focus such as data items (TextItems, TextAreaItems, etc), CanvasItems with a focusable canvas, or items where canFocus was explicitly set to true.
See Also:
Focus overview and related methods

setCellHeight

public void setCellHeight(Integer cellHeight)
If specified, this property will govern the height of the cell in which this form item is rendered. Will not apply when the containing DynamicForm sets itemLayout:"absolute".

Parameters:
cellHeight - Default value is null

getCellHeight

public Integer getCellHeight()
If specified, this property will govern the height of the cell in which this form item is rendered. Will not apply when the containing DynamicForm sets itemLayout:"absolute".

Returns:
Integer

setCellStyle

public void setCellStyle(String cellStyle)
CSS style applied to the form item as a whole, including the text element, any icons, and any hint text for the item. Applied to the cell containing the form item.

NOTE: See the CompoundFormItem_skinning discussion for special skinning considerations.

Parameters:
cellStyle - See FormItemBaseStyle . Default value is "formCell"
See Also:
Appearance overview and related methods

getCellStyle

public String getCellStyle()
CSS style applied to the form item as a whole, including the text element, any icons, and any hint text for the item. Applied to the cell containing the form item.

NOTE: See the CompoundFormItem_skinning discussion for special skinning considerations.

Returns:
See FormItemBaseStyle
See Also:
Appearance overview and related methods

setChangeOnKeypress

public void setChangeOnKeypress(Boolean changeOnKeypress)
Should this form item fire its change handler (and store its value in the form) on every keypress? Set to false to suppress the 'change' handler firing (and the value stored) on every keypress.

Note: If false, the value returned by getValue will not reflect the value displayed in the form item element as long as focus is in the form item element.

Parameters:
changeOnKeypress - Default value is true

getChangeOnKeypress

public Boolean getChangeOnKeypress()
Should this form item fire its change handler (and store its value in the form) on every keypress? Set to false to suppress the 'change' handler firing (and the value stored) on every keypress.

Note: If false, the value returned by getValue will not reflect the value displayed in the form item element as long as focus is in the form item element.

Returns:
Boolean

setClipTitle

public void setClipTitle(Boolean clipTitle)
If the title for this form item is showing, and is too large for the available space should the title be clipped?

Null by default - if set to true or false, overrides clipItemTitles.

Parameters:
clipTitle - Default value is null

getClipTitle

public Boolean getClipTitle()
If the title for this form item is showing, and is too large for the available space should the title be clipped?

Null by default - if set to true or false, overrides clipItemTitles.

Returns:
Boolean

getContainerWidget

public Canvas getContainerWidget()
A Read-Only pointer to the Smart GWT canvas that holds this form item. In most cases this will be the DynamicForm containing the item but in some cases editable components handle writing out form items directly. An example of this is Grid Editing - when a listGrid shows per-field editors, the containerWidget for each item will be the listGrid body.

Note that even if the containerWidget is not a DynamicForm, a DynamicForm will still exist for the item (available as form), allowing access to standard APIs such as DynamicForm.getValues

Returns:
Canvas

setControlStyle

public void setControlStyle(String controlStyle)
Base CSS class name for a form item's control box (surrounds text box and picker).

NOTE: See the CompoundFormItem_skinning discussion for special skinning considerations.

Parameters:
controlStyle - See FormItemBaseStyle . Default value is null
See Also:
setCellStyle(java.lang.String), Appearance overview and related methods

getControlStyle

public String getControlStyle()
Base CSS class name for a form item's control box (surrounds text box and picker).

NOTE: See the CompoundFormItem_skinning discussion for special skinning considerations.

Returns:
See FormItemBaseStyle
See Also:
getCellStyle(), Appearance overview and related methods

setCriteriaField

public void setCriteriaField(String criteriaField)
When using operator, the name of the DataSource field for the Criterion this FormItem generates. If not specified, defaults to name.

Generally, because criteriaField defaults to item.name, you don't need to specify it. However, if more than one FormItem specifies criteria for the same DataSource field, they will need unique values for name but should set criteriaField to the name of DataSource field they both target.

For example, if two DateItems are used to provide a min and max date for a single field called "joinDate", set criteriaField to "joinDate" on both fields but give the fields distinct names (eg "minDate" and "maxDate") and use those names for any programmatic access, such as DynamicForm.setValue.

Parameters:
criteriaField - Default value is null

getCriteriaField

public String getCriteriaField()
When using operator, the name of the DataSource field for the Criterion this FormItem generates. If not specified, defaults to name.

Generally, because criteriaField defaults to item.name, you don't need to specify it. However, if more than one FormItem specifies criteria for the same DataSource field, they will need unique values for name but should set criteriaField to the name of DataSource field they both target.

For example, if two DateItems are used to provide a min and max date for a single field called "joinDate", set criteriaField to "joinDate" on both fields but give the fields distinct names (eg "minDate" and "maxDate") and use those names for any programmatic access, such as DynamicForm.setValue.

Returns:
String

setDataPath

public void setDataPath(String dataPath)
dataPath for this item. Allows the user to edit details nested data structures in a flat set of form fields

Parameters:
dataPath - See DataPath . Default value is null

getDataPath

public String getDataPath()
dataPath for this item. Allows the user to edit details nested data structures in a flat set of form fields

Returns:
Return the dataPath for the this formItem. See DataPath

setDateFormatter

public void setDateFormatter(DateDisplayFormat dateFormatter)
Display format to use for date type values within this formItem.

Note that Fields of type "date", "datetime" or "time" will be edited using a DateItem or TimeItem by default, but this can be overridden - for canEdit:false fields, a StaticTextItem is used by default, and the developer can always specify a custom editorType as well as data type.

The timeFormatter may also be used to format underlying Date values as times (ommitting the date part entirely). If both dateFormatter and timeFormatter are specified on an item, for fields specified as type "time" the timeFormatter will be used, otherwise the dateFormatter

If item.dateFormatter and item.timeFormatter is unspecified, date display format may be defined at the component level via dateFormatter, or for fields of type "datetime" datetimeFormatter. Otherwise the default is to use the system-wide default short date format, configured via Date.setShortDisplayFormat. Specify any valid DateDisplayFormat to change the format used by this item.

Note that if this is a freeform editable field, such a TextItem, with type specified as "date" or "datetime" the system will automatically attempt to parse user entered values back to a Date value, assuming the entered string matches the date format for the field. Developers may further customize this via an explicit inputFormat or via entirely custom setEditorValueFormatter and setEditorValueParser methods.

Note : This is an advanced setting

Parameters:
dateFormatter - Default value is null
See Also:
setTimeFormatter(com.smartgwt.client.types.TimeDisplayFormat), setFormat(java.lang.String), Appearance overview and related methods

getDateFormatter

public DateDisplayFormat getDateFormatter()
Display format to use for date type values within this formItem.

Note that Fields of type "date", "datetime" or "time" will be edited using a DateItem or TimeItem by default, but this can be overridden - for canEdit:false fields, a StaticTextItem is used by default, and the developer can always specify a custom editorType as well as data type.

The timeFormatter may also be used to format underlying Date values as times (ommitting the date part entirely). If both dateFormatter and timeFormatter are specified on an item, for fields specified as type "time" the timeFormatter will be used, otherwise the dateFormatter

If item.dateFormatter and item.timeFormatter is unspecified, date display format may be defined at the component level via dateFormatter, or for fields of type "datetime" datetimeFormatter. Otherwise the default is to use the system-wide default short date format, configured via Date.setShortDisplayFormat. Specify any valid DateDisplayFormat to change the format used by this item.

Note that if this is a freeform editable field, such a TextItem, with type specified as "date" or "datetime" the system will automatically attempt to parse user entered values back to a Date value, assuming the entered string matches the date format for the field. Developers may further customize this via an explicit inputFormat or via entirely custom setEditorValueFormatter and setEditorValueParser methods.

Returns:
DateDisplayFormat
See Also:
getTimeFormatter(), getFormat(), Appearance overview and related methods

setDecimalPad

public void setDecimalPad(Integer decimalPad)
Applies only to fields of type "float" and enforces a minimum number of digits shown after the decimal point.

For example, a field value of 343.1, 343.104 and 343.09872677 would all be shown as 343.10 if decimalPad is 2.

The original unpadded value is always shown when the value is edited.

Parameters:
decimalPad - Default value is null
See Also:
Appearance overview and related methods

getDecimalPad

public Integer getDecimalPad()
Applies only to fields of type "float" and enforces a minimum number of digits shown after the decimal point.

For example, a field value of 343.1, 343.104 and 343.09872677 would all be shown as 343.10 if decimalPad is 2.

The original unpadded value is always shown when the value is edited.

Returns:
Integer
See Also:
Appearance overview and related methods

setDecimalPrecision

public void setDecimalPrecision(Integer decimalPrecision)
Applies only to fields of type "float" and affects how many significant digits are shown.

For example, with decimalPrecision 3, if the field value is 343.672677, 343.673 is shown.

If the value is 125.2, 125.2 is shown - decimalPrecision will not cause extra zeros to be added. Use decimalPad for this.

A number is always shown with its original precision when edited.

Parameters:
decimalPrecision - Default value is null
See Also:
Appearance overview and related methods

getDecimalPrecision

public Integer getDecimalPrecision()
Applies only to fields of type "float" and affects how many significant digits are shown.

For example, with decimalPrecision 3, if the field value is 343.672677, 343.673 is shown.

If the value is 125.2, 125.2 is shown - decimalPrecision will not cause extra zeros to be added. Use decimalPad for this.

A number is always shown with its original precision when edited.

Returns:
Integer
See Also:
Appearance overview and related methods

setDefaultIconSrc

public void setDefaultIconSrc(String defaultIconSrc)
Default icon image source. Specify as the partial URL to an image, relative to the imgDir of this component. To specify image source for a specific icon use the icon.src property.
If this item is drawn in the disabled state, the url will be modified by adding "_Disabled" to get a disabled state image for the icon. If icon.showOver is true, this url will be modified by adding "_Over" to get an over state image for the icon.

Note : This is an advanced setting

Parameters:
defaultIconSrc - See SCImgURL . Default value is "[SKIN]/DynamicForm/default_formItem_icon.gif"

getDefaultIconSrc

public String getDefaultIconSrc()
Default icon image source. Specify as the partial URL to an image, relative to the imgDir of this component. To specify image source for a specific icon use the icon.src property.
If this item is drawn in the disabled state, the url will be modified by adding "_Disabled" to get a disabled state image for the icon. If icon.showOver is true, this url will be modified by adding "_Over" to get an over state image for the icon.

Returns:
See SCImgURL

setDisabled

public void setDisabled(Boolean disabled)
Whether this item is disabled. Can be updated at runtime via the setDisabled() method. Note that if the widget containing this formItem is disabled, the formItem will behave in a disabled manner regardless of the setting of the item.disabled property.

Note that not all items can be disabled, and not all browsers show an obvious disabled style for native form elements.

If this method is called after the component has been drawn/initialized: Set this item to be enabled or disabled at runtime.

Parameters:
disabled - true if this item should be disabled. Default value is false
See Also:
setDisabled(java.lang.Boolean), Appearance overview and related methods, Enable & Disable Example

getDisabled

public Boolean getDisabled()
Whether this item is disabled. Can be updated at runtime via the setDisabled() method. Note that if the widget containing this formItem is disabled, the formItem will behave in a disabled manner regardless of the setting of the item.disabled property.

Note that not all items can be disabled, and not all browsers show an obvious disabled style for native form elements.

Returns:
Boolean
See Also:
setDisabled(java.lang.Boolean), Appearance overview and related methods, Enable & Disable Example

setDisableIconsOnReadOnly

public void setDisableIconsOnReadOnly(Boolean disableIconsOnReadOnly)
If canEdit is set to false, should icons be disabled by default?

This may also be specified at the icon level. See disableOnReadOnly.

Parameters:
disableIconsOnReadOnly - Default value is true

getDisableIconsOnReadOnly

public Boolean getDisableIconsOnReadOnly()
If canEdit is set to false, should icons be disabled by default?

This may also be specified at the icon level. See disableOnReadOnly.

Returns:
Boolean

setDisplayField

public void setDisplayField(String displayField)
Specifies an alternative field from which display values should be retrieved for this item.

The display field can be either another field value in the same record or a field that must be retrieved from a related optionDataSource.

If this item is not databound (optionDataSource is unset), or bound to the same dataSource as the form as a whole, this item will call form.getValue() the form named after is implemented by picking up the value of the specified field from the Form's values object.

Otherwise this item will attempt to map its underlying value to a display value by retrieving a record from the optionDataSource where the valueField matches this item's value, and displaying the displayField value from that record. Note that if optionDataSource is set and this value is not set, FormItem.getDisplayFieldName will return the dataSource title field by default.

This essentially enables the specified optionDataSource to be used as a server based valueMap.

Parameters:
displayField - Default value is null
See Also:
invalidateDisplayValueCache()

getDisplayField

public String getDisplayField()
Specifies an alternative field from which display values should be retrieved for this item.

The display field can be either another field value in the same record or a field that must be retrieved from a related optionDataSource.

If this item is not databound (optionDataSource is unset), or bound to the same dataSource as the form as a whole, this item will call form.getValue() the form named after is implemented by picking up the value of the specified field from the Form's values object.

Otherwise this item will attempt to map its underlying value to a display value by retrieving a record from the optionDataSource where the valueField matches this item's value, and displaying the displayField value from that record. Note that if optionDataSource is set and this value is not set, FormItem.getDisplayFieldName will return the dataSource title field by default.

This essentially enables the specified optionDataSource to be used as a server based valueMap.

Returns:
Returns the displayField for this item. This will typically be specified explicitly via the displayField attribute. However, if that property is unset, and the valueField for this item is hidden in the optionDataSource, this method will return the title field for the optionDataSource.
See Also:
invalidateDisplayValueCache()

setEditPendingCSSText

public void setEditPendingCSSText(String editPendingCSSText)
Custom CSS text to be applied to cells with pending edits that have not yet been submitted.

Note : This is an advanced setting

Parameters:
editPendingCSSText - Default value is "color:#0066CC;"
See Also:
Appearance overview and related methods

getEditPendingCSSText

public String getEditPendingCSSText()
Custom CSS text to be applied to cells with pending edits that have not yet been submitted.

Returns:
String
See Also:
Appearance overview and related methods

setEmptyDisplayValue

public void setEmptyDisplayValue(String emptyDisplayValue)
Text to display when this form item has a null or undefined value.

If the formItem has a databound pickList, and its displayField or valueField (if the former isn't set) has an undefined emptyCellValue field, that field will automatically be set using the emptyDisplayValue property.

Parameters:
emptyDisplayValue - Default value is ""

getEmptyDisplayValue

public String getEmptyDisplayValue()
Text to display when this form item has a null or undefined value.

If the formItem has a databound pickList, and its displayField or valueField (if the former isn't set) has an undefined emptyCellValue field, that field will automatically be set using the emptyDisplayValue property.

Returns:
String

setEmptyValueIcon

public void setEmptyValueIcon(String emptyValueIcon)
This property allows the developer to specify an icon to display when this item has no value. It is configured in the same way as any other valueIcon (see valueIcons)

Parameters:
emptyValueIcon - Default value is null

getEmptyValueIcon

public String getEmptyValueIcon()
This property allows the developer to specify an icon to display when this item has no value. It is configured in the same way as any other valueIcon (see valueIcons)

Returns:
String

setEndRow

public void setEndRow(Boolean endRow)
Whether this item should end the row it's in in the form layout

Parameters:
endRow - Default value is false
See Also:
FormLayout overview and related methods

getEndRow

public Boolean getEndRow()
Whether this item should end the row it's in in the form layout

Returns:
Boolean
See Also:
FormLayout overview and related methods

setErrorIconHeight

public void setErrorIconHeight(int errorIconHeight)
Height of the error icon, if we're showing icons when validation errors occur.

Parameters:
errorIconHeight - Default value is 16
See Also:
setShowErrorIcon(java.lang.Boolean)

getErrorIconHeight

public int getErrorIconHeight()
Height of the error icon, if we're showing icons when validation errors occur.

Returns:
int
See Also:
getShowErrorIcon()

setErrorIconSrc

public void setErrorIconSrc(String errorIconSrc)
URL of the image to show as an error icon, if we're showing icons when validation errors occur.

Parameters:
errorIconSrc - See SCImgURL . Default value is "[SKIN]/DynamicForm/validation_error_icon.png"
See Also:
setShowErrorIcon(java.lang.Boolean)

getErrorIconSrc

public String getErrorIconSrc()
URL of the image to show as an error icon, if we're showing icons when validation errors occur.

Returns:
See SCImgURL
See Also:
getShowErrorIcon()

setErrorIconWidth

public void setErrorIconWidth(int errorIconWidth)
Height of the error icon, if we're showing icons when validation errors occur.

Parameters:
errorIconWidth - Default value is 16
See Also:
setShowErrorIcon(java.lang.Boolean)

getErrorIconWidth

public int getErrorIconWidth()
Height of the error icon, if we're showing icons when validation errors occur.

Returns:
int
See Also:
getShowErrorIcon()

setErrorMessageWidth

public void setErrorMessageWidth(int errorMessageWidth)
When showInlineErrors and showErrorText are both true and errorOrientation is "left" or "right", errorMessageWidth is the amount to reduce the width of the editor to accommodate the error message and icon.

Parameters:
errorMessageWidth - Default value is 80
See Also:
Validation overview and related methods

getErrorMessageWidth

public int getErrorMessageWidth()
When showInlineErrors and showErrorText are both true and errorOrientation is "left" or "right", errorMessageWidth is the amount to reduce the width of the editor to accommodate the error message and icon.

Returns:
int
See Also:
Validation overview and related methods

setExportFormat

public void setExportFormat(String exportFormat)
FormatString used during exports for numeric or date formatting. See exportFormat.

Parameters:
exportFormat - See FormatString . Default value is null
See Also:
ExportFormatting overview and related methods

getExportFormat

public String getExportFormat()
FormatString used during exports for numeric or date formatting. See exportFormat.

Returns:
See FormatString
See Also:
ExportFormatting overview and related methods

setFetchMissingValues

public void setFetchMissingValues(Boolean fetchMissingValues)
If this form item has a specified optionDataSource, should the item ever perform a fetch against this dataSource to retrieve the related record.

The fetch occurs if the item value is non null on initial draw of the form or whenever setValue() is called. Once the fetch completes, the returned record is available via the FormItem.getSelectedRecord api.

By default, a fetch will only occur if displayField is specified, and the item does not have an explicit valueMap containing the data value as a key.
However you can also set alwaysFetchMissingValues to have a fetch occur even if no displayField is specified. This ensures FormItem.getSelectedRecord will return a record if possible - useful for custom formatter functions, etc.

Note - for efficiency we cache the associated record once a fetch has been performed, meaning if the value changes, then reverts to a previously seen value, we do not kick off an additional fetch to pick up the display value for the previously seen data value. If necessary this cache may be explicitly invalidated via a call to FormItem.invalidateDisplayValueCache

Note : This is an advanced setting

Parameters:
fetchMissingValues - Default value is true
See Also:
setOptionDataSource(com.smartgwt.client.data.DataSource), getSelectedRecord(), setFilterLocally(java.lang.Boolean)

getFetchMissingValues

public Boolean getFetchMissingValues()
If this form item has a specified optionDataSource, should the item ever perform a fetch against this dataSource to retrieve the related record.

The fetch occurs if the item value is non null on initial draw of the form or whenever setValue() is called. Once the fetch completes, the returned record is available via the FormItem.getSelectedRecord api.

By default, a fetch will only occur if displayField is specified, and the item does not have an explicit valueMap containing the data value as a key.
However you can also set alwaysFetchMissingValues to have a fetch occur even if no displayField is specified. This ensures FormItem.getSelectedRecord will return a record if possible - useful for custom formatter functions, etc.

Note - for efficiency we cache the associated record once a fetch has been performed, meaning if the value changes, then reverts to a previously seen value, we do not kick off an additional fetch to pick up the display value for the previously seen data value. If necessary this cache may be explicitly invalidated via a call to FormItem.invalidateDisplayValueCache

Returns:
Boolean
See Also:
com.smartgwt.client.widgets.form.fields.FormItem#getOptionDataSource, getSelectedRecord(), getFilterLocally()

setFilterLocally

public void setFilterLocally(Boolean filterLocally)
If this form item is mapping data values to a display value by fetching records from a dataSource (see optionDataSource, displayField and fetchMissingValues), setting this property to true ensures that when the form item value is set, entire data-set from the dataSource is loaded at once and used as a valueMap, rather than just loading the display value for the current value. This avoids the need to perform fetches each time setValue() is called with a new value.

See also filterLocally for behavior on form items such as SelectItems that show pick-lists.

Note : This is an advanced setting

Parameters:
filterLocally - Default value is null

getFilterLocally

public Boolean getFilterLocally()
If this form item is mapping data values to a display value by fetching records from a dataSource (see optionDataSource, displayField and fetchMissingValues), setting this property to true ensures that when the form item value is set, entire data-set from the dataSource is loaded at once and used as a valueMap, rather than just loading the display value for the current value. This avoids the need to perform fetches each time setValue() is called with a new value.

See also filterLocally for behavior on form items such as SelectItems that show pick-lists.

Returns:
Boolean

setFormat

public void setFormat(String format)
FormatString for numeric or date formatting. See format.

Parameters:
format - See FormatString . Default value is null
See Also:
ExportFormatting overview and related methods

getFormat

public String getFormat()
FormatString for numeric or date formatting. See format.

Returns:
See FormatString
See Also:
ExportFormatting overview and related methods

setGlobalTabIndex

public void setGlobalTabIndex(Integer globalTabIndex)
TabIndex for the form item within the page. Takes precedence over any local tab index specified as item.tabIndex.

Use of this API is extremely advanced and essentially implies taking over management of tab index assignment for all components on the page.

Note : This is an advanced setting

Parameters:
globalTabIndex - Default value is null
See Also:
Focus overview and related methods

getGlobalTabIndex

public Integer getGlobalTabIndex()
TabIndex for the form item within the page. Takes precedence over any local tab index specified as item.tabIndex.

Use of this API is extremely advanced and essentially implies taking over management of tab index assignment for all components on the page.

Returns:
Integer
See Also:
Focus overview and related methods

setHeight

public void setHeight(int height)
Height of the FormItem. Can be either a number indicating a fixed height in pixels, a percentage indicating a percentage of the overall form's height, or "*" indicating take whatever remaining space is available. See the FormLayout overview for details.

If height is specified as a String, getHeight() will return -1. Use +sgwtLink{getHeightAsString()} in this case.

For form items having a picker icon (e.g. SelectItem, ComboBoxItem) and SpinnerItems, if spriting is enabled, it is not recommended to change the height of the form item from the default because the image sprites are set up assuming a specific, fixed height of the item. If the item height must be changed, then the pickerIconStyle should be changed to a custom CSS style name. Or, in the case of SpinnerItems, the baseStyle and src of the increaseIcon and decreaseIcon AutoChildren should be customized.

Parameters:
height - Default value is -1
See Also:
FormLayout overview and related methods, Filling Example

getHeight

public int getHeight()
Height of the FormItem. Can be either a number indicating a fixed height in pixels, a percentage indicating a percentage of the overall form's height, or "*" indicating take whatever remaining space is available. See the FormLayout overview for details.

If height is specified as a String, getHeight() will return -1. Use +sgwtLink{getHeightAsString()} in this case.

For form items having a picker icon (e.g. SelectItem, ComboBoxItem) and SpinnerItems, if spriting is enabled, it is not recommended to change the height of the form item from the default because the image sprites are set up assuming a specific, fixed height of the item. If the item height must be changed, then the pickerIconStyle should be changed to a custom CSS style name. Or, in the case of SpinnerItems, the baseStyle and src of the increaseIcon and decreaseIcon AutoChildren should be customized.

Returns:
int
See Also:
FormLayout overview and related methods, Filling Example

setHeight

public void setHeight(String height)
Height of the FormItem. Can be either a number indicating a fixed height in pixels, a percentage indicating a percentage of the overall form's height, or "*" indicating take whatever remaining space is available. See the FormLayout overview for details.

If height is specified as a String, getHeight() will return -1. Use +sgwtLink{getHeightAsString()} in this case.

For form items having a picker icon (e.g. SelectItem, ComboBoxItem) and SpinnerItems, if spriting is enabled, it is not recommended to change the height of the form item from the default because the image sprites are set up assuming a specific, fixed height of the item. If the item height must be changed, then the pickerIconStyle should be changed to a custom CSS style name. Or, in the case of SpinnerItems, the baseStyle and src of the increaseIcon and decreaseIcon AutoChildren should be customized.

Parameters:
height - Default value is -1
See Also:
FormLayout overview and related methods, Filling Example

getHeightAsString

public String getHeightAsString()
Height of the FormItem. Can be either a number indicating a fixed height in pixels, a percentage indicating a percentage of the overall form's height, or "*" indicating take whatever remaining space is available. See the FormLayout overview for details.

If height is specified as a String, getHeight() will return -1. Use +sgwtLink{getHeightAsString()} in this case.

For form items having a picker icon (e.g. SelectItem, ComboBoxItem) and SpinnerItems, if spriting is enabled, it is not recommended to change the height of the form item from the default because the image sprites are set up assuming a specific, fixed height of the item. If the item height must be changed, then the pickerIconStyle should be changed to a custom CSS style name. Or, in the case of SpinnerItems, the baseStyle and src of the increaseIcon and decreaseIcon AutoChildren should be customized.

Returns:
String
See Also:
FormLayout overview and related methods, Filling Example

setHint

public void setHint(String hint)
Specifies "hint" string to show next to the form item to indicate something to the user. This string generally appears to the right of the form item.

If this method is called after the component has been drawn/initialized: Set the hint text for this item

Parameters:
hint - new hint for the item See HTMLString . Default value is null
See Also:
setHintStyle(java.lang.String), Appearance overview and related methods, Hints Example

getHint

public String getHint()
Specifies "hint" string to show next to the form item to indicate something to the user. This string generally appears to the right of the form item.

Returns:
See HTMLString
See Also:
getHintStyle(), Appearance overview and related methods, Hints Example

setHintStyle

public void setHintStyle(String hintStyle)
CSS class for the "hint" string.

If this method is called after the component has been drawn/initialized: Set the hintStyle for this item

Parameters:
hintStyle - new style for hint text. Default value is "formHint"
See Also:
setHint(java.lang.String), Appearance overview and related methods

getHintStyle

public String getHintStyle()
CSS class for the "hint" string.

Returns:
String
See Also:
getHint(), Appearance overview and related methods

setHoverAlign

public void setHoverAlign(Alignment hoverAlign)
Text alignment for text displayed in this item's hover canvas, if shown.

Parameters:
hoverAlign - Default value is null
See Also:
DynamicForm.setItemHoverAlign(com.smartgwt.client.types.Alignment)

getHoverAlign

public Alignment getHoverAlign()
Text alignment for text displayed in this item's hover canvas, if shown.

Returns:
Alignment
See Also:
DynamicForm.getItemHoverAlign()

setHoverDelay

public void setHoverDelay(Integer hoverDelay)
If specified, this is the number of milliseconds to wait between the user rolling over this form item, and triggering any hover action for it.
If not specified this.form.itemHoverDelay will be used instead.

Note : This is an advanced setting

Parameters:
hoverDelay - Default value is null

getHoverDelay

public Integer getHoverDelay()
If specified, this is the number of milliseconds to wait between the user rolling over this form item, and triggering any hover action for it.
If not specified this.form.itemHoverDelay will be used instead.

Returns:
Integer

setHoverHeight

public void setHoverHeight(Integer hoverHeight)
Option to specify a height for any hover shown for this item.

Parameters:
hoverHeight - Default value is null
See Also:
DynamicForm.setItemHoverHeight(java.lang.Integer)

getHoverHeight

public Integer getHoverHeight()
Option to specify a height for any hover shown for this item.

Returns:
Integer
See Also:
DynamicForm.getItemHoverHeight()

setHoverOpacity

public void setHoverOpacity(Integer hoverOpacity)
Opacity for any hover shown for this item

Parameters:
hoverOpacity - Default value is null
See Also:
DynamicForm.setItemHoverOpacity(java.lang.Integer)

getHoverOpacity

public Integer getHoverOpacity()
Opacity for any hover shown for this item

Returns:
Integer
See Also:
DynamicForm.getItemHoverOpacity()

setHoverStyle

public void setHoverStyle(String hoverStyle)
Explicit CSS Style for any hover shown for this item.

Parameters:
hoverStyle - See CSSStyleName . Default value is null
See Also:
DynamicForm.setItemHoverStyle(java.lang.String)

getHoverStyle

public String getHoverStyle()
Explicit CSS Style for any hover shown for this item.

Returns:
See CSSStyleName
See Also:
DynamicForm.getItemHoverStyle()

setHoverVAlign

public void setHoverVAlign(VerticalAlignment hoverVAlign)
Vertical text alignment for text displayed in this item's hover canvas, if shown.

Parameters:
hoverVAlign - Default value is null
See Also:
DynamicForm.setItemHoverVAlign(java.lang.Integer)

getHoverVAlign

public VerticalAlignment getHoverVAlign()
Vertical text alignment for text displayed in this item's hover canvas, if shown.

Returns:
VerticalAlignment
See Also:
DynamicForm.getItemHoverVAlign()

setHoverWidth

public void setHoverWidth(Integer hoverWidth)
Option to specify a width for any hover shown for this item.

Parameters:
hoverWidth - Default value is null
See Also:
DynamicForm.setItemHoverWidth(java.lang.Integer)

getHoverWidth

public Integer getHoverWidth()
Option to specify a width for any hover shown for this item.

Returns:
Integer
See Also:
DynamicForm.getItemHoverWidth()

setIconHeight

public void setIconHeight(int iconHeight)
Default height for form item icons

Note : This is an advanced setting

Parameters:
iconHeight - Default value is 20

getIconHeight

public int getIconHeight()
Default height for form item icons

Returns:
Takes an icon definition object, and returns the height for that icon in px.

setIconHSpace

public void setIconHSpace(Integer iconHSpace)
Horizontal space (in px) to leave between form item icons. The space appears to the left of each icon. May be overridden at the icon level via hspace.

Parameters:
iconHSpace - Default value is 3

getIconHSpace

public Integer getIconHSpace()
Horizontal space (in px) to leave between form item icons. The space appears to the left of each icon. May be overridden at the icon level via hspace.

Returns:
Integer

setIconPrompt

public void setIconPrompt(String iconPrompt)
Default prompt (and tooltip-text) for icons.

Note : This is an advanced setting

Parameters:
iconPrompt - Default value is ""

getIconPrompt

public String getIconPrompt()
Default prompt (and tooltip-text) for icons.

Returns:
String

setIcons

public void setIcons(FormItemIcon... icons)
An array of descriptor objects for icons to display in a line after this form item. These icons are clickable images, often used to display some kind of helper for populating a form item.

Parameters:
icons - Default value is null
See Also:
FormItemIcon, Icons Example

setIconVAlign

public void setIconVAlign(VerticalAlignment iconVAlign)
How should icons be aligned vertically for this form item.

Note : This is an advanced setting

Parameters:
iconVAlign - Default value is "bottom"

getIconVAlign

public VerticalAlignment getIconVAlign()
How should icons be aligned vertically for this form item.

Returns:
VerticalAlignment

setIconWidth

public void setIconWidth(int iconWidth)
Default width for form item icons

Note : This is an advanced setting

Parameters:
iconWidth - Default value is 20

getIconWidth

public int getIconWidth()
Default width for form item icons

Returns:
Takes an icon definition object, and returns the width for that icon in px.

setImageURLPrefix

public void setImageURLPrefix(String imageURLPrefix)
Prefix to apply to the beginning of any valueIcons when determining the URL for the image. Will not be applied if the valueIcon URL is absolute.

Note : This is an advanced setting

Parameters:
imageURLPrefix - Default value is null

getImageURLPrefix

public String getImageURLPrefix()
Prefix to apply to the beginning of any valueIcons when determining the URL for the image. Will not be applied if the valueIcon URL is absolute.

Returns:
String

setImageURLSuffix

public void setImageURLSuffix(String imageURLSuffix)
Suffix to apply to the end of any valueIcons when determining the URL for the image. A common usage would be to specify a suffix of ".gif" in which case the valueIcons property would map values to the names of images without the ".gif" extension.

Note : This is an advanced setting

Parameters:
imageURLSuffix - Default value is null

getImageURLSuffix

public String getImageURLSuffix()
Suffix to apply to the end of any valueIcons when determining the URL for the image. A common usage would be to specify a suffix of ".gif" in which case the valueIcons property would map values to the names of images without the ".gif" extension.

Returns:
String

setImplicitSave

public void setImplicitSave(Boolean implicitSave)
When true, indicates that changes to this item will cause an automatic save on a delay, as well as when the entire form is submitted. Unless implicitSaveOnBlur is set to false on either this formItem or it's form changes will also be automatically saved on editorExit.

Parameters:
implicitSave - Default value is false

getImplicitSave

public Boolean getImplicitSave()
When true, indicates that changes to this item will cause an automatic save on a delay, as well as when the entire form is submitted. Unless implicitSaveOnBlur is set to false on either this formItem or it's form changes will also be automatically saved on editorExit.

Returns:
Boolean

setImplicitSaveOnBlur

public void setImplicitSaveOnBlur(Boolean implicitSaveOnBlur)
If not set to false, form item values will be saved when this item's "editorExit" handler is fired as well as on a delay and when the entire form is submitted.

Parameters:
implicitSaveOnBlur - Default value is false

getImplicitSaveOnBlur

public Boolean getImplicitSaveOnBlur()
If not set to false, form item values will be saved when this item's "editorExit" handler is fired as well as on a delay and when the entire form is submitted.

Returns:
Boolean

setInputFormat

public void setInputFormat(String inputFormat)
For fields of type "date", if this is an editable field such as a TextItem, this property allows you to specify the inputFormat applied to the item.

Note : This is an advanced setting

Parameters:
inputFormat - See DateInputFormat . Default value is null
See Also:
setDateFormatter(com.smartgwt.client.types.DateDisplayFormat)

getInputFormat

public String getInputFormat()
For fields of type "date", if this is an editable field such as a TextItem, this property allows you to specify the inputFormat applied to the item.

Returns:
See DateInputFormat
See Also:
getDateFormatter()

setLeft

public void setLeft(int left)
Left coordinate of this item in pixels. Applies only when the containing DynamicForm sets itemLayout:"absolute".

If this method is called after the component has been drawn/initialized: For a form with itemLayout:"absolute" only, set the left coordinate of this form item.

Causes the form to redraw.

Note : This is an advanced setting

Parameters:
left - Default value is 0

getLeft

public int getLeft()
Left coordinate of this item in pixels. Applies only when the containing DynamicForm sets itemLayout:"absolute".

Returns:
Returns the left coordinate of this form item in pixels. Note that this method is only reliable after the item has been drawn.

setLoadingDisplayValue

public void setLoadingDisplayValue(String loadingDisplayValue)
Value shown in field when fetchMissingValues is active and a fetch is pending. The field is also read-only while fetch is pending.

Set to null to show actual value until display value is loaded.

Parameters:
loadingDisplayValue - Default value is "Loading..."

getLoadingDisplayValue

public String getLoadingDisplayValue()
Value shown in field when fetchMissingValues is active and a fetch is pending. The field is also read-only while fetch is pending.

Set to null to show actual value until display value is loaded.

Returns:
String

setLocateItemBy

public void setLocateItemBy(String locateItemBy)
When AutoTest.getElement is used to parse locator strings generated by link{isc.AutoTest.getLocator()} for this form item, should the item be identified? By default if the item has a name this will always be used, however for items with no name, the following options are available: If unset, and the item has no specified name, default behavior is to identify by title (if available), otherwise by index.

Note : This is an advanced setting

Parameters:
locateItemBy - Default value is null

getLocateItemBy

public String getLocateItemBy()
When AutoTest.getElement is used to parse locator strings generated by link{isc.AutoTest.getLocator()} for this form item, should the item be identified? By default if the item has a name this will always be used, however for items with no name, the following options are available: If unset, and the item has no specified name, default behavior is to identify by title (if available), otherwise by index.

Returns:
String

setMultipleValueSeparator

public void setMultipleValueSeparator(String multipleValueSeparator)
If this item is displaying multiple values, this property will be the string that separates those values for display purposes.

Parameters:
multipleValueSeparator - Default value is ', '

getMultipleValueSeparator

public String getMultipleValueSeparator()
If this item is displaying multiple values, this property will be the string that separates those values for display purposes.

Returns:
String

setOperator

public void setOperator(OperatorId operator)
OperatorId to be used when DynamicForm.getValuesAsCriteria is called.

item.operator can be used to create a form that offers search functions such as numeric range filtering, without the more advanced user interface of the FilterBuilder. For example, two SpinnerItems could be created with formItem.operator set to "greaterThan" and "lessThan" respectively to enable filtering by a numeric range.

When item.operator is set for any FormItem in a form, form.getValuesAsCriteria() will return an AdvancedCriteria object instead of a normal Criteria object. Each FormItem will produce one Criterion affecting the DataSource field specified by criteriaField. The criteria produced by the FormItems will be grouped under the logical operator provided by operator.

If operator is set for some fields but not others, the default operator is "equals" for fields with a valueMap or an optionDataSource, and for fields of type "enum" (or of a type that inherits from "enum"). The default operator for all other fields is controlled by defaultSearchOperator.

Note: formItem.operator is only supported for a form that has a dataSource. In a form with no DataSource, setting formItem.operator will have no effect.

Parameters:
operator - Default value is null
See Also:
CriteriaEditing overview and related methods

getOperator

public OperatorId getOperator()
OperatorId to be used when DynamicForm.getValuesAsCriteria is called.

item.operator can be used to create a form that offers search functions such as numeric range filtering, without the more advanced user interface of the FilterBuilder. For example, two SpinnerItems could be created with formItem.operator set to "greaterThan" and "lessThan" respectively to enable filtering by a numeric range.

When item.operator is set for any FormItem in a form, form.getValuesAsCriteria() will return an AdvancedCriteria object instead of a normal Criteria object. Each FormItem will produce one Criterion affecting the DataSource field specified by criteriaField. The criteria produced by the FormItems will be grouped under the logical operator provided by operator.

If operator is set for some fields but not others, the default operator is "equals" for fields with a valueMap or an optionDataSource, and for fields of type "enum" (or of a type that inherits from "enum"). The default operator for all other fields is controlled by defaultSearchOperator.

Note: formItem.operator is only supported for a form that has a dataSource. In a form with no DataSource, setting formItem.operator will have no effect.

Returns:
OperatorId
See Also:
CriteriaEditing overview and related methods

setOptionOperationId

public void setOptionOperationId(String optionOperationId)
If this item has a specified optionDataSource, this attribute may be set to specify an explicit operationId when performing a fetch against the option dataSource to pick up display value mapping.

Note : This is an advanced setting

Parameters:
optionOperationId - Default value is null

getOptionOperationId

public String getOptionOperationId()
If this item has a specified optionDataSource, this attribute may be set to specify an explicit operationId when performing a fetch against the option dataSource to pick up display value mapping.

Returns:
String

getPicker

public Canvas getPicker()
The component that will be displayed when FormItem.showPicker is called due to a click on the picker icon.

Can be specified directly as a Canvas, or created automatically via the com.smartgwt.client.types.AutoChild pattern.

Note that the picker is not automatically destroyed with the FormItem that uses it, in order to allow recycling of picker components. To destroy a single-use picker, override Canvas.destroy.

For an overview of how to use and configure AutoChildren, see Using AutoChildren.

Returns:
Canvas

setPickerIconHeight

public void setPickerIconHeight(Integer pickerIconHeight)
If showPickerIcon is true for this item, this property governs the size of the picker icon. If unset, the picker icon will be sized as a square to fit in the available height for the icon.

It is not recommended to change the pickerIconHeight from the default value if spriting is enabled because the image sprites are set up assuming specific, fixed dimensions of the picker icon. If the pickerIconHeight must be changed, then the pickerIconStyle should be changed to a custom CSS style name.

Note : This is an advanced setting

Parameters:
pickerIconHeight - Default value is null

getPickerIconHeight

public Integer getPickerIconHeight()
If showPickerIcon is true for this item, this property governs the size of the picker icon. If unset, the picker icon will be sized as a square to fit in the available height for the icon.

It is not recommended to change the pickerIconHeight from the default value if spriting is enabled because the image sprites are set up assuming specific, fixed dimensions of the picker icon. If the pickerIconHeight must be changed, then the pickerIconStyle should be changed to a custom CSS style name.

Returns:
Integer

setPickerIconName

public void setPickerIconName(String pickerIconName)
If showPickerIcon is true, this attribute specifies the name applied to the picker icon

Note : This is an advanced setting

Parameters:
pickerIconName - Default value is "picker"

getPickerIconName

public String getPickerIconName()
If showPickerIcon is true, this attribute specifies the name applied to the picker icon

Returns:
String

setPickerIconPrompt

public void setPickerIconPrompt(String pickerIconPrompt)
Prompt to show when the user hovers the mouse over the picker icon.

Parameters:
pickerIconPrompt - See HTMLString . Default value is null

getPickerIconPrompt

public String getPickerIconPrompt()
Prompt to show when the user hovers the mouse over the picker icon.

Returns:
See HTMLString

setPickerIconProperties

public void setPickerIconProperties(FormItemIcon pickerIconProperties)
If showPickerIcon is true for this item, this block of properties will be applied to the pickerIcon. Allows for advanced customization of this icon.

Note : This is an advanced setting

Parameters:
pickerIconProperties - Default value is null

getPickerIconProperties

public FormItemIcon getPickerIconProperties()
If showPickerIcon is true for this item, this block of properties will be applied to the pickerIcon. Allows for advanced customization of this icon.

Returns:
FormItemIcon

setPickerIconSrc

public void setPickerIconSrc(String pickerIconSrc)
If showPickerIcon is true for this item, this property governs the src of the picker icon image to be displayed.

Note : This is an advanced setting

Parameters:
pickerIconSrc - See SCImgURL . Default value is ""

getPickerIconSrc

public String getPickerIconSrc()
If showPickerIcon is true for this item, this property governs the src of the picker icon image to be displayed.

Returns:
See SCImgURL

setPickerIconStyle

public void setPickerIconStyle(String pickerIconStyle)
Base CSS class name for a form item's picker icon cell. If unset, inherits from this item's controlStyle.

Parameters:
pickerIconStyle - See FormItemBaseStyle . Default value is null
See Also:
setCellStyle(java.lang.String), Appearance overview and related methods

getPickerIconStyle

public String getPickerIconStyle()
Base CSS class name for a form item's picker icon cell. If unset, inherits from this item's controlStyle.

Returns:
See FormItemBaseStyle
See Also:
getCellStyle(), Appearance overview and related methods

setPickerIconWidth

public void setPickerIconWidth(Integer pickerIconWidth)
If showPickerIcon is true for this item, this property governs the size of the picker icon. If unset, the picker icon will be sized as a square to fit in the available height for the icon.

It is not recommended to change the pickerIconWidth from the default value if spriting is enabled because the image sprites are set up assuming specific, fixed dimensions of the picker icon. If the pickerIconWidth must be changed, then the pickerIconStyle should be changed to a custom CSS style name.

Note : This is an advanced setting

Parameters:
pickerIconWidth - Default value is null

getPickerIconWidth

public Integer getPickerIconWidth()
If showPickerIcon is true for this item, this property governs the size of the picker icon. If unset, the picker icon will be sized as a square to fit in the available height for the icon.

It is not recommended to change the pickerIconWidth from the default value if spriting is enabled because the image sprites are set up assuming specific, fixed dimensions of the picker icon. If the pickerIconWidth must be changed, then the pickerIconStyle should be changed to a custom CSS style name.

Returns:
Integer

setPrintTextBoxStyle

public void setPrintTextBoxStyle(String printTextBoxStyle)
Base CSS class name for a form item's text box element when getting printable HTML for the form. If unset textBoxStyle will be used instead. Note that focused styling will never be displayed while printing, though error and disabled styling will.

Parameters:
printTextBoxStyle - See FormItemBaseStyle . Default value is null
See Also:
Printing overview and related methods

getPrintTextBoxStyle

public String getPrintTextBoxStyle()
Base CSS class name for a form item's text box element when getting printable HTML for the form. If unset textBoxStyle will be used instead. Note that focused styling will never be displayed while printing, though error and disabled styling will.

Returns:
See FormItemBaseStyle
See Also:
Printing overview and related methods

setPrintTitleStyle

public void setPrintTitleStyle(String printTitleStyle)
Base CSS stylename for a form item's title when generating print HTML for the item. If unset titleStyle will be used instead.

Parameters:
printTitleStyle - See FormItemBaseStyle . Default value is null
See Also:
Printing overview and related methods

getPrintTitleStyle

public String getPrintTitleStyle()
Base CSS stylename for a form item's title when generating print HTML for the item. If unset titleStyle will be used instead.

Returns:
See FormItemBaseStyle
See Also:
Printing overview and related methods

setPrompt

public void setPrompt(String prompt)
This text is shown as a tooltip prompt when the cursor hovers over this item.

If this method is called after the component has been drawn/initialized: Set the prompt for this item

Parameters:
prompt - new prompt for the item.. Default value is null
See Also:
Basics overview and related methods

getPrompt

public String getPrompt()
This text is shown as a tooltip prompt when the cursor hovers over this item.

Returns:
String
See Also:
Basics overview and related methods

setReadOnlyClipValue

public void setReadOnlyClipValue(Boolean readOnlyClipValue)
If this item is canEdit:false, and has readOnlyDisplay set to "static", should the item value be clipped if it overflows the specified size of the item?

Parameters:
readOnlyClipValue - Default value is false

getReadOnlyClipValue

public Boolean getReadOnlyClipValue()
If this item is canEdit:false, and has readOnlyDisplay set to "static", should the item value be clipped if it overflows the specified size of the item?

Returns:
Boolean

setReadOnlyDisplay

public void setReadOnlyDisplay(ReadOnlyDisplayAppearance readOnlyDisplay)
If canEdit is set to false, how should this item be displayed to the user?

If this method is called after the component has been drawn/initialized: Setter for the readOnlyDisplay attribute.

Parameters:
readOnlyDisplay - New read-only display appearance.. Default value is "readOnly"

getReadOnlyDisplay

public ReadOnlyDisplayAppearance getReadOnlyDisplay()
If canEdit is set to false, how should this item be displayed to the user?

Returns:
ReadOnlyDisplayAppearance

setReadOnlyTextBoxStyle

public void setReadOnlyTextBoxStyle(String readOnlyTextBoxStyle)
TextBoxStyle to apply to canEdit:false items with readOnlyDisplay set to "static".

Parameters:
readOnlyTextBoxStyle - See FormItemBaseStyle . Default value is "staticTextItem"

getReadOnlyTextBoxStyle

public String getReadOnlyTextBoxStyle()
TextBoxStyle to apply to canEdit:false items with readOnlyDisplay set to "static".

Returns:
See FormItemBaseStyle

setRedrawOnChange

public void setRedrawOnChange(Boolean redrawOnChange)
If true, this item will cause the entire form to be redrawn when the item's "elementChanged" event is done firing

Parameters:
redrawOnChange - Default value is false

getRedrawOnChange

public Boolean getRedrawOnChange()
If true, this item will cause the entire form to be redrawn when the item's "elementChanged" event is done firing

Returns:
Boolean

setRejectInvalidValueOnChange

public void setRejectInvalidValueOnChange(Boolean rejectInvalidValueOnChange)
If validateOnChange is true, and validation fails for this item on change, with no suggested value, should we revert to the previous value, or continue to display the bad value entered by the user. May be set at the item or form level.

Note : This is an advanced setting

Parameters:
rejectInvalidValueOnChange - Default value is false

getRejectInvalidValueOnChange

public Boolean getRejectInvalidValueOnChange()
If validateOnChange is true, and validation fails for this item on change, with no suggested value, should we revert to the previous value, or continue to display the bad value entered by the user. May be set at the item or form level.

Returns:
Boolean

setRequired

public void setRequired(Boolean required)
Whether a non-empty value is required for this field to pass validation.

If the user does not fill in the required field, the error message to be shown will be taken from these properties in the following order: requiredMessage, requiredMessage, requiredMessage, requiredField.

Note: if specified on a FormItem, required is only enforced on the client. required should generally be specified on a DataSourceField.

If this method is called after the component has been drawn/initialized: Setter to mark this formItem as required, or not required at runtime. Note that an alternative approach to updating the required flag directly would be to simply use a requiredIf type validator.

Note that this method will not re-validate this item by default or clear any existing validation errors. If desired, this may be achieved by calling FormItem.validate or DynamicForm.clearErrors.

Parameters:
required - new required value.. Default value is null
See Also:
Validation overview and related methods, Show & Hide Example

getRequired

public Boolean getRequired()
Whether a non-empty value is required for this field to pass validation.

If the user does not fill in the required field, the error message to be shown will be taken from these properties in the following order: requiredMessage, requiredMessage, requiredMessage, requiredField.

Note: if specified on a FormItem, required is only enforced on the client. required should generally be specified on a DataSourceField.

Returns:
Boolean
See Also:
Validation overview and related methods, Show & Hide Example

setRequiredMessage

public void setRequiredMessage(String requiredMessage)
The required message for required field errors.

Parameters:
requiredMessage - Default value is null
See Also:
Validation overview and related methods

getRequiredMessage

public String getRequiredMessage()
The required message for required field errors.

Returns:
String
See Also:
Validation overview and related methods

setRowSpan

public void setRowSpan(int rowSpan)
Number of rows that this item spans

Parameters:
rowSpan - Default value is 1
See Also:
FormLayout overview and related methods

getRowSpan

public int getRowSpan()
Number of rows that this item spans

Returns:
int
See Also:
FormLayout overview and related methods

setSaveOnEnter

public void setSaveOnEnter(Boolean saveOnEnter)
Set this to true to allow the parent form to save it's data when 'Enter' is pressed on this formItem and saveOnEnter is true on the parent form.

Parameters:
saveOnEnter - Default value is null

getSaveOnEnter

public Boolean getSaveOnEnter()
Set this to true to allow the parent form to save it's data when 'Enter' is pressed on this formItem and saveOnEnter is true on the parent form.

Returns:
Boolean

setSelectOnClick

public void setSelectOnClick(Boolean selectOnClick)
Allows the selectOnClick behavior to be configured on a per-FormItem basis. Normally all items in a form default to the value of selectOnClick.

Parameters:
selectOnClick - Default value is null
See Also:
Focus overview and related methods

getSelectOnClick

public Boolean getSelectOnClick()
Allows the selectOnClick behavior to be configured on a per-FormItem basis. Normally all items in a form default to the value of selectOnClick.

Returns:
Boolean
See Also:
Focus overview and related methods

setSelectOnFocus

public void setSelectOnFocus(Boolean selectOnFocus)
Allows the selectOnFocus behavior to be configured on a per-FormItem basis. Normally all items in a form default to the value of selectOnFocus.

Parameters:
selectOnFocus - Default value is null
See Also:
Focus overview and related methods

getSelectOnFocus

public Boolean getSelectOnFocus()
Allows the selectOnFocus behavior to be configured on a per-FormItem basis. Normally all items in a form default to the value of selectOnFocus.

Returns:
Boolean
See Also:
Focus overview and related methods

setShouldSaveValue

public void setShouldSaveValue(Boolean shouldSaveValue)
Should this item's value be saved in the form's values and hence returned from form.getValues()?

shouldSaveValue:false is used to mark formItems which do not correspond to the underlying data model and should not save a value into the form's values. Example includes visual separators, password re-type fields, or checkboxes used to show/hide other form items.

A shouldSaveValue:false item should be given a value either via defaultValue or by calling form.setValue(item, value) or formItem.setValue(value). Providing a value via form.values or form.setValues() will automatically switch the item to shouldSaveValue:true.

Note that

Parameters:
shouldSaveValue - Default value is true

getShouldSaveValue

public Boolean getShouldSaveValue()
Should this item's value be saved in the form's values and hence returned from form.getValues()?

shouldSaveValue:false is used to mark formItems which do not correspond to the underlying data model and should not save a value into the form's values. Example includes visual separators, password re-type fields, or checkboxes used to show/hide other form items.

A shouldSaveValue:false item should be given a value either via defaultValue or by calling form.setValue(item, value) or formItem.setValue(value). Providing a value via form.values or form.setValues() will automatically switch the item to shouldSaveValue:true.

Note that

Returns:
Boolean

setShowClippedTitleOnHover

public void setShowClippedTitleOnHover(boolean showClippedTitleOnHover)
If true and the title is clipped, then a hover containing the full title of this item is enabled.

A TitleHoverEvent is fired before the hover is displayed, allowing the hover to be canceled if desired. The HTML shown in the hover can be customized by setting a FormItemHoverFormatter on either this FormItem or the DynamicForm. See setItemTitleHoverFormatter().

Parameters:
showClippedTitleOnHover - Default value is true

getShowClippedTitleOnHover

public boolean getShowClippedTitleOnHover()
If true and the title is clipped, then a hover containing the full title of this item is enabled.

A TitleHoverEvent is fired before the hover is displayed, allowing the hover to be canceled if desired. The HTML shown in the hover can be customized by setting a FormItemHoverFormatter on either this FormItem or the DynamicForm. See setItemTitleHoverFormatter().

Returns:
boolean

setShowClippedValueOnHover

public void setShowClippedValueOnHover(Boolean showClippedValueOnHover)
If true and the value is clipped, then a hover containing the full value of this item is enabled.

A ValueHoverEvent is fired before the hover is displayed, allowing the hover to be canceled if desired. The HTML shown in the hover can be customized by setting a FormItemHoverFormatter on either this FormItem or the DynamicForm. See setItemValueHoverFormatter().

Parameters:
showClippedValueOnHover - Default value is true

getShowClippedValueOnHover

public Boolean getShowClippedValueOnHover()
If true and the value is clipped, then a hover containing the full value of this item is enabled.

A ValueHoverEvent is fired before the hover is displayed, allowing the hover to be canceled if desired. The HTML shown in the hover can be customized by setting a FormItemHoverFormatter on either this FormItem or the DynamicForm. See setItemValueHoverFormatter().

Returns:
Boolean

setShowDisabled

public void setShowDisabled(Boolean showDisabled)
When this item is disabled, should it be re-styled to indicate its disabled state?

If this method is called after the component has been drawn/initialized: Setter method for showDisabled

Note : This is an advanced setting

Parameters:
showDisabled - new showDisabled setting. Default value is true
See Also:
setCellStyle(java.lang.String), Appearance overview and related methods

getShowDisabled

public Boolean getShowDisabled()
When this item is disabled, should it be re-styled to indicate its disabled state?

Returns:
Boolean
See Also:
getCellStyle(), Appearance overview and related methods

setShowErrorIcon

public void setShowErrorIcon(Boolean showErrorIcon)
showErrorIcons, showErrorText, and showErrorStyle control how validation errors are displayed when they are displayed inline in the form (next to the form item where there is a validation error). To instead display all errors at the top of the form, set showInlineErrors:false.

showErrorIcons, showErrorText and showErrorStyle are all boolean properties, and can be set on a DynamicForm to control the behavior form-wide, or set on individual FormItems.

The HTML displayed next to a form item with errors is generated by FormItem.getErrorHTML. The default implementation of that method respects showErrorIcons and showErrorText as follows:

showErrorIcons, or showErrorIcon at the FormItem level controls whether an error icon should appear next to fields which have validation errors. The icon's appearance is governed by errorIconSrc, errorIconWidth and errorIconHeight

showErrorText determines whether the text of the validation error should be displayed next to fields which have validation errors. The attribute showTitlesWithErrorMessages may be set to prefix error messages with the form item's title + ":" (may be desired if the item has showTitle set to false).

errorOrientation controls where the error HTML should appear relative to form items. Therefore the combination of showErrorText:false and errorOrientation:"left" creates a compact validation error display consisting of just an icon, to the left of the item with the error message available via a hover (similar appearance to ListGrid validation error display).

In addition to this, showErrorStyle determines whether fields with validation errors should have special styling applied to them. See FormItemBaseStyle for a discussion for how error styling is calculated.

Parameters:
showErrorIcon - Default value is null
See Also:
Appearance overview and related methods

getShowErrorIcon

public Boolean getShowErrorIcon()
showErrorIcons, showErrorText, and showErrorStyle control how validation errors are displayed when they are displayed inline in the form (next to the form item where there is a validation error). To instead display all errors at the top of the form, set showInlineErrors:false.

showErrorIcons, showErrorText and showErrorStyle are all boolean properties, and can be set on a DynamicForm to control the behavior form-wide, or set on individual FormItems.

The HTML displayed next to a form item with errors is generated by FormItem.getErrorHTML. The default implementation of that method respects showErrorIcons and showErrorText as follows:

showErrorIcons, or showErrorIcon at the FormItem level controls whether an error icon should appear next to fields which have validation errors. The icon's appearance is governed by errorIconSrc, errorIconWidth and errorIconHeight

showErrorText determines whether the text of the validation error should be displayed next to fields which have validation errors. The attribute showTitlesWithErrorMessages may be set to prefix error messages with the form item's title + ":" (may be desired if the item has showTitle set to false).

errorOrientation controls where the error HTML should appear relative to form items. Therefore the combination of showErrorText:false and errorOrientation:"left" creates a compact validation error display consisting of just an icon, to the left of the item with the error message available via a hover (similar appearance to ListGrid validation error display).

In addition to this, showErrorStyle determines whether fields with validation errors should have special styling applied to them. See FormItemBaseStyle for a discussion for how error styling is calculated.

Returns:
Boolean
See Also:
Appearance overview and related methods

setShowErrorStyle

public void setShowErrorStyle(Boolean showErrorStyle)
showErrorIcons, showErrorText, and showErrorStyle control how validation errors are displayed when they are displayed inline in the form (next to the form item where there is a validation error). To instead display all errors at the top of the form, set showInlineErrors:false.

showErrorIcons, showErrorText and showErrorStyle are all boolean properties, and can be set on a DynamicForm to control the behavior form-wide, or set on individual FormItems.

The HTML displayed next to a form item with errors is generated by FormItem.getErrorHTML. The default implementation of that method respects showErrorIcons and showErrorText as follows:

showErrorIcons, or showErrorIcon at the FormItem level controls whether an error icon should appear next to fields which have validation errors. The icon's appearance is governed by errorIconSrc, errorIconWidth and errorIconHeight

showErrorText determines whether the text of the validation error should be displayed next to fields which have validation errors. The attribute showTitlesWithErrorMessages may be set to prefix error messages with the form item's title + ":" (may be desired if the item has showTitle set to false).

errorOrientation controls where the error HTML should appear relative to form items. Therefore the combination of showErrorText:false and errorOrientation:"left" creates a compact validation error display consisting of just an icon, to the left of the item with the error message available via a hover (similar appearance to ListGrid validation error display).

In addition to this, showErrorStyle determines whether fields with validation errors should have special styling applied to them. See FormItemBaseStyle for a discussion for how error styling is calculated.

Parameters:
showErrorStyle - Default value is null
See Also:
setCellStyle(java.lang.String), Appearance overview and related methods

getShowErrorStyle

public Boolean getShowErrorStyle()
showErrorIcons, showErrorText, and showErrorStyle control how validation errors are displayed when they are displayed inline in the form (next to the form item where there is a validation error). To instead display all errors at the top of the form, set showInlineErrors:false.

showErrorIcons, showErrorText and showErrorStyle are all boolean properties, and can be set on a DynamicForm to control the behavior form-wide, or set on individual FormItems.

The HTML displayed next to a form item with errors is generated by FormItem.getErrorHTML. The default implementation of that method respects showErrorIcons and showErrorText as follows:

showErrorIcons, or showErrorIcon at the FormItem level controls whether an error icon should appear next to fields which have validation errors. The icon's appearance is governed by errorIconSrc, errorIconWidth and errorIconHeight

showErrorText determines whether the text of the validation error should be displayed next to fields which have validation errors. The attribute showTitlesWithErrorMessages may be set to prefix error messages with the form item's title + ":" (may be desired if the item has showTitle set to false).

errorOrientation controls where the error HTML should appear relative to form items. Therefore the combination of showErrorText:false and errorOrientation:"left" creates a compact validation error display consisting of just an icon, to the left of the item with the error message available via a hover (similar appearance to ListGrid validation error display).

In addition to this, showErrorStyle determines whether fields with validation errors should have special styling applied to them. See FormItemBaseStyle for a discussion for how error styling is calculated.

Returns:
Boolean
See Also:
getCellStyle(), Appearance overview and related methods

setShowErrorText

public void setShowErrorText(Boolean showErrorText)
showErrorIcons, showErrorText, and showErrorStyle control how validation errors are displayed when they are displayed inline in the form (next to the form item where there is a validation error). To instead display all errors at the top of the form, set showInlineErrors:false.

showErrorIcons, showErrorText and showErrorStyle are all boolean properties, and can be set on a DynamicForm to control the behavior form-wide, or set on individual FormItems.

The HTML displayed next to a form item with errors is generated by FormItem.getErrorHTML. The default implementation of that method respects showErrorIcons and showErrorText as follows:

showErrorIcons, or showErrorIcon at the FormItem level controls whether an error icon should appear next to fields which have validation errors. The icon's appearance is governed by errorIconSrc, errorIconWidth and errorIconHeight

showErrorText determines whether the text of the validation error should be displayed next to fields which have validation errors. The attribute showTitlesWithErrorMessages may be set to prefix error messages with the form item's title + ":" (may be desired if the item has showTitle set to false).

errorOrientation controls where the error HTML should appear relative to form items. Therefore the combination of showErrorText:false and errorOrientation:"left" creates a compact validation error display consisting of just an icon, to the left of the item with the error message available via a hover (similar appearance to ListGrid validation error display).

In addition to this, showErrorStyle determines whether fields with validation errors should have special styling applied to them. See FormItemBaseStyle for a discussion for how error styling is calculated.

Parameters:
showErrorText - Default value is null
See Also:
Appearance overview and related methods

getShowErrorText

public Boolean getShowErrorText()
showErrorIcons, showErrorText, and showErrorStyle control how validation errors are displayed when they are displayed inline in the form (next to the form item where there is a validation error). To instead display all errors at the top of the form, set showInlineErrors:false.

showErrorIcons, showErrorText and showErrorStyle are all boolean properties, and can be set on a DynamicForm to control the behavior form-wide, or set on individual FormItems.

The HTML displayed next to a form item with errors is generated by FormItem.getErrorHTML. The default implementation of that method respects showErrorIcons and showErrorText as follows:

showErrorIcons, or showErrorIcon at the FormItem level controls whether an error icon should appear next to fields which have validation errors. The icon's appearance is governed by errorIconSrc, errorIconWidth and errorIconHeight

showErrorText determines whether the text of the validation error should be displayed next to fields which have validation errors. The attribute showTitlesWithErrorMessages may be set to prefix error messages with the form item's title + ":" (may be desired if the item has showTitle set to false).

errorOrientation controls where the error HTML should appear relative to form items. Therefore the combination of showErrorText:false and errorOrientation:"left" creates a compact validation error display consisting of just an icon, to the left of the item with the error message available via a hover (similar appearance to ListGrid validation error display).

In addition to this, showErrorStyle determines whether fields with validation errors should have special styling applied to them. See FormItemBaseStyle for a discussion for how error styling is calculated.

Returns:
Boolean
See Also:
Appearance overview and related methods

setShowFocused

public void setShowFocused(Boolean showFocused)
When this item receives focus, should it be re-styled to indicate it has focus?

Note : This is an advanced setting

Parameters:
showFocused - Default value is false
See Also:
setCellStyle(java.lang.String), Appearance overview and related methods

getShowFocused

public Boolean getShowFocused()
When this item receives focus, should it be re-styled to indicate it has focus?

Returns:
Boolean
See Also:
getCellStyle(), Appearance overview and related methods

setShowFocusedErrorState

public void setShowFocusedErrorState(Boolean showFocusedErrorState)
If set to true, when an item has errors and is focused, an "ErrorFocused" suffix will appear on the stylename.

Note : This is an advanced setting

Parameters:
showFocusedErrorState - Default value is false
See Also:
setCellStyle(java.lang.String), Appearance overview and related methods

getShowFocusedErrorState

public Boolean getShowFocusedErrorState()
If set to true, when an item has errors and is focused, an "ErrorFocused" suffix will appear on the stylename.

Returns:
Boolean
See Also:
getCellStyle(), Appearance overview and related methods

setShowFocusedIcons

public void setShowFocusedIcons(Boolean showFocusedIcons)
If we're showing icons, should we change their image source to the appropriate focused source when this item has focus? Can be overridden on a per icon basis by the formItemIcon showFocused property.

Note : This is an advanced setting

Parameters:
showFocusedIcons - Default value is null

getShowFocusedIcons

public Boolean getShowFocusedIcons()
If we're showing icons, should we change their image source to the appropriate focused source when this item has focus? Can be overridden on a per icon basis by the formItemIcon showFocused property.

Returns:
Boolean

setShowFocusedPickerIcon

public void setShowFocusedPickerIcon(Boolean showFocusedPickerIcon)
If showPickerIcon is true for this item, should the picker icon show a focused image when the form item has focus?

Parameters:
showFocusedPickerIcon - Default value is false

getShowFocusedPickerIcon

public Boolean getShowFocusedPickerIcon()
If showPickerIcon is true for this item, should the picker icon show a focused image when the form item has focus?

Returns:
Boolean

setShowHint

public void setShowHint(Boolean showHint)
If a hint is defined for this form item, should it be shown?

Note : This is an advanced setting

Parameters:
showHint - Default value is true
See Also:
Appearance overview and related methods

getShowHint

public Boolean getShowHint()
If a hint is defined for this form item, should it be shown?

Returns:
Boolean
See Also:
Appearance overview and related methods

setShowIcons

public void setShowIcons(Boolean showIcons)
Set to false to suppress writing out any icons for this item.

Note : This is an advanced setting

Parameters:
showIcons - Default value is true

getShowIcons

public Boolean getShowIcons()
Set to false to suppress writing out any icons for this item.

Returns:
Boolean

setShowOverIcons

public void setShowOverIcons(Boolean showOverIcons)
If we're showing icons, should we change their image source to the appropriate over source when the user rolls over (or puts focus onto) them? Can be overridden on a per icon basis by the formItemIcon showOver property.

Note : This is an advanced setting

Parameters:
showOverIcons - Default value is null

getShowOverIcons

public Boolean getShowOverIcons()
If we're showing icons, should we change their image source to the appropriate over source when the user rolls over (or puts focus onto) them? Can be overridden on a per icon basis by the formItemIcon showOver property.

Returns:
Boolean

setShowPickerIcon

public void setShowPickerIcon(Boolean showPickerIcon)
Should we show a special 'picker' icon for this form item? Picker icons are customizable via pickerIconProperties. By default they will be rendered inside the form item's "control box" area, and will call FormItem.showPicker when clicked.

Parameters:
showPickerIcon - Default value is null

getShowPickerIcon

public Boolean getShowPickerIcon()
Should we show a special 'picker' icon for this form item? Picker icons are customizable via pickerIconProperties. By default they will be rendered inside the form item's "control box" area, and will call FormItem.showPicker when clicked.

Returns:
Boolean

setShowRTL

public void setShowRTL(boolean showRTL)
When this item is in RTL mode, should its style name include an "RTL" suffix?

Note : This is an advanced setting

Parameters:
showRTL - Default value is false
See Also:
setCellStyle(java.lang.String), Appearance overview and related methods

getShowRTL

public boolean getShowRTL()
When this item is in RTL mode, should its style name include an "RTL" suffix?

Returns:
boolean
See Also:
getCellStyle(), Appearance overview and related methods

setShowTitle

public void setShowTitle(Boolean showTitle)
Should we show a title cell for this formItem?

Note: the default value of this attribute is overridden by some subclasses.

Parameters:
showTitle - Default value is true

getShowTitle

public Boolean getShowTitle()
Should we show a title cell for this formItem?

Note: the default value of this attribute is overridden by some subclasses.

Returns:
Boolean

setShowValueIconOnly

public void setShowValueIconOnly(Boolean showValueIconOnly)
If valueIcons is set, this property may be set to show the valueIcon only and prevent the standard form item element or text from displaying

Note : This is an advanced setting

Parameters:
showValueIconOnly - Default value is null

getShowValueIconOnly

public Boolean getShowValueIconOnly()
If valueIcons is set, this property may be set to show the valueIcon only and prevent the standard form item element or text from displaying

Returns:
Boolean

setStartRow

public void setStartRow(Boolean startRow)
Whether this item should always start a new row in the form layout.

Parameters:
startRow - Default value is false
See Also:
FormLayout overview and related methods

getStartRow

public Boolean getStartRow()
Whether this item should always start a new row in the form layout.

Returns:
Boolean
See Also:
FormLayout overview and related methods

setStopOnError

public void setStopOnError(Boolean stopOnError)
Indicates that if validation fails, the user should not be allowed to exit the field - focus will be forced back into the field until the error is corrected.

This property defaults to stopOnError if unset.

Enabling this property also implies validateOnExit is automatically enabled. If there are server-based validators on this item, setting this property also implies that synchronousValidation is forced on.

Parameters:
stopOnError - Default value is null

getStopOnError

public Boolean getStopOnError()
Indicates that if validation fails, the user should not be allowed to exit the field - focus will be forced back into the field until the error is corrected.

This property defaults to stopOnError if unset.

Enabling this property also implies validateOnExit is automatically enabled. If there are server-based validators on this item, setting this property also implies that synchronousValidation is forced on.

Returns:
Boolean

setSuppressValueIcon

public void setSuppressValueIcon(Boolean suppressValueIcon)
If valueIcons is set, this property may be set to prevent the value icons from showing up next to the form items value

Note : This is an advanced setting

Parameters:
suppressValueIcon - Default value is null

getSuppressValueIcon

public Boolean getSuppressValueIcon()
If valueIcons is set, this property may be set to prevent the value icons from showing up next to the form items value

Returns:
Boolean

setSynchronousValidation

public void setSynchronousValidation(Boolean synchronousValidation)
If enabled, whenever validation is triggered and a request to the server is required, user interactivity will be blocked until the request returns. Can be set for the entire form or individual FormItems.

If false, the form will try to avoid blocking user interaction until it is strictly required. That is until the user attempts to use a FormItem whose state could be affected by a server request that has not yet returned.

Parameters:
synchronousValidation - Default value is null

getSynchronousValidation

public Boolean getSynchronousValidation()
If enabled, whenever validation is triggered and a request to the server is required, user interactivity will be blocked until the request returns. Can be set for the entire form or individual FormItems.

If false, the form will try to avoid blocking user interaction until it is strictly required. That is until the user attempts to use a FormItem whose state could be affected by a server request that has not yet returned.

Returns:
Boolean

setTabIndex

public void setTabIndex(Integer tabIndex)
TabIndex for the form item within the form, which controls the order in which controls are visited when the user hits the tab or shift-tab keys to navigate between items.

tabIndex is automatically assigned as the order that items appear in the items list.

To specify the tabindex of an item within the page as a whole (not just this form), use globalTabIndex instead.

Parameters:
tabIndex - Default value is null
See Also:
Focus overview and related methods

getTabIndex

public Integer getTabIndex()
TabIndex for the form item within the form, which controls the order in which controls are visited when the user hits the tab or shift-tab keys to navigate between items.

tabIndex is automatically assigned as the order that items appear in the items list.

To specify the tabindex of an item within the page as a whole (not just this form), use globalTabIndex instead.

Returns:
Integer
See Also:
Focus overview and related methods

setTextAlign

public void setTextAlign(Alignment textAlign)
Alignment of the text / content within this form item. Note that align may be used to control alignment of the entire form item within its cell. May not apply to all form item types.

Parameters:
textAlign - Default value is Canvas.LEFT
See Also:
Appearance overview and related methods

getTextAlign

public Alignment getTextAlign()
Alignment of the text / content within this form item. Note that align may be used to control alignment of the entire form item within its cell. May not apply to all form item types.

Returns:
Alignment
See Also:
Appearance overview and related methods

setTextBoxStyle

public void setTextBoxStyle(String textBoxStyle)
Base CSS class name for a form item's text box element.

NOTE: See the CompoundFormItem_skinning discussion for special skinning considerations.

Parameters:
textBoxStyle - See FormItemBaseStyle . Default value is null
See Also:
setCellStyle(java.lang.String), Appearance overview and related methods

getTextBoxStyle

public String getTextBoxStyle()
Base CSS class name for a form item's text box element.

NOTE: See the CompoundFormItem_skinning discussion for special skinning considerations.

Returns:
See FormItemBaseStyle
See Also:
getCellStyle(), Appearance overview and related methods

setTimeFormatter

public void setTimeFormatter(TimeDisplayFormat timeFormatter)
Time-format to apply to date type values within this formItem. If specified, any dates displayed in this item will be formatted as times using the appropriate format. This is most commonly only applied to fields specified as type "time" though if no explicit dateFormatter is specified it will be respected for other fields as well.

If unspecified, a timeFormatter may be defined at the component level and will be respected by fields of type "time".

Note : This is an advanced setting

Parameters:
timeFormatter - Default value is null
See Also:
setFormat(java.lang.String), Appearance overview and related methods

getTimeFormatter

public TimeDisplayFormat getTimeFormatter()
Time-format to apply to date type values within this formItem. If specified, any dates displayed in this item will be formatted as times using the appropriate format. This is most commonly only applied to fields specified as type "time" though if no explicit dateFormatter is specified it will be respected for other fields as well.

If unspecified, a timeFormatter may be defined at the component level and will be respected by fields of type "time".

Returns:
TimeDisplayFormat
See Also:
getFormat(), Appearance overview and related methods

setTitle

public void setTitle(String title)
User visible title for this form item.

Parameters:
title - Default value is null
See Also:
Basics overview and related methods

getTitle

public String getTitle()
User visible title for this form item.

Returns:
Return the title of this formItem
See Also:
Basics overview and related methods

setTitleAlign

public void setTitleAlign(Alignment titleAlign)
Alignment of this item's title in its cell.

If null, dynamically set according to text direction.

Parameters:
titleAlign - Default value is null

getTitleAlign

public Alignment getTitleAlign()
Alignment of this item's title in its cell.

If null, dynamically set according to text direction.

Returns:
Alignment

setTitleColSpan

public void setTitleColSpan(int titleColSpan)
Number of columns that this item's title spans.

This setting only applies for items that are showing a title and whose TitleOrientation is either "left" or "right".

Parameters:
titleColSpan - Default value is 1
See Also:
FormLayout overview and related methods

getTitleColSpan

public int getTitleColSpan()
Number of columns that this item's title spans.

This setting only applies for items that are showing a title and whose TitleOrientation is either "left" or "right".

Returns:
int
See Also:
FormLayout overview and related methods

setTitleOrientation

public void setTitleOrientation(TitleOrientation titleOrientation)
On which side of this item should the title be placed. TitleOrientation lists valid options.

Note that titles on the left or right take up a cell in tabular form layouts, but titles on top do not.

Parameters:
titleOrientation - Default value is Canvas.LEFT
See Also:
DynamicForm.setTitleOrientation(com.smartgwt.client.types.TitleOrientation)

getTitleOrientation

public TitleOrientation getTitleOrientation()
On which side of this item should the title be placed. TitleOrientation lists valid options.

Note that titles on the left or right take up a cell in tabular form layouts, but titles on top do not.

Returns:
TitleOrientation
See Also:
DynamicForm.getTitleOrientation()

setTitleStyle

public void setTitleStyle(String titleStyle)
Base CSS class name for a form item's title. Note that this is a FormItemBaseStyle so will pick up stateful suffixes on focus, disabled state change etc. by default.

Note the appearance of the title is also affected by titlePrefix/titleSuffix and requiredTitlePrefix/requiredTitleSuffix.

Parameters:
titleStyle - See FormItemBaseStyle . Default value is "formTitle"
See Also:
setCellStyle(java.lang.String)

getTitleStyle

public String getTitleStyle()
Base CSS class name for a form item's title. Note that this is a FormItemBaseStyle so will pick up stateful suffixes on focus, disabled state change etc. by default.

Note the appearance of the title is also affected by titlePrefix/titleSuffix and requiredTitlePrefix/requiredTitleSuffix.

Returns:
See FormItemBaseStyle
See Also:
getCellStyle()

setTitleVAlign

public void setTitleVAlign(VerticalAlignment titleVAlign)
Vertical alignment of this item's title in its cell. Only applies when titleOrientation is "left" or "right".

Parameters:
titleVAlign - Default value is Canvas.CENTER

getTitleVAlign

public VerticalAlignment getTitleVAlign()
Vertical alignment of this item's title in its cell. Only applies when titleOrientation is "left" or "right".

Returns:
VerticalAlignment

setTop

public void setTop(int top)
Top coordinate of this item in pixels. Applies only when the containing DynamicForm sets itemLayout:"absolute".

If this method is called after the component has been drawn/initialized: For a form with itemLayout:"absolute" only, set the top coordinate of this form item.

Causes the form to redraw.

Note : This is an advanced setting

Parameters:
top - Default value is 0

getTop

public int getTop()
Top coordinate of this item in pixels. Applies only when the containing DynamicForm sets itemLayout:"absolute".

Returns:
Returns the top coordinate of the form item in pixels. Note that this method is only reliable after the item has been drawn out.

setValidateOnChange

public void setValidateOnChange(Boolean validateOnChange)
If true, form items will be validated when each item's "change" handler is fired as well as when the entire form is submitted or validated.

Note that this property can also be set at the form level or on each validator; If true at the form or field level, validators not explicitly set with validateOnChange:false will be fired on change - displaying errors and rejecting the change on validation failure.

Parameters:
validateOnChange - Default value is false
See Also:
DynamicForm.setValidateOnChange(java.lang.Boolean)

getValidateOnChange

public Boolean getValidateOnChange()
If true, form items will be validated when each item's "change" handler is fired as well as when the entire form is submitted or validated.

Note that this property can also be set at the form level or on each validator; If true at the form or field level, validators not explicitly set with validateOnChange:false will be fired on change - displaying errors and rejecting the change on validation failure.

Returns:
Boolean
See Also:
DynamicForm.getValidateOnChange()

setValidateOnExit

public void setValidateOnExit(Boolean validateOnExit)
If true, form items will be validated when each item's "editorExit" handler is fired as well as when the entire form is submitted or validated.

Note that this property can also be set at the form level. If true at either level the validator will be fired on editorExit.

Parameters:
validateOnExit - Default value is false
See Also:
DynamicForm.setValidateOnExit(java.lang.Boolean)

getValidateOnExit

public Boolean getValidateOnExit()
If true, form items will be validated when each item's "editorExit" handler is fired as well as when the entire form is submitted or validated.

Note that this property can also be set at the form level. If true at either level the validator will be fired on editorExit.

Returns:
Boolean
See Also:
DynamicForm.getValidateOnExit()

setValidators

public void setValidators(Validator... validators)
Validators for this form item.

Note: these validators will only be run on the client; to do real client-server validation, validators must be specified on the DataSource.

Parameters:
validators - Default value is null

setValidOperators

public void setValidOperators(OperatorId... validOperators)
Array of valid filtering operators (eg "greaterThan") that are legal for this FormItem.

Applies only to form/formItem when allowExpressions is true, allowing the user to input expressions.

Parameters:
validOperators - Default value is null

getValidOperators

public OperatorId[] getValidOperators()
Array of valid filtering operators (eg "greaterThan") that are legal for this FormItem.

Applies only to form/formItem when allowExpressions is true, allowing the user to input expressions.

Returns:
OperatorId...

setVAlign

public void setVAlign(VerticalAlignment vAlign)
Vertical alignment of this item within its cell. This property governs the position of the item's text box within the cell (not the content within the text box). If FormItem.shouldApplyHeightToTextBox is true, for this to have a visible effect, the cell height must exceed the specified height of the item, either due to an explicit cellHeight specification, or due to the row being expanded by another taller item.

Has no effect if itemLayout is set to "absolute" for the form.

Parameters:
vAlign - Default value is Canvas.CENTER

getVAlign

public VerticalAlignment getVAlign()
Vertical alignment of this item within its cell. This property governs the position of the item's text box within the cell (not the content within the text box). If FormItem.shouldApplyHeightToTextBox is true, for this to have a visible effect, the cell height must exceed the specified height of the item, either due to an explicit cellHeight specification, or due to the row being expanded by another taller item.

Has no effect if itemLayout is set to "absolute" for the form.

Returns:
VerticalAlignment

setValueField

public void setValueField(String valueField)
If this form item maps data values to display values by retrieving the displayField values from an optionDataSource, this property denotes the the field to use as the underlying data value in records from the optionDataSource.
If unset, assumed to be the name of this form item.

Parameters:
valueField - Default value is null

getValueField

public String getValueField()
If this form item maps data values to display values by retrieving the displayField values from an optionDataSource, this property denotes the the field to use as the underlying data value in records from the optionDataSource.
If unset, assumed to be the name of this form item.

Returns:
Getter method to retrieve the valueField for this item. If unset, default behavior will return the name of this field.

setValueIconHeight

public void setValueIconHeight(Integer valueIconHeight)
If valueIcons is specified, use this property to specify a height for the value icon written out.

Parameters:
valueIconHeight - Default value is null
See Also:
setValueIconWidth(java.lang.Integer), setValueIconSize(int)

getValueIconHeight

public Integer getValueIconHeight()
If valueIcons is specified, use this property to specify a height for the value icon written out.

Returns:
Integer
See Also:
getValueIconWidth(), getValueIconSize()

setValueIconLeftPadding

public void setValueIconLeftPadding(int valueIconLeftPadding)
If we're showing a value icon, this attribute governs the amount of space between the icon and the start edge of the form item cell.

NOTE: In RTL mode, the valueIconLeftPadding is applied to the right of the value icon.

Parameters:
valueIconLeftPadding - Default value is 0
See Also:
setValueIcons(java.util.Map)

getValueIconLeftPadding

public int getValueIconLeftPadding()
If we're showing a value icon, this attribute governs the amount of space between the icon and the start edge of the form item cell.

NOTE: In RTL mode, the valueIconLeftPadding is applied to the right of the value icon.

Returns:
int
See Also:
com.smartgwt.client.widgets.form.fields.FormItem#getValueIcons

setValueIconRightPadding

public void setValueIconRightPadding(int valueIconRightPadding)
If we're showing a value icon, this attribute governs the amount of space between the icon and the value text.

NOTE: In RTL mode, the valueIconRightPadding is applied to the left of the value icon.

Parameters:
valueIconRightPadding - Default value is 3
See Also:
setValueIcons(java.util.Map)

getValueIconRightPadding

public int getValueIconRightPadding()
If we're showing a value icon, this attribute governs the amount of space between the icon and the value text.

NOTE: In RTL mode, the valueIconRightPadding is applied to the left of the value icon.

Returns:
int
See Also:
com.smartgwt.client.widgets.form.fields.FormItem#getValueIcons

setValueIconSize

public void setValueIconSize(int valueIconSize)
If valueIcons is specified, this property may be used to specify both the width and height of the icon written out. Note that valueIconWidth and valueIconHeight take precedence over this value, if specified.

Parameters:
valueIconSize - Default value is 16
See Also:
setValueIconWidth(java.lang.Integer), setValueIconHeight(java.lang.Integer)

getValueIconSize

public int getValueIconSize()
If valueIcons is specified, this property may be used to specify both the width and height of the icon written out. Note that valueIconWidth and valueIconHeight take precedence over this value, if specified.

Returns:
int
See Also:
getValueIconWidth(), getValueIconHeight()

setValueIconWidth

public void setValueIconWidth(Integer valueIconWidth)
If valueIcons is specified, use this property to specify a width for the value icon written out.

Parameters:
valueIconWidth - Default value is null
See Also:
setValueIconHeight(java.lang.Integer), setValueIconSize(int)

getValueIconWidth

public Integer getValueIconWidth()
If valueIcons is specified, use this property to specify a width for the value icon written out.

Returns:
Integer
See Also:
getValueIconHeight(), getValueIconSize()

setVisible

public void setVisible(Boolean visible)
Whether this item is currently visible.

visible can only be set on creation. After creation, use FormItem.show and FormItem.hide to manipulate visibility.

Parameters:
visible - Default value is true
See Also:
Appearance overview and related methods

getVisible

public Boolean getVisible()
Whether this item is currently visible.

visible can only be set on creation. After creation, use FormItem.show and FormItem.hide to manipulate visibility.

Returns:
Boolean
See Also:
Appearance overview and related methods

setWidth

public void setWidth(int width)
Width of the FormItem. Can be either a number indicating a fixed width in pixels, or "*" indicating the FormItem fills the space allocated to it's column (or columns, for a column spanning item).

If width is specified as a String, getWidth() will return -1. Use +sgwtLink{getWidthAsString()} in this case.

See the FormLayout overview for details.

Parameters:
width - Default value is -1
See Also:
FormLayout overview and related methods, Spanning Example

getWidth

public int getWidth()
Width of the FormItem. Can be either a number indicating a fixed width in pixels, or "*" indicating the FormItem fills the space allocated to it's column (or columns, for a column spanning item).

If width is specified as a String, getWidth() will return -1. Use +sgwtLink{getWidthAsString()} in this case.

See the FormLayout overview for details.

Returns:
Output the width for this element. Note this returns the specified width for the element, which may be "*" or a percentage value. Use 'getVisibleWidth()' to get the drawn width in pixels.
See Also:
FormLayout overview and related methods, Spanning Example

setWidth

public void setWidth(String width)
Width of the FormItem. Can be either a number indicating a fixed width in pixels, or "*" indicating the FormItem fills the space allocated to it's column (or columns, for a column spanning item).

If width is specified as a String, getWidth() will return -1. Use +sgwtLink{getWidthAsString()} in this case.

See the FormLayout overview for details.

Parameters:
width - Default value is -1
See Also:
FormLayout overview and related methods, Spanning Example

getWidthAsString

public String getWidthAsString()
Width of the FormItem. Can be either a number indicating a fixed width in pixels, or "*" indicating the FormItem fills the space allocated to it's column (or columns, for a column spanning item).

If width is specified as a String, getWidth() will return -1. Use +sgwtLink{getWidthAsString()} in this case.

See the FormLayout overview for details.

Returns:
Output the width for this element. Note this returns the specified width for the element, which may be "*" or a percentage value. Use 'getVisibleWidth()' to get the drawn width in pixels.
See Also:
FormLayout overview and related methods, Spanning Example

setWrapTitle

public void setWrapTitle(Boolean wrapTitle)
If specified determines whether this items title should wrap. Overrides wrapItemTitles at the DynamicForm level.

Parameters:
wrapTitle - Default value is null

getWrapTitle

public Boolean getWrapTitle()
If specified determines whether this items title should wrap. Overrides wrapItemTitles at the DynamicForm level.

Returns:
Boolean

addBlurHandler

public HandlerRegistration addBlurHandler(BlurHandler handler)
Add a blur handler.

Called when this FormItem loses focus.

Specified by:
addBlurHandler in interface HasBlurHandlers
Parameters:
handler - the blur handler
Returns:
HandlerRegistration used to remove this handler

blurItem

public void blurItem()
Takes focus from this form item's focusable element.

See Also:
Focus overview and related methods

addChangeHandler

public HandlerRegistration addChangeHandler(ChangeHandler handler)
Add a change handler.

Called when a FormItem's value is about to change as the result of user interaction. This method fires after the user performed an action that would change the value of this field, but before the element itself is changed.

Returning false cancels the change. Note that if what you want to do is transform the user's input, for example, automatically change separator characters to a standard separator character, you should implement transformInput rather than using a combination of change() and setValue() to accomplish the same thing. Returning false from change is intended for rejecting input entirely, such as typing invalid characters.

Note that if you ask the form for the current value in this handler, you will get the old value because the change has not yet been committed. The new value is available as a parameter to this method.

Specified by:
addChangeHandler in interface HasChangeHandlers
Parameters:
handler - the change handler
Returns:
HandlerRegistration used to remove this handler

addChangedHandler

public HandlerRegistration addChangedHandler(ChangedHandler handler)
Add a changed handler.

Called when a FormItem's value has been changed as the result of user interaction. This method fires after the newly specified value has been stored.

Specified by:
addChangedHandler in interface HasChangedHandlers
Parameters:
handler - the changed handler
Returns:
HandlerRegistration used to remove this handler

clearValue

public void clearValue()
Clear the value for this form item.

Note that if a default value is specified, value will be set to that default value, otherwise value will be cleared, (and removed from the containing form's values).


addClickHandler

public HandlerRegistration addClickHandler(ClickHandler handler)
Add a click handler.

Called when this FormItem is clicked on.

Note: click() is available on StaticTextItem, BlurbItems, ButtonItem, and derivatives. Other form items (such as HiddenItem) do not support click().

Specified by:
addClickHandler in interface HasClickHandlers
Parameters:
handler - the click handler
Returns:
HandlerRegistration used to remove this handler

disable

public void disable()
Set this item to be disabled at runtime.

See Also:
getDisabled(), Enable overview and related methods

addDoubleClickHandler

public HandlerRegistration addDoubleClickHandler(DoubleClickHandler handler)
Add a doubleClick handler.

Called when this FormItem is double-clicked.

Specified by:
addDoubleClickHandler in interface HasDoubleClickHandlers
Parameters:
handler - the doubleClick handler
Returns:
HandlerRegistration used to remove this handler

addEditorEnterHandler

public HandlerRegistration addEditorEnterHandler(EditorEnterHandler handler)
Add a editorEnter handler.

Notification method fired when the user enters this formItem. Differs from FormItem.focus in that while focus and blur may fire multiple as the user navigates sub elements of an item (such as interacting with a pick list), editorEnter will typically fire once when the user starts to edit this item as a whole, and once when the user moves onto a different item or component

Specified by:
addEditorEnterHandler in interface HasEditorEnterHandlers
Parameters:
handler - the editorEnter handler
Returns:
HandlerRegistration used to remove this handler

addEditorExitHandler

public HandlerRegistration addEditorExitHandler(EditorExitHandler handler)
Add a editorExit handler.

Notification method fired when the user leaves this formItem. Differs from FormItem.blur in that while focus and blur may fire multiple as the user navigates sub elements of an item (such as interacting with a pick list), editorEnter will typically fire once when the user starts to edit this item as a whole, and editorExit fires once when the user moves onto a different item or component

Specified by:
addEditorExitHandler in interface HasEditorExitHandlers
Parameters:
handler - the editorExit handler
Returns:
HandlerRegistration used to remove this handler

enable

public void enable()
Set this item to be enabled at runtime.

See Also:
getDisabled(), Enable overview and related methods

addFocusHandler

public HandlerRegistration addFocusHandler(FocusHandler handler)
Add a focus handler.

Called when this FormItem receives focus.

Specified by:
addFocusHandler in interface HasFocusHandlers
Parameters:
handler - the focus handler
Returns:
HandlerRegistration used to remove this handler

focusInItem

public void focusInItem()
Move the keyboard focus into this item's focusable element

See Also:
Focus overview and related methods

getDisplayFieldName

public String getDisplayFieldName()
Returns the displayField for this item. This will typically be specified explicitly via the displayField attribute. However, if that property is unset, and the valueField for this item is hidden in the optionDataSource, this method will return the title field for the optionDataSource.

Returns:
display field name, or null if there is no separate display field to use.

getFieldName

public String getFieldName()
Return the name for the this formItem.

Returns:
name for this form item
See Also:
Drawing overview and related methods

getFullDataPath

public String getFullDataPath()
Return the fully-qualified dataPath for the this formItem (ie, the dataPath expressed in absolute terms from the root of the hierarchy, rather than relative to the item's parent form). Note that the item's name is substituted into the full dataPath if the item does not specify an explicit dataPath. For example, if we have a field called name that specifies no dataPath, on a form that specifies a dataPath of /order/items, this method will return /order/items/name

Returns:
Fully-qualified dataPath for this form item

getIcon

public FormItemIcon getIcon(String name)
Given an name return a pointer to the icon definition

Parameters:
name - specified name
Returns:
form item icon matching the specified name

getPageLeft

public int getPageLeft()
Returns the drawn page-left coordinate of this form item in pixels.

Returns:
page-left coordinate in px
See Also:
Positioning overview and related methods

getPageTop

public int getPageTop()
Returns the drawn page-top coordinate of this form item in pixels.

Returns:
page-top coordinate in px
See Also:
Positioning overview and related methods

getPixelHeight

public int getPixelHeight()
Returns the specified height of this formItem in pixels. For heights specified as a percentage value or "*", the pixel height may not be available prior to the item being drawn. In cases where the height has not yet been resolved to a pixel value, this method will return -1.

Returns:
Specified height resolved to a pixel value.

getPixelWidth

public int getPixelWidth()
Returns the specified width of this formItem in pixels. For widths specified as a percentage value or "*", the pixel width may not be available prior to the item being drawn. In cases where the width has not yet been resolved to a pixel value, this method will return -1.

Returns:
Specified width resolved to a pixel value.

getSelectedRecord

public ListGridRecord getSelectedRecord()
Get the record returned from the optionDataSource when fetchMissingValues is true, and the missing value is fetched.

fetchMissingValues kicks off the fetch when the form item is initialized with a non null value or when setValue() is called on the item. Note that this method will return null before the fetch completes, or if no record is found in the optionDataSource matching the underlying value.

Returns:
selected record

getValueFieldName

public String getValueFieldName()
Getter method to retrieve the valueField for this item. If unset, default behavior will return the name of this field.

Returns:
fieldName to use a "value field" in records from this items optionDataSource

hasAdvancedCriteria

public Boolean hasAdvancedCriteria()
Does this form item produce an AdvancedCriteria sub criterion object? If this method returns true, DynamicForm.getValuesAsCriteria on the form containing this item will always return an AdvancedCriteria object, calling FormItemCriterionGetter.getCriterion() on each item to retrieve the individual criteria.

Default implementation will return true if operator is explicitly specified.

Returns:
true if this item will return an AdvancedCriteria sub-criterion.
See Also:
CriteriaEditing overview and related methods

hide

public void hide()
Hide this form item.

This will cause the form to redraw. If this item had an item.showIf expression, it will be destroyed.


hideIcon

public void hideIcon(String icon)
This method will hide some icon in this item's icons array, if it is currently visible. Note that once this method has been called, andy previously specified FormItemIcon.showIf will be discarded.

Parameters:
icon - Name of the icon to be hidden.

addIconClickHandler

public HandlerRegistration addIconClickHandler(IconClickHandler handler)
Add a iconClick handler.

Notification method called when the user clicks on a form item icon.

The icon's FormItemIcon.formItemClick method if any is called first. Then, if the clicked icon is the picker icon, the FormItem.pickerIconClick method is called. Then, this method is called.

Specified by:
addIconClickHandler in interface HasIconClickHandlers
Parameters:
handler - the iconClick handler
Returns:
HandlerRegistration used to remove this handler

addIconKeyPressHandler

public HandlerRegistration addIconKeyPressHandler(IconKeyPressHandler handler)
Add a iconKeyPress handler.

StringMethod. Default action to fire when an icon has keyboard focus and the user types a key. May be overridden by setting keyPress on the form item icon directly.

Specified by:
addIconKeyPressHandler in interface HasIconKeyPressHandlers
Parameters:
handler - the iconKeyPress handler
Returns:
HandlerRegistration used to remove this handler

invalidateDisplayValueCache

public void invalidateDisplayValueCache()
If this item has a specified displayField, the value displayed to the user for this item may be derived from another field.

The display field can be either another field value in the same record or a field that must be retrieved from a related optionDataSource if fetchMissingValues is true. In this latter case, we perform a fetch against the option dataSource when the item value changes in order to determine the display value to show (and we make the associated record available via FormItem.getSelectedRecord).

We cache this data on the form item, so if the item value changes to a new value, then reverts to a previously-seen value, the display value and selected record are already available without the need for an additional fetch. The cached values will also be kept in synch with the dataSource data assuming it is modified via standard add, update or delete operations.

This method explicitly invalidates this cache of optionDataSource data, and if the item value is non null and fetchMissingValues is still true, re-fetches the data.


isDisabled

public Boolean isDisabled()
Is this item disabled?

Returns:
disabledtrue if this item is be disabled
See Also:
getDisabled(), Enable overview and related methods

isDrawn

public Boolean isDrawn()
Returns true if this item has been written out into the DOM.

Returns:
whether this item is drawn
See Also:
Drawing overview and related methods

isVisible

public Boolean isVisible()
Return true if the form item is currently visible. Note that like the similar Canvas API, it indicates visibility settings only and so will return true for an item that is not drawn.

Returns:
true if the form item is visible
See Also:
Visibility overview and related methods

addItemHoverHandler

public HandlerRegistration addItemHoverHandler(ItemHoverHandler handler)
Add a itemHover handler.

Optional stringMethod to fire when the user hovers over this item. Call com.smartgwt.client.widgets.form.fields.events.ItemHoverEvent#cancel() from within ItemHoverHandler.onItemHover(com.smartgwt.client.widgets.form.fields.events.ItemHoverEvent) to suppress default behavior of showing a hover canvas containing the HTML returned by formItem.itemHoverHTML() / form.itemHoverHTML().

Specified by:
addItemHoverHandler in interface HasItemHoverHandlers
Parameters:
handler - the itemHover handler
Returns:
HandlerRegistration used to remove this handler

addKeyDownHandler

public HandlerRegistration addKeyDownHandler(KeyDownHandler handler)
Add a keyDown handler.

StringMethod fired in response to a keydown while focused in this form item.

Specified by:
addKeyDownHandler in interface HasKeyDownHandlers
Parameters:
handler - the keyDown handler
Returns:
HandlerRegistration used to remove this handler

addKeyPressHandler

public HandlerRegistration addKeyPressHandler(KeyPressHandler handler)
Add a keyPress handler.

StringMethod fired when the user presses a key while focused in this form item.

Specified by:
addKeyPressHandler in interface HasKeyPressHandlers
Parameters:
handler - the keyPress handler
Returns:
HandlerRegistration used to remove this handler

addKeyUpHandler

public HandlerRegistration addKeyUpHandler(KeyUpHandler handler)
Add a keyUp handler.

StringMethod fired in response to a keyup while focused in this form item.

Specified by:
addKeyUpHandler in interface HasKeyUpHandlers
Parameters:
handler - the keyUp handler
Returns:
HandlerRegistration used to remove this handler

addPickerIconClickHandler

public HandlerRegistration addPickerIconClickHandler(PickerIconClickHandler handler)
Add a pickerIconClick handler.

Notification method called when the picker icon is clicked.

Specified by:
addPickerIconClickHandler in interface HasPickerIconClickHandlers
Parameters:
handler - the pickerIconClick handler
Returns:
HandlerRegistration used to remove this handler

shouldApplyHeightToTextBox

public boolean shouldApplyHeightToTextBox()
If height is specified, should it be applied to the item's text box element? If this method returns false, the text box will not have an explicit height applied, though the containing cell will be sized to accomodiate any specified height.

This is used in cases where the text box does not have distinctive styling (for example in standard StaticTextItems). As the textBox has no explicit height, it fits the content. Since the text box is not visually distinct to the user, this makes vAlign behave as expected with the text value of the item being vertically aligned within the cell.

Default implementation will return applyHeightToTextBox if explicitly set otherwise false if readOnlyDisplay is set to "static" and the item is not editable, otherwise true.

Returns:
true if the height should be written into the items' text box.

shouldFetchMissingValue

public Boolean shouldFetchMissingValue(Object newValue)
If this field has a specified optionDataSource, should we perform a fetch against that dataSource to find the record that matches this field's value?

If the value is non-null, this method is called when the item is first rendered or whenever the value is changed via a call to FormItem.setValue. If it returns true, a fetch will be dispatched against the optionDataSource to get the record matching the value

When the fetch completes, if a record was found that matches the data value (and the form item value has not subsequently changed again), the item will be re-rendered to reflect any changes to the display value, and the record matching the value will be available via this.getSelectedRecord().

Default behavior will return false if this.fetchMissingValues is set to false. Otherwise it will return true if this.alwaysFetchMissingValues is set to true, or if a displayField is specified for this item and the item value is not already present in the item's valueMap.

Parameters:
newValue - The new data value of the item.
Returns:
should we fetch the record matching the new value from the item's optionDataSource?

shouldSaveOnEnter

public Boolean shouldSaveOnEnter()
Returns true if 'Enter' key presses in this formItem should allow a saveOnEnter: true parent form to save it's data. The default implementation returns the value of saveOnEnter or false if that property is unset.

Returns:
boolean indicating whether saving should be allowed to proceed

show

public void show()
Show this form item.

This will cause the form to redraw. If this item had an item.showIf expression, it will be destroyed.


showIcon

public void showIcon(String icon)
This method will show some icon in this item's icons array, if it is not already visible. Note that once this method has been called, andy previously specified FormItemIcon.showIf will be discarded.

Note that if the form item's showIcons property is set to false, no icons will be displayed for the item. In this case this method will not cause the icon to be displayed.

Parameters:
icon - Name of the icon to be shown.

showPicker

public void showPicker()
Method to show a picker for this item. By default this method is called if the user clicks on a pickerIcon. May also be called programmatically.

Default implementation lazily creates and shows the Picker Autochild. May be overridden to implement some custom picker for this item.


stopHover

public void stopHover()
This method is fired when the user rolls off this item (or the title for this item) and will clear any hover canvas shown by the item.


storeValue

public void storeValue(Object value)
Store (and optionally show) a value for this form item.

This method will fire standard FormItem.change and DynamicForm.itemChanged handlers, and store the value passed in such that subsequent calls to FormItem.getValue or DynamicForm.getValue will return the new value for this item.

This method is intended to provide a way for custom formItems - most commonly canvasItems - to provide a new interface to the user, allowing them to manipulate the item's value, for example in an embedded canvas, or a pop-up dialog launched from an icon, etc. Developers should call this method when the user interacts with this custom interface in order to store out the changed value.

If you cannot easily detect interactions that should change the value as the user performs them, a workaround is to call storeValue right before the form saves.

Note that this method is not designed for customizing a value which is already being saved by a standard user interaction. For example you should not call this method from a change handler. Other APIs such as FormItem.transformInput exist for this.

Parameters:
value - value to save for this item
See Also:
ListGrid Item Example

storeValue

public void storeValue(Object value,
                       Boolean showValue)
Store (and optionally show) a value for this form item.

This method will fire standard FormItem.change and DynamicForm.itemChanged handlers, and store the value passed in such that subsequent calls to FormItem.getValue or DynamicForm.getValue will return the new value for this item.

This method is intended to provide a way for custom formItems - most commonly canvasItems - to provide a new interface to the user, allowing them to manipulate the item's value, for example in an embedded canvas, or a pop-up dialog launched from an icon, etc. Developers should call this method when the user interacts with this custom interface in order to store out the changed value.

If you cannot easily detect interactions that should change the value as the user performs them, a workaround is to call storeValue right before the form saves.

Note that this method is not designed for customizing a value which is already being saved by a standard user interaction. For example you should not call this method from a change handler. Other APIs such as FormItem.transformInput exist for this.

Parameters:
value - value to save for this item
showValue - Should the formItem be updated to display the new value?
See Also:
ListGrid Item Example

addTitleClickHandler

public HandlerRegistration addTitleClickHandler(TitleClickHandler handler)
Add a titleClick handler.

Notification method fired when the user clicks the title for this item

Specified by:
addTitleClickHandler in interface HasTitleClickHandlers
Parameters:
handler - the titleClick handler
Returns:
HandlerRegistration used to remove this handler

addTitleDoubleClickHandler

public HandlerRegistration addTitleDoubleClickHandler(TitleDoubleClickHandler handler)
Add a titleDoubleClick handler.

Notification method fired when the user double-clicks the title for this item

Specified by:
addTitleDoubleClickHandler in interface HasTitleDoubleClickHandlers
Parameters:
handler - the titleDoubleClick handler
Returns:
HandlerRegistration used to remove this handler

addTitleHoverHandler

public HandlerRegistration addTitleHoverHandler(TitleHoverHandler handler)
Add a titleHover handler.

Optional stringMethod to fire when the user hovers over this item's title. Call com.smartgwt.client.widgets.form.fields.events.TitleHoverEvent#cancel() from within TitleHoverHandler.onTitleHover(com.smartgwt.client.widgets.form.fields.events.TitleHoverEvent) to suppress default behavior of showing a hover canvas containing the HTML returned by formItem.titleHoverHTML() / form.titleHoverHTML().

Specified by:
addTitleHoverHandler in interface HasTitleHoverHandlers
Parameters:
handler - the titleHover handler
Returns:
HandlerRegistration used to remove this handler

updateState

public void updateState()
Update the visual state of a FormItem to reflect any changes in state or any changes in style settings (eg textBoxStyle).

Calls to updateState() normally occur automatically as a consequence of focus changes, items becoming disabled, etc. This method is advanced and intended only for use in workarounds.


validate

public Boolean validate()
Validate this item.

Returns:
returns true if validation was successful (no errors encountered), false otherwise.

valueClipped

public boolean valueClipped()
Is the value clipped?

The form item must have value clipping enabled. If a form item type supports the clipValue attribute, then clipValue must be true. TextItems and derivatives (e.g. SpinnerItem) automatically clip their values.

Returns:
true if the value is clipped; false otherwise.

addValueHoverHandler

public HandlerRegistration addValueHoverHandler(ValueHoverHandler handler)
Add a valueHover handler.

Optional stringMethod to fire when the user hovers over this item's value. Call com.smartgwt.client.widgets.form.fields.events.ValueHoverEvent#cancel() from within ValueHoverHandler.onValueHover(com.smartgwt.client.widgets.form.fields.events.ValueHoverEvent) to suppress default behavior of showing a hover canvas containing the HTML returned by FormItem.valueHoverHTML / DynamicForm.valueHoverHTML.

Specified by:
addValueHoverHandler in interface HasValueHoverHandlers
Parameters:
handler - the valueHover handler
Returns:
HandlerRegistration used to remove this handler

setDefaultProperties

public static void setDefaultProperties(FormItem formItemProperties)
Class level method to set the default properties of this class. If set, then all existing and subsequently created instances of this class will automatically have default properties corresponding to the properties of the class instance passed to this function. 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 affect 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. Calling this method after instances have been created can result in undefined behavior, since it bypasses any setters and a class instance may have already examined a particular property and not be expecting any changes through this route.

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

getScClassName

public String getScClassName()
Get the name of the underlying SmartClient class

Returns:
the SmartClient class name

setScClassName

public void setScClassName(String scClassName)
Set the name of the underlying SmartClient class. This is an advanced setting.

Parameters:
scClassName - the SmartClient class

asSGWTComponent

public static <T extends RefDataClass> T asSGWTComponent(JavaScriptObject jsObj)
Returns the existing SGWT FormItem, or creates and returns one if none exist, associated with the supplied JavaScriptObject. If the supplied object is not a SmartClient FormItem, a warning will be logged and null returned; otherwise the FormItem will be returned as the appropriate subtype of SGWT FormItem.

Parameters:
jsObj - SmartClient FormItem whose wrapper is wanted
Returns:
wrapping SGWT FormItem, of an appropriate subtype, or null

getClassName

public String getClassName()
Returns the JavaScript class name.

Returns:

setInitHandler

public void setInitHandler(FormItemInitHandler initHandler)
Specify a notification method to fire when this formItem is initialized in JavaScript. This allows developers to set up form item state dynamically when the item is created.

Parameters:
initHandler -

setAttribute

public void setAttribute(String attribute,
                         String value)
Description copied from class: DataClass
Set attribute value to a String

Overrides:
setAttribute in class DataClass

setAttribute

public void setAttribute(String attribute,
                         Boolean value)
Description copied from class: DataClass
Set attribute value to a Boolean.

Overrides:
setAttribute in class DataClass

setAttribute

public void setAttribute(String attribute,
                         Map value)
Description copied from class: DataClass
Set attribute value to a Map. Value will be stored as a JavaScript Object on the underlying data object, with property/value pairs matching the keys/values specified on the Map. Note that this is a recursive conversion - each value will also be converted to the equivalent JavaScript type where appropriate.

Overrides:
setAttribute in class DataClass

setAttribute

public void setAttribute(String attribute,
                         int[] value)
Description copied from class: DataClass
Set attribute value to an int array. Value will be stored as a JavaScript Array of Numbers on the underlying data object.

Overrides:
setAttribute in class DataClass

setAttribute

public void setAttribute(String attribute,
                         BaseClass[] value)
Description copied from class: DataClass
Set attribute value to a BaseClass array. Value will be stored as a JavaScript Array of the underlying JavaScript objects for each entry.

Overrides:
setAttribute in class DataClass

setAttribute

public void setAttribute(String attribute,
                         DataClass[] value)
Description copied from class: DataClass
Set attribute value to a DataClass array. Value will be stored as a JavaScript Array of the underlying JavaScript objects for each entry.

Overrides:
setAttribute in class DataClass

setAttribute

public void setAttribute(String attribute,
                         double value)
Description copied from class: DataClass
Set attribute value to a double. Value will be stored as a JavaScript Number on the underlying data object

Overrides:
setAttribute in class DataClass

setAttribute

public void setAttribute(String attribute,
                         int value)
Description copied from class: DataClass
Set attribute value to an int. Value will be stored as a JavaScript Number on the underlying data object

Overrides:
setAttribute in class DataClass

setAttribute

public void setAttribute(String attribute,
                         Date value)
Description copied from class: DataClass
Set attribute value to a Date. Value will be stored as a JavaScript Date on the underlying data object

Overrides:
setAttribute in class DataClass

setAttribute

public void setAttribute(String attribute,
                         ValueEnum[] value)
Description copied from class: DataClass
Set attribute value to a ValueEnum array. Value will be stored as a JavaScript Array containing the each Enum value.

Overrides:
setAttribute in class DataClass

setAttribute

public void setAttribute(String attribute,
                         DataClass value)
Description copied from class: DataClass
Set attribute value to a DataClass. Value will be stored as the underlying JavaScript object for the DataClass instance passed in.

Overrides:
setAttribute in class DataClass

setAttribute

public void setAttribute(String attribute,
                         BaseClass value)
Description copied from class: DataClass
Set attribute value to a BaseClass. Value will be stored as the underlying JavaScript object for the BaseClass instance passed in.

Overrides:
setAttribute in class DataClass

setAttribute

public void setAttribute(String attribute,
                         JavaScriptObject value)
Description copied from class: DataClass
Set attribute value to a JavaScriptObject.

Overrides:
setAttribute in class DataClass

setAttribute

public void setAttribute(String attribute,
                         String[] value)
Description copied from class: DataClass
Set attribute value to a String array. Value will be stored as a JavaScript Array of Strings on the underlying data object.

Overrides:
setAttribute in class DataClass

setAttribute

public void setAttribute(String attribute,
                         boolean value)
Description copied from class: DataClass
Set attribute value to a boolean.

Overrides:
setAttribute in class DataClass

getAttribute

public String getAttribute(String attribute)
Description copied from class: DataClass
Returns attribute value as a String

Overrides:
getAttribute in class DataClass
Returns:

getAttributeAsString

public String getAttributeAsString(String property)
Description copied from class: DataClass
Returns attribute value as a String.

Overrides:
getAttributeAsString in class DataClass
Returns:

getAttributeAsDate

public Date getAttributeAsDate(String property)
Description copied from class: DataClass
Returns attribute value as a Date. Applies to values stored as a JavaScript Date on the underlying data object.

Overrides:
getAttributeAsDate in class DataClass
Returns:

getAttributeAsDouble

public Double getAttributeAsDouble(String property)
Description copied from class: DataClass
Returns attribute as a Double. Applies to values stored as a JavaScript Number on the underlying data object.

Overrides:
getAttributeAsDouble in class DataClass
Returns:

getAttributeAsJavaScriptObject

public JavaScriptObject getAttributeAsJavaScriptObject(String property)
Description copied from class: DataClass
Returns attribute value as a JavaScript Object.

Overrides:
getAttributeAsJavaScriptObject in class DataClass
Returns:

getAttributeAsInt

public Integer getAttributeAsInt(String property)
Description copied from class: DataClass
Returns attribute value as an Integer. Applies to values stored as a JavaScript number on the underlying data object.

Overrides:
getAttributeAsInt in class DataClass
Returns:

getAttributeAsFloat

public Float getAttributeAsFloat(String property)
Description copied from class: DataClass
Returns attribute value as a Float. Applies to values stored as a JavaScript number on the underlying data object.

Overrides:
getAttributeAsFloat in class DataClass
Returns:

getAttributeAsBoolean

public Boolean getAttributeAsBoolean(String attribute)
Description copied from class: DataClass
Returns attribute value set as a Boolean.

Overrides:
getAttributeAsBoolean in class DataClass
Returns:

getAttributeAsObject

public Object getAttributeAsObject(String property,
                                   JavaScriptObject convertToObject)

setProperty

public void setProperty(String property,
                        String value)

setProperty

public void setProperty(String property,
                        boolean value)

setProperty

public void setProperty(String property,
                        int value)

setProperty

public void setProperty(String property,
                        double value)

setProperty

public void setProperty(String property,
                        JavaScriptObject value)

isCreated

protected boolean isCreated()
Overrides:
isCreated in class JsObject

setAutoChildConstructor

public void setAutoChildConstructor(String autoChildName,
                                    String className)
Sets the SmartClient constructor for the AutoChild named autoChildName.

Parameters:
autoChildName - the name of the AutoChild
className - the SmartClient class name to use when constructing the AutoChild.
See Also:
AutoChildUsage

setAutoChildProperties

public void setAutoChildProperties(String autoChildName,
                                   Canvas properties)
Sets the properties for creating a Canvas AutoChild named autoChildName.

properties must not have already been created (properties.isCreated() must be false).

NOTE: Overrides at override points are not applied to the AutoChild created from properties; that is, if the Java Class of properties overrides a Smart GWT override point, the custom method implementation will not be called.

Throws:
IllegalStateException - if properties has been created.

setAutoChildProperties

public void setAutoChildProperties(String autoChildName,
                                   FormItem properties)
Sets the properties for creating a FormItem AutoChild named autoChildName.

properties must not have already been created (properties.isCreated() must be false).

NOTE: Overrides at override points are not applied to the AutoChild created from properties; that is, if the Java Class of properties overrides a Smart GWT override point, the custom method implementation will not be called.

Throws:
IllegalStateException - if properties has been created.

setAutoChildVisibility

public void setAutoChildVisibility(String autoChildName,
                                   boolean visible)
Sets whether to create and show the AutoChild named autoChildName.

NOTE: This API is not valid for all AutoChildren because some AutoChildren cannot be hidden without destroying the main functions of the component.

Parameters:
autoChildName - name of an AutoChild
visible - whether to show the AutoChild

getCanvasAutoChild

public final Canvas getCanvasAutoChild(String autoChildName)
Returns the Canvas AutoChild named autoChildName if already created.

Parameters:
autoChildName - name of an AutoChild to return.
Throws:
RuntimeException - if no AutoChild named autoChildName has been created or the AutoChild is not a SmartClient Canvas object.

getFormItemAutoChild

public final FormItem getFormItemAutoChild(String autoChildName)
Returns the FormItem AutoChild named autoChildName if already created.

Parameters:
autoChildName - name of an AutoChild to return.
Throws:
RuntimeException - if no AutoChild named autoChildName has been created or the AutoChild is not a SmartClient FormItem object.

setOptionDataSource

public void setOptionDataSource(DataSource dataSource)

setName

public void setName(String name)
Name for this form field.

The FormItem's name determines the name of the property it edits within the form. Must be unique within the form as well as a valid JavaScript identifier, as specified by ECMA-262 Section 7.6 (the StringUtil.isValidID(String) function can be used to test whether a name is a valid JavaScript identifier).

Parameters:
name - name Default value is null

getName

public String getName()
Name for this form field.

The FormItem's name determines the name of the property it edits within the form. Must be unique within the form as well as a valid JavaScript identifier, as specified by ECMA-262 Section 7.6 (the StringUtil.isValidID(String) function can be used to test whether a name is a valid JavaScript identifier).

Returns:
String

setErrorOrientation

public void setErrorOrientation(FormErrorOrientation errorOrientation)
If showInlineErrors is true, where should the error icon and text appear relative to the form item itself. Valid options are "top", "bottom", "left" or "right".
If unset the orientation will be derived from errorOrientation.

Parameters:
errorOrientation - errorOrientation Default value is null

setType

public void setType(String type)
The DynamicForm picks a field renderer based on the type of the field (and sometimes other attributes of the field).

Parameters:
type - type Default value is "text"

setColSpan

public void setColSpan(String colSpan)
Number of columns that this item spans.

The colSpan setting does not include the title shown for items with showTitle:true, so the effective colSpan is one higher than this setting for items that are showing a title and whose TitleOrientation is either "left" or "right".

Parameters:
colSpan - colSpan Default value is 1

setColSpan

public void setColSpan(int colSpan)
Number of columns that this item spans.

The colSpan setting does not include the title shown for items with showTitle set to true, so the effective colSpan is one higher than this setting for items that are showing a title and whose TitleOrientation is either "left" or "right".

Parameters:
colSpan - colSpan Default value is 1

getType

public String getType()
The DynamicForm picks a field renderer based on the type of the field (and sometimes other attributes of the field).

Returns:
the type

setDefaultValue

public void setDefaultValue(String defaultValue)
Value used when no value is provided for this item. Note that whenever this item's value is cleared by the user or set to null programmatically, it will be reverted to the defaultValue. Developers should use the values object if their intention is to provide an initial value for a field in a form rather than a value to use in place of null.

Parameters:
defaultValue - defaultValue Default value is null

setDefaultValue

public void setDefaultValue(Integer defaultValue)
Value used when no value is provided for this item. Note that whenever this item's value is cleared by the user or set to null programmatically, it will be reverted to the defaultValue. Developers should use the values object if their intention is to provide an initial value for a field in a form rather than a value to use in place of null.

Parameters:
defaultValue - defaultValue Default value is null

setDefaultValue

public void setDefaultValue(Date defaultValue)
Value used when no value is provided for this item. Note that whenever this item's value is cleared by the user or set to null programmatically, it will be reverted to the defaultValue. Developers should use the values object if their intention is to provide an initial value for a field in a form rather than a value to use in place of null.

Parameters:
defaultValue - defaultValue Default value is null

setDefaultValue

public void setDefaultValue(Boolean defaultValue)
Value used when no value is provided for this item. Note that whenever this item's value is cleared by the user or set to null programmatically, it will be reverted to the defaultValue. Developers should use the values object if their intention is to provide an initial value for a field in a form rather than a value to use in place of null.

Parameters:
defaultValue - defaultValue Default value is null

setDefaultValue

public void setDefaultValue(Float defaultValue)
Value used when no value is provided for this item. Note that whenever this item's value is cleared by the user or set to null programmatically, it will be reverted to the defaultValue. Developers should use the values object if their intention is to provide an initial value for a field in a form rather than a value to use in place of null.

Parameters:
defaultValue - defaultValue Default value is null

setDefaultValue

public void setDefaultValue(Double defaultValue)
Value used when no value is provided for this item. Note that whenever this item's value is cleared by the user or set to null programmatically, it will be reverted to the defaultValue. Developers should use the values object if their intention is to provide an initial value for a field in a form rather than a value to use in place of null.

Parameters:
defaultValue - defaultValue Default value is null

setDefaultValue

public void setDefaultValue(Object value)

setValueMap

public void setValueMap(String... valueMap)
Set the valueMap for this item.

Parameters:
valueMap - the value map

setValueMap

public void setValueMap(LinkedHashMap valueMap)
Set the valueMap for this item.

Parameters:
valueMap - the value map

setValueIcons

public void setValueIcons(Map valueIcons)
Set the valueIcons for this item.

Parameters:
valueIcons - mapping of logical values for this item to icon src URLs

setEditorProperties

public void setEditorProperties(FormItem editorProperties)
Set default properties to use when editing.

The type of FormItem to use for editing is normally derived automatically from type, which is the data type of the field, by the rules explained here.

Note: When you supply a custom FormItem via setEditorProperties(), you're really providing properties which are then used to create multiple FormItems (eg, in grids, forms and trees) and there's an underlying limitation here where event handlers have to be written to dynamically receive the actual FormItem rather than relying on "this" (because there's more than one "this"). This means you need to follow the special rules indicated for DataSourceField.setEditorProperties(FormItem). As an alternative, you can use setEditorType(String) or setEditorType(Class) to avoid these limitations, if you register the FormItem subclass with the reflection mechanism.

Parameters:
editorProperties - FormItem with the properties you want to set as defaults.

setEditorType

public void setEditorType(FormItem editorType)
Deprecated. Renamed to setEditorProperties(FormItem). You can also consider using setEditorType(Class) or setEditorType(String) instead.

Synonym for setEditorProperties(FormItem).

Parameters:
editorType - FormItem with the properties you want to set as defaults

setEditorType

public void setEditorType(String editorType)
Set the FormItem subclass to use when editing.

The type of FormItem to use for editing is normally derived automatically from the type, which is the data type of the field, by the rules explained here.

Note: The editorType must be registered for use with the reflection mechanism. By doing so, you avoid the limitations of setEditorProperties(FormItem).

Parameters:
editorType - the fully-qualified class name of a FormItem subclass.
Throws:
IllegalArgumentException - if the editorType class has not been registered for use with the reflection mechanism, or if it does not inherit from FormItem.

setEditorType

public void setEditorType(Class<? extends FormItem> editorType)
Set the FormItem subclass to use when editing.

The type of FormItem to use for editing is normally derived automatically from the type, which is the data type of the field, by the rules explained here.

Note: The editorType must be registered for use with the reflection mechanism. By doing so, you avoid the limitations of setEditorProperties(FormItem).

Parameters:
editorType - a FormItem subclass.
Throws:
IllegalArgumentException - if the editorType class has not been registered for use with the reflection mechanism, or if it does not inherit from FormItem.

setValue

public void setValue(int value)
Set the value of the form item.

Parameters:
value - the form item value

setValue

public void setValue(double value)
Set the value of the form item.

Parameters:
value - the form item value

setValue

public void setValue(Date value)
Set the value of the form item.

Parameters:
value - the form item value

setValue

public void setValue(String value)
Set the value of the form item.

Parameters:
value - the form item value

setValue

public void setValue(boolean value)
Set the value of the form item.

Parameters:
value - the form item value

setValue

public void setValue(Object value)
Set the value of the form item as an object. GWT objects set as FormItem values are typically used with FormItemValueParser and FormItemValueFormatter API's for custom value parsing and formatting.

Parameters:
value - the form item value

getDisplayValue

public String getDisplayValue()
Returns this item's value with any valueMap applied to it - the value as currently displayed to the user.

Returns:
value displayed to the user

getDisplayValue

public String getDisplayValue(String value)
Returns this item's value with any valueMap applied to it - the value as currently displayed to the user.

Returns:
value displayed to the user

getVisibleHeight

public int getVisibleHeight()
Output the drawn height for this item in pixels. Note: this is only reliable after this item has been written out into the DOM.

Returns:
height of the form item. returns 0 if the parent form has not been rendered.

getVisibleWidth

public int getVisibleWidth()
Output the drawn width for this item in pixels. Note: this is only reliable after this item has been written out into the DOM.

Returns:
height of the form item. returns 0 if the parent form has not been rendered.

getPageRect

public Rectangle getPageRect()
Return the page-level coordinates of this object.

Returns:
the page-level coordinates of this object

getRect

public Rectangle getRect()
Return the coordinates of this object.

Returns:
the coordinates of this object

redraw

public void redraw()
Causes the FormItem to be redrawn immediately with the new properties.

See Also:
setRedrawOnChange(Boolean)

getIconRect

public Rectangle getIconRect(FormItemIcon icon)

getIconPageRect

public Rectangle getIconPageRect(FormItemIcon icon)

getConfig

public JavaScriptObject getConfig()
Returns the FormItem's config object suitable for use in API's that set the editorType

Returns:
the config object

getEditorTypeConfig

public JavaScriptObject getEditorTypeConfig()

setTooltip

public void setTooltip(String tooltip)
This text is shown as a tooltip prompt when the cursor hovers over this item. Alias for setPrompt(java.lang.String).

Parameters:
tooltip - tooltip Default value is null

getTooltip

public String getTooltip()
This text is shown as a tooltip prompt when the cursor hovers over this item. Alias for getPrompt()

Returns:
String

setOptionFilterContext

public void setOptionFilterContext(RPCRequest rpcRequestProperties)
If this item has a specified optionDataSource, and this property is not null, this will be passed to the datasource as RPCRequest properties when performing the fetch operation on the dataSource to obtain a data-value to display-value mapping

Note : This is an advanced setting

Parameters:
rpcRequestProperties - optionFilterContext Default value is null

getOptionFilterContext

public RPCRequest getOptionFilterContext()
If this item has a specified optionDataSource, and this property is not null, this will be passed to the datasource as RPCRequest properties when performing the fetch operation on the dataSource to obtain a data-value to display-value mapping

Returns:
RPCRequest Properties

setOptionCriteria

public void setOptionCriteria(Criteria optionCriteria)
If this item has a specified optionDataSource, and this property may be used to specify criteria to pass to the datasource when performing the fetch operation on the dataSource to obtain a data-value to display-value mapping

Note : This is an advanced setting

Parameters:
optionCriteria - optionCriteria Default value is null

getOptionCriteria

public Criteria getOptionCriteria()
If this item has a specified optionDataSource, and this property may be used to specify criteria to pass to the datasource when performing the fetch operation on the dataSource to obtain a data-value to display-value mapping

Returns:
the option criteria

setShowIfCondition

public void setShowIfCondition(FormItemIfFunction showIf)
Expression that's evaluated to see if an item should be dynamically hidden. The showIf FormItemIfFunction is is evaluated whenever the form draws or redraws.

Parameters:
showIf - the showIf handler
See Also:
FormItem#setRedrawOnChange(boolean)

setErrorFormatter

public void setErrorFormatter(FormItemErrorFormatter errorFormatter)
Register a custom error formatter for this FormItem.

Parameters:
errorFormatter - the error formatter.

setInputTransformer

public void setInputTransformer(FormItemInputTransformer inputTransformer)
The transformer is called when a FormItem's value is about to change as the result of user interaction. This method fires after the user performed an action that would change the value of this field, and allows the developer to modify / reformat the value before it gets validated / saved. Fires before the change event.

Parameters:
inputTransformer - the input transformer

setItemHoverFormatter

public void setItemHoverFormatter(FormItemHoverFormatter hoverFormatter)
The FormItemHoverFormatter should return the HTML to display in a hover canvas when the user holds the mousepointer over this item. Return null to suppress the hover canvas altogether.

Parameters:
hoverFormatter - the hover formatter

setItemTitleHoverFormatter

public void setItemTitleHoverFormatter(FormItemHoverFormatter hoverFormatter)
The FormItemHoverFormatter should return the HTML to display in a hover canvas when the user holds the mouse pointer over this item's title and the title is clipped. Return null to suppress the hover canvas altogether.

Parameters:
hoverFormatter - the hover formatter
See Also:
DynamicForm.titleClipped(com.smartgwt.client.widgets.form.fields.FormItem)

setTitleHoverFormatter

public void setTitleHoverFormatter(FormItemHoverFormatter hoverFormatter)
Synonym for setItemTitleHoverFormatter(FormItemHoverFormatter).

Parameters:
hoverFormatter - the hover formatter

setItemValueHoverFormatter

public void setItemValueHoverFormatter(FormItemHoverFormatter hoverFormatter)
The FormItemHoverFormatter should return the HTML to display in a hover canvas when the user holds the mouse pointer over this item's value and the value is clipped. Return null to suppress the hover canvas altogether.

Parameters:
hoverFormatter - the hover formatter
See Also:
valueClipped()

setValueHoverFormatter

public void setValueHoverFormatter(FormItemHoverFormatter hoverFormatter)
Synonym for setItemValueHoverFormatter(FormItemHoverFormatter).

Parameters:
hoverFormatter - the hover formatter

getForm

public DynamicForm getForm()
A reference to the FormItem's DynamicForm.

Note that you must treat this as a read-only reference to the from

Returns:
the form

getValue

public Object getValue()
Return the value tracked by this form item. If this item has multiple:true, then either null or a List or RecordList instance is returned.

Note that for FormItems that have a ValueMap or where a formatter has been defined, getValue() returns the underlying value of the FormItem, not the displayed value.

Returns:
value of this element

_getValue

public Object _getValue()

getValueAsRecordList

public RecordList getValueAsRecordList()

setValueFormatter

public void setValueFormatter(FormItemValueFormatter formatter)
Optional FormItemValueFormatter, if provided, is evaluated to get the display value to show for this form items underlying data value.

This provides a way to perform a more complex data to display value manipulation than a simple valueMap. Note that this method will not be applied to values displayed in a free-form text entry field (such as a TextItem or TextAreaItem), where an equivalent parser method would be required to convert a user-entered value back into a data value. Use setEditorValueFormatter(com.smartgwt.client.widgets.form.FormItemValueFormatter) and setEditorValueParser(com.smartgwt.client.widgets.form.FormItemValueParser) instead for these cases.

Parameters:
formatter - the FormItemValueFormatter

setEditorValueFormatter

public void setEditorValueFormatter(FormItemValueFormatter formatter)
An optional FormItemValueFormatter to map this item's current data value to a display value.

Note that this only applies to items which show a free-form entry area, such as a TextItem or TextAreaItem. For display values which will not be directly manipulated by the user, use setValueFormatter(com.smartgwt.client.widgets.form.FormItemValueFormatter) instead.

See also setEditorValueParser(com.smartgwt.client.widgets.form.FormItemValueParser).

Parameters:
formatter - the FormItemValueFormatter

setEditorValueParser

public void setEditorValueParser(FormItemValueParser valueParser)
An optional FormItemValueParser to map a user-entered display value to a data value for storage. This method only applies to form items which show a free-form text entry area, such at the TextItem or TextAreaItem.

See also com.smartgwt.client.widgets.form.fields.FormItem#formatEditorValue

Parameters:
valueParser - the FormItemValueParser

setValueIconMapper

public void setValueIconMapper(ValueIconMapper valueIconMapper)
Set the FormItem Value Icon mapper that allows the developer to specify the image source for an icon to be displayed for the current form item value. Takes precedence over setValueIcons(java.util.Map).

Parameters:
valueIconMapper - the valueIconMapper

setDisplayFormat

public void setDisplayFormat(DateDisplayFormat displayFormat)
Fields of type "date" or "time" will be edited using a DateItem or TimeItem by default.

However this can be overridden - for canEdit:false fields, a StaticTextItem is used by default, and the developer can always specify a custom editorType as well as data type.

For fields of type "date", set this property to a valid DateDisplayFormat to specify how the date should be formatted.
For fields of type "time", set this property to a valid timeFormatter to specify how the time should be formatted.
Note that if dateFormatter or timeFormatter are specified they will take precedence over this setting.

If this field is of type "date" and is editable, the inputFormat may be used to specify how user-edited date strings will be parsed.

Note : This is an advanced setting

Parameters:
displayFormat - displayFormat Default value is null
See Also:
setInputFormat(java.lang.String), setDateFormatter(com.smartgwt.client.types.DateDisplayFormat), setTimeFormatter(com.smartgwt.client.types.TimeDisplayFormat)

setDisplayFormat

public void setDisplayFormat(TimeFormatter displayFormat)
Fields of type "date" or "time" will be edited using a DateItem or TimeItem by default.

However this can be overridden - for canEdit:false fields, a StaticTextItem is used by default, and the developer can always specify a custom editorType as well as data type.

For fields of type "date", set this property to a valid DateDisplayFormat to specify how the date should be formatted.
For fields of type "time", set this property to a valid timeFormatter to specify how the time should be formatted.
Note that if dateFormatter or timeFormatter are specified they will take precedence over this setting.

If this field is of type "date" and is editable, the inputFormat may be used to specify how user-edited date strings will be parsed.

Note : This is an advanced setting

Parameters:
displayFormat - displayFormat Default value is null
See Also:
setInputFormat(java.lang.String), setDateFormatter(com.smartgwt.client.types.DateDisplayFormat), setTimeFormatter(com.smartgwt.client.types.TimeDisplayFormat)

setCanEditCriterionPredicate

public void setCanEditCriterionPredicate(FormItemCanEditCriterionPredicate predicate)
When a dynamic form is editing an advanced criteria object via DynamicForm.setValuesAsCriteria, this predicate is used to determine which sub-criteria apply to which form item(s).

This method will be called on each item, and passed the sub-criterion of the AdvancedCriteria object. It should return true if the item can edit the criterion, otherwise false. If it returns true, setValuesAsCriteria() will call FormItemCriterionSetter.setCriterion from the registered FormItemCriterionSetter to actually apply the criterion to the form item, and DynamicForm.getValuesAsCriteria can subsequently retrieve the edited criterion by calling FormItemCriterionGetter.getCriterion from the registered FormItemCriterionGetter.

Default implementation will return true if the criterion fieldName and operator match the fieldName and operator (or default operator) for this item.

Parameters:
predicate - the predicate to determine the form items that can edit the criterion in question
See Also:
CriteriaEditing overview and related methods

canEditCriterion

public final Boolean canEditCriterion(Criterion criterion)
Calls the canEditCriterion() method of the FormItemCanEditCriterionPredicate that is registered with this field.

Parameters:
criterion - sub-criterion from an AdvancedCriteria object
Returns:
return true if this item can edit the criterion in question.
See Also:
CriteriaEditing overview and related methods

setCriterionGetter

public void setCriterionGetter(FormItemCriterionGetter getter)
Provides a specialized criterion from this formItem when creating an AdvancedCriteria via DynamicForm.getValuesAsCriteria.

This API is provided to allow you to specify a more complex criterion than the "field-operator-value" criterions that are built-in. Note that the built-in behavior is generally quite flexible and powerful enough for most requirements. An example of a case where you might want to override this method is if you wanted to implement a date range selection (ie, date > x AND date < y) on a form that was combining its other criteria fields with an "or" operator.

Note that this method is part of the criteria editing subsystem: if overridden, it is likely that you will want to also override FormItem.hasAdvancedCriteria to ensure this method is called by the form, and to support editing of existing advanced criteria you may also need to set the FormItemCanEditCriterionPredicate and the FormItemCriterionSetter.

The default implementation will return a criterion including the form item value, fieldName and specified operator, or a default operator derived from the form item data type if no explicit operator is specified.

Parameters:
getter - provides a method to get a criterion object based on this field's current edited value(s).
See Also:
CriteriaEditing overview and related methods

getCriterion

public final Criterion getCriterion()
Calls the getCriterion() method of the FormItemCriterionGetter that is registered with this field.

Returns:
criterion object based on this fields current edited value(s).
See Also:
CriteriaEditing overview and related methods

getCriterion

public final Criterion getCriterion(TextMatchStyle textMatchStyle)
Calls the getCriterion() method of the FormItemCriterionGetter that is registered with this field.

Parameters:
textMatchStyle - If passed assume the textMatchStyle will be used when performing a fetch operation with these criteria. This may impact the criterion's operator property.
Returns:
criterion object based on this fields current edited value(s).
See Also:
CriteriaEditing overview and related methods

setCriterionSetter

public void setCriterionSetter(FormItemCriterionSetter setter)
Set the method to update this form item to reflect a criterion object from within an AdvancedCriteria. Called by DynamicForm.setValuesAsCriteria when the registered FormItemCanEditCriterionPredicate returns true for this item.

Default implementation simply calls FormItem.setValue with the value of the criterion passed in

Parameters:
setter - provides a method to update this field with the edited criterion

setCriterion

public final void setCriterion(Criterion criterion)
Calls the setCriterion() method of the FormItemCriterionSetter that is registered with this field.

Parameters:
criterion - criterion to edit

setAriaState

public void setAriaState(String stateName,
                         Object stateValue)
Set a specific ARIA state mapping for this formItem. Usually this does not need to manually set. See com.smartgwt.docs.Accessibility.

Parameters:
stateName -
stateValue -