Class FormItem
- All Implemented Interfaces:
- HasHandlers,- HasBlurHandlers,- HasChangedHandlers,- HasChangeHandlers,- HasClickHandlers,- HasDoubleClickHandlers,- HasEditorEnterHandlers,- HasEditorExitHandlers,- HasFocusHandlers,- HasIconClickHandlers,- HasIconKeyPressHandlers,- HasItemHoverHandlers,- HasKeyDownHandlers,- HasKeyPressHandlers,- HasKeyUpHandlers,- HasPendingStatusChangedHandlers,- HasPickerIconClickHandlers,- HasShowContextMenuHandlers,- HasTitleClickHandlers,- HasTitleDoubleClickHandlers,- HasTitleHoverHandlers,- HasValueHoverHandlers,- HasValueIconClickHandlers
- Direct Known Subclasses:
- BlurbItem,- CanvasItem,- CheckboxItem,- DateItem,- HeaderItem,- HiddenItem,- NativeCheckboxItem,- RadioGroupItem,- SelectItem,- SpacerItem,- StaticTextItem,- TextAreaItem,- TextItem,- TimeItem
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.
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic interfacestatic interface
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected booleanprotected Stringprotected booleanprotected static booleanFields inherited from class com.smartgwt.client.core.RefDataClassidFields inherited from class com.smartgwt.client.core.DataClassfactoryCreated, factoryProperties
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionaddBlurHandler(BlurHandler handler) Add a blur handler.addChangedHandler(ChangedHandler handler) Add a changed handler.addChangeHandler(ChangeHandler handler) Add a change handler.addClickHandler(ClickHandler handler) Add a click handler.addDoubleClickHandler(DoubleClickHandler handler) Add a doubleClick handler.addEditorEnterHandler(EditorEnterHandler handler) Add a editorEnter handler.addEditorExitHandler(EditorExitHandler handler) Add a editorExit handler.addFocusHandler(FocusHandler handler) Add a focus handler.addIcon(FormItemIcon icon) Adds aFormItemIconto this item.addIcon(FormItemIcon icon, int index) Adds aFormItemIconto this item.addIconClickHandler(IconClickHandler handler) Add a iconClick handler.Add a iconKeyPress handler.addItemHoverHandler(ItemHoverHandler handler) Add a itemHover handler.addKeyDownHandler(KeyDownHandler handler) Add a keyDown handler.addKeyPressHandler(KeyPressHandler handler) Add a keyPress handler.addKeyUpHandler(KeyUpHandler handler) Add a keyUp handler.Add a pendingStatusChanged handler.Add a pickerIconClick handler.Add a showContextMenu handler.addTitleClickHandler(TitleClickHandler handler) Add a titleClick handler.Add a titleDoubleClick handler.addTitleHoverHandler(TitleHoverHandler handler) Add a titleHover handler.addValueHoverHandler(ValueHoverHandler handler) Add a valueHover handler.Add a valueIconClick handler.voidManually sets this FormItem to the result offormulaortextFormula.static <T extends RefDataClass>
 TasSGWTComponent(JavaScriptObject jsObj) Returns the existing SGWT FormItem, or creates and returns one if none exist, associated with the suppliedJavaScriptObject.voidblurItem()Takes focus from this form item's focusable element.final BooleancanEditCriterion(Criterion criterion) Calls thecanEditCriterion()method of theFormItemCanEditCriterionPredicatethat is registered with this field.static voidchangeAutoChildDefaults(String autoChildName, Canvas defaults) Changes the defaults for Canvas AutoChildren namedautoChildName.static voidchangeAutoChildDefaults(String autoChildName, FormItem defaults) Changes the defaults for FormItem AutoChildren namedautoChildName.static voidchangePickerIconDefaults(FormItemIcon defaults) static StringcheckFormItemType(String editorType) voidClear all error messages for this itemvoidClear the value for this form item.voiddisable()Set this item to be disabled at runtime.voiddisableIcon(String icon) This method will disable some icon in this item'siconsarray, if it is currently enabled.voidenable()Set this item to be enabled at runtime.voidenableIcon(String icon) This method will enable some icon in this item'siconsarray, if it is currently disabled.protected final voidprotected final voidprotected final voiderrorIfNotCreated(String property) voidfocusAfterItem(boolean forward) Shifts focus to the next focusable element after this item, skipping any elements nested inside the tabbing group for this item, such as sub-elements, nested canvases in a CanvasItem, or icons.voidMove the keyboard focus into this item's focusable elementIf specified this governs the HTML accessKey for the item.getAlign()Alignment of this item in its cell.For a form that produces filter criteria (seeform.getValuesAsCriteria()), allows the user to type in simple expressions to cause filtering with that operator.If this form item has a specifiedoptionDataSourceandfetchMissingValuesis true, when the item value changes, a fetch will be performed against the optionDataSource to retrieve the related record ifdisplayFieldis specified and the new item value is not present in any valueMap explicitly specified on the item.A formItem showing apickerIconwill always write out a "control box" around the text box and picker icon.booleanIfheightis specified, should it be applied to the item's text box element?ARIA role of this formItem.getAttribute(String attribute) Returns attribute value as a StringgetAttributeAsBoolean(String property) Returns attribute value set as a Boolean.getAttributeAsBoolean(String property, boolean allowNull) Returns attribute value set as a Boolean.getAttributeAsDate(String property) Returns attribute value as a Date.getAttributeAsDouble(String property) Returns attribute as a Double.getAttributeAsFloat(String property) Returns attribute value as a Float.getAttributeAsInt(String property) Returns attribute value as an Integer.getAttributeAsJavaScriptObject(String property) Returns attribute value as a JavaScript Object.getAttributeAsObject(String property, JavaScriptObject convertToObject) getAttributeAsString(String property) Returns attribute value as a String.Should this item allow browser auto-completion of its value? Applies only to items based on native HTML form elements (TextItem,PasswordItem, etc), and will only have a user-visible impact for browsers where native autoComplete behavior is actually supported and enabled via user settings.String[]Set of autocompletion keywords to be used with the native "autocomplete" attribute, in accordance with the HTML5 Autofill specification.Form item input type - governs which keyboard should be displayed for mobile devices (supported on iPhone / iPad)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.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.If true, indicates that this FormItem is capable of editing "opaque" values, ie, objects that are more complex than simple primitive types like numbers, strings and dates.Is this form item focusable? Setting this property to true on an otherwise non-focusable element such as aStaticTextItemwill cause the item to be included in the page's tab order and respond to keyboard events.Indicates whether hovers can be shown for this item.booleanFor items showing a text value, should the user be able to select the text in this item?Should this item'siconsandpicker iconbe included in the page's tab order by default? If not explicitly set, this property will be derived fromDynamicForm.canTabToIcons.final CanvasgetCanvasAutoChild(String autoChildName) Returns theCanvasAutoChild namedautoChildNameif already created.If specified, this property will govern the height of the cell in which this form item is rendered.CSS style applied to the form item as a whole, including the text element, any icons, and any hint text for the item.Should this form item fire itschangehandler (and store its value in the form) on every keypress? Set tofalseto suppress the 'change' handler firing (and the value stored) on every keypress.Returns the JavaScript class name.If this item isread-onlyand is usingreadOnlyDisplayReadOnlyDisplayAppearance.STATIC, should the item value be clipped if it overflows the specified size of the item? If set, overrides the form-levelDynamicForm.clipStaticValuedefault.If the title for this form item is showing, and is too large for the available space should the title be clipped?Returns the FormItem's config object suitable for use in API's that set the editorTypeA Read-Only pointer to the Smart GWT canvas that holds this form item.Base CSS class name for a form item's "control box".final CriterionCalls thegetCriterion()method of theFormItemCriterionGetterthat is registered with this field.final CriteriongetCriterion(TextMatchStyle textMatchStyle) Calls thegetCriterion()method of theFormItemCriterionGetterthat is registered with this field.For text-based items, this method returns the index of the start of the current selection if the item currently has the focus (if no text is selected, this equates to the current position of the text editing cursor).getCustomState(FormItemElementType elementType, String derivedState) Optional method to retrieve a custom state suffix to append to the style name that is applied to some element of a formItem - seeFormItemBaseStylefor more information on how state-based FormItem style names are derived.dataPath for this item.Display format to use for date type values within this formItem.Applies only to fields of type "float" and enforces a minimum number of digits shown after the decimal point.Applies only to fields of type "float" and affects how many significant digits are shown.Default icon image source.The default search-operator for this item when it or its form allowfilter-expressions.Value used when no value is provided for this item.The destroyed attribute will be set to true if this item has been destroyed() Note that FormItem lifecycle is managed by the DynamicForm itself.Deprecated.Do not use this API.This text is shown as a tooltip prompt when the cursor hovers over this item and the item isdisabledorread-onlywithreadOnlyDisplay:disabled.If set, this item will display a value from another field to the user instead of showing the underlying data value for thefield name.Returns thedisplayFieldfor this item.Returns this item's value with any valueMap applied to it - the value as currently displayed to the user.getDisplayValue(String value) Returns this item's value with any valueMap applied to it - the value as currently displayed to the user.Custom CSS text to be applied to cells with pending edits that have not yet been submitted.Default class used to construct theEditProxyfor this component when the component isfirst placed into edit mode.Text to display when this form item has a null or undefined value.This property allows the developer to specify an icon to display when this item has no value.Whether this item should end the row it's in in the form layoutintHeight of the error icon, if we're showing icons when validation errors occur.URL of the image to show as an error icon, if we're showing icons when validation errors occur.intHeight of the error icon, if we're showing icons when validation errors occur.intWhenDynamicForm.showInlineErrorsandshowErrorTextare both true anderrorOrientationis "left" or "right", errorMessageWidth is the amount to reduce the width of the editor to accommodate the error message and icon.String[]Returns any validation errors for this field.Controls whether HTML item value(s) should be rendered or shown as HTML source.FormatStringused during exports for numeric or date formatting.Additional CSS-text that overrides the item'scontrolStyle, applying arbitrary custom styling to the outer control-table that contains both textBox and icons.Additional CSS-text that overrides the item'stextBoxStyle, applying arbitrary custom styling to the textBox.If this form item has a specifiedoptionDataSource, should the item ever perform a fetch against this dataSource to retrieve the related record.Return the name for the this formItem.If this form item is mapping data values to a display value by fetching records from a dataSource (seeoptionDataSource,displayFieldandfetchMissingValues), 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.For items with anoptionDataSource, this property specifies an explicit display field for records within the option dataSource.getForm()A reference to the FormItem's DynamicForm.FormatStringfor numeric or date formatting.final FormItemgetFormItemAutoChild(String autoChildName) Returns theFormItemAutoChild namedautoChildNameif already created.Formula to be used to calculate the numeric value of this FormItem.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).TabIndex for the form item within the page.If this formItem is part of aListGrid'sinline edit form, returns the number of the grid column this formItem is responsible for editing, but only if a row is currently being edited.If this formItem is part of aListGrid'sinline edit form, returns the number of the row currently being edited.intHeight of the FormItem.Height of the FormItem.Should this form item be hidden? Setting this property totrueon an item configuration will have the same effect as having ashowIf()implementation which returnsfalse.getHint()Specifies "hint" string to show next to the form item to indicate something to the user.CSS class for the "hint" string.Text alignment for text displayed in this item's hover canvas, if shown.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 specifiedthis.form.itemHoverDelaywill be used instead.This attribute gives users a way to pin this item's hover in place so they can interact with it (scroll it, click embedded links, etc).Option to specify a height for any hover shown for this item.Option to specify a height for any hover shown for this item.Opacity for any hover shown for this itemAllows interaction with hovers when the cursor is positioned over them.Explicit CSS Style for any hover shown for this item.Vertical text alignment for text displayed in this item's hover canvas, if shown.Option to specify a width for any hover shown for this item.Option to specify a width for any hover shown for this item.Given aFormItemIcon.name, returns theFormItemIconobject.Fallback base CSS class to apply to this item'siconsif they don't specify abaseStyleor provide a sprite-basedsrc stringthat specifies acssClass.intDefault height for form item icons.intHorizontal space (in px) to leave between form item icons.getIconPageRect(FormItemIcon icon) Default prompt (and tooltip-text) for icons.getIconRect(FormItemIcon icon) getIcons()An array of descriptor objects for icons to display in a line after this form item.Returns the desired tab-position of some icon with respect to other focusable sub-elements for this formItem.How should icons be aligned vertically for this form item.intDefault width for form item icons.getID()Global identifier for referring to the formItem in JavaScript.Prefix to apply to the beginning of anyvalueIconswhen determining the URL for the image.Suffix to apply to the end of anyvalueIconswhen determining the URL for the image.When true, indicates that changes to this item will cause an automatic save on adelay, as well as when the entire form is submitted.If set to true, this item's value will be saved immediately when its "editorExit" handler is fired.For fields of type"date", if this is an editable field such as aTextItem, this property allows you to specify theinputFormatapplied to the item.intgetLeft()Left coordinate of this item in pixels.intSpecifies a column span for an item inlinearMode, overriding the default value of "*" in that mode.Specifies a column span for an item inlinearMode, overriding the default value of "*" in that mode.intintintSpecifies a width for an item inlinearMode, overriding the default width of "*" in that mode.Specifies a width for an item inlinearMode, overriding the default width of "*" in that mode.If this item is being used to edit cells in a ListGrid (seeisInGrid()), this method returns the grid in question.Value shown in field whenfetchMissingValuesis active and a fetch is pending.WhenAutoTest.getElement()is used to parse locator strings generated byAutoTest.getLocator()for this form item, should the item be identified? If the locator has a specifiedname, it is considered to definitely locate the item and no fallback approach will be used.If this item is showing ahint, this setting specifies how much horizontal space is made available for rendering the hint text by default.If true, multiple values may be selected.If this item is displaying multiple values, this property will be the string that separates those values for display purposes.getName()Name for this form field.Text shown as the value in theoriginalValueMessagewhenshowOldValueInHoveris enabled, and when the value has been modified but was originally unset.OperatorIdto be used whenDynamicForm.getValuesAsCriteria()is called.If this item has a specifiedoptionDataSource, 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
 mappingIf set, this FormItem will map stored values to display values as though acom.smartgwt.client.types.ValueMapwere specified, by fetching records from the specifiedoptionDataSourceand extracting thevalueFieldanddisplayFieldin loaded records, to derive one valueMap entry per record loaded from the optionDataSource.If set, this FormItem will map stored values to display values as though acom.smartgwt.client.types.ValueMapwere specified, by fetching records from the specifiedoptionDataSourceand extracting thevalueFieldanddisplayFieldin loaded records, to derive one valueMap entry per record loaded from the optionDataSource.If this item has a specifiedoptionDataSource, and this property is
 not null, this will be passed to the datasource asRPCRequestproperties when
 performing the fetch operation on the dataSource to obtain a data-value to display-value
 mappingIf this item has a specifiedoptionDataSource, this attribute may be set to specify an explicitDSRequest.operationIdwhen performing a fetch against the option dataSource to pick up display value mapping.If this item has a specifiedoptionDataSource, this property determines the textMatchStyle to use when interpretating anyoptionCriteriaduring the fetch to map valueField values to displayField values.static FormItemgetOrCreateRef(JavaScriptObject jsObj) Message shown whenshowOldValueInHoveris enabled and the value has been modified.intReturns the drawn page-left coordinate of this form item in pixels.Return the page-level coordinates of this object.intReturns the drawn page-top coordinate of this form item in pixels.This method returns a Map of config properties suitable for use as the "defaults" attribute of aPaletteNode.The component that will be displayed whenshowPicker()is called due to a click on thepicker icon.static FormItemIcongetPickerIcon(PickerIconName pickerName) Returns aFormItemIconfor a standard picker with skin-specific settings.static FormItemIcongetPickerIcon(PickerIconName pickerName, FormItemIcon properties) Returns aFormItemIconfor a standard picker with skin-specific settings.IfshowPickerIconis true for this item, this property governs the size of the picker icon.IfshowPickerIconis true, this attribute specifies theFormItemIcon.nameapplied to the picker iconPrompt to show when the user hovers the mouse over the picker icon.IfshowPickerIconis true for this item, this block of properties will be applied to the pickerIcon.IfshowPickerIconis true for this item, this property governs thesrcof the picker icon image to be displayed.Base CSS class name for a form item's picker icon cell.Returns the desired tab-position of the picker icon with respect to other focusable sub-elements for this formItem.IfshowPickerIconis true for this item, this property governs the size of the picker icon.intReturns the specifiedheightof this formItem in pixels.intReturns the specifiedwidthof this formItem in pixels.CSS class name to apply to the print view of an item's text box if the item iscanEdit:false, withreadOnlyDisplay:static.Base CSS class name for a form item's text box element when getting printable HTML for the form.Base CSS stylename for a form item's title when generating print HTML for the item.This text is shown as a tooltip prompt when the cursor hovers over this item.For items showing a text value withcanEditset to false, should the user be able to select the text in the item?Modifiedcontrol styleto apply when this item isread-onlyand is usingreadOnlyDisplayReadOnlyDisplayAppearance.STATIC.If this item isread-only, how should this item be displayed to the user? If set, overrides the form-levelDynamicForm.readOnlyDisplaydefault.This text is shown as a tooltip prompt when the cursor hovers over this item and the item isread-only.Base text box style to apply when this item isread-onlyand is usingreadOnlyDisplayReadOnlyDisplayAppearance.STATIC.Criteria to be evaluated to determine whether this FormItem should be maderead-only.getRect()Return the coordinates of this object.If true, this item will cause the entire form to be redrawn when the item's "elementChanged" event is done firingIf 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.Whether a non-empty value is required for this field to pass validation.The required message for required field errors.Criteria to be evaluated to determine whether this FormItem should berequired.intNumber of rows that this item spansSet this to true to allow the parent form to save it's data when 'Enter' is pressed on this formItem andsaveOnEnteris true on the parent form.Get the name of the underlying SmartClient classGet the record returned from theoptionDataSourcewhenfetchMissingValuesis true, and the missing value is fetched.Allows theselectOnClickbehavior to be configured on a per-FormItem basis.Allows theselectOnFocusbehavior to be configured on a per-FormItem basis.Should this item's value be saved in the form's values and hence returned fromform.getValues()?booleanIf true and the title is clipped, then a hover containing the full title of this item is enabled.If true and the value is clipped, then a hover containing the full value of this item is enabled.For items that supportmultiple values, this causes distinct CSS styling to be applied to values that the user has unselected.When this item is disabled, should it be re-styled to indicate its disabled state?IfshowIconsOnFocusis true, should icons marked as disabled be shown on focus?IfshowPickerIconOnFocusis true, should the picker icon be shown on focus if it is disabled (as in a read-only item, for example?)showErrorIcons,showErrorText,errorOrientation, andshowErrorStylecontrol how validation errors are displayed when they are displayed inline in the form (next to the form item where there is a validation error).When set to true, this attribute renders theerror-iconinlinein the FormItem, next to other icons, instead of in a separate error-element outside of the item's main editor.showErrorIcons,showErrorText,errorOrientation, andshowErrorStylecontrol how validation errors are displayed when they are displayed inline in the form (next to the form item where there is a validation error).showErrorIcons,showErrorText,errorOrientation, andshowErrorStylecontrol how validation errors are displayed when they are displayed inline in the form (next to the form item where there is a validation error).When this item receives focus, should it be re-styled to indicate it has focus?If set to true, when an item has errors and is focused, an "ErrorFocused" suffix will appear on the stylename.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 formItemIconshowFocusedproperty.IfshowPickerIconis true for this item, should the picker icon show a focused image when the form item has focus?If a hint is defined for this form item, should it be shown?Set to false to suppress writing out anyiconsfor this item.Show theiconswhen the item gets focus, and hide them when it loses focus.For fields oftype:"image", if the field is non editable, and being displayed withreadOnlyDisplay:"static", should the value (URL) be displayed as text, or should an image be rendered?Causes the original value to be shown to the end user when the user hovers over the FormItem as such (when theFormItem.itemHover()event would fire).booleanWhen the user rolls over this item, should it be re-styled to indicate it has focus?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 formItemIconshowOverproperty.When set totrue, this property adds the optional "Pending" suffix to the CSS styles applied to the widget if the current value of the item differs from the value that would be restored by invokingDynamicForm.resetValues().Should we show a special 'picker'iconfor this form item? Picker icons are customizable viapickerIconProperties.Show the picker icon when the item gets focus, and hide it when it loses focus.booleanWhen this item is in RTL mode, should its style name include an "RTL" suffix?Should we show a title cell for this formItem?IfvalueIconsis set, this property may be set to show the valueIcon only and prevent the standard form item element or text from displayingWhether this item should always start a new row in the form layout.Height of the FormItem whencanEditis false andreadOnlyDisplayis "static".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.If specified, this overrides theDynamicForm.storeDisplayValuesproperty for this field.booleanDoes the current formItem support native cut and paste events?IfvalueIconsis set, this property may be set to prevent the value icons from showing up next to the form items valueIf enabled, whenever validation is triggered and a request to the server is required, user interactivity will be blocked until the request returns.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 of the text / content within this form item.Base CSS class name for a form item's text box element.Formula to be used to calculate the text value of this FormItem.Time-format to apply to date type values within this formItem.getTitle()User visible title for this form item.Alignment of this item's title in its cell.intNumber of columns that this item's title spans.On which side of this item should the title be placed.Base CSS class name for a regular form-item's title.Vertical alignment of this item's title in its cell.This text is shown as a tooltip prompt when the cursor hovers over this item.intgetTop()Top coordinate of this item in pixels.getType()The DynamicForm picks a field renderer based on the type of the field (and sometimes other attributes of the field).IfshowOveris true, setting this property to false will explicitly disable showing the "Over" state for the control table element of this item (if present).IfshowOveris true, setting this property to false will explicitly disable showing the "Over" state for the PickerIcon of this item (if present)IfshowOveris true, setting this property to false will explicitly disable showing the "Over" state for the TextBox element of this item.Should this form item always produce anAdvancedCriteriasub criterion object? When set to true, causeshasAdvancedCriteriato return true.By default,read-onlyfields use the same style name as editable fields for in-field hints, unless they aredisabledor configured to use a disabledReadOnlyDisplayAppearance.IfdisplayFieldis specified for a field, should the display value for the field be picked up from therecord currently being edited?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.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.Array of valid filtering operators (eg "greaterThan") that are legal for this FormItem.Vertical alignment of this item within its cell.getValue()Return the value tracked by this form item.Return the value tracked by this form item as a Float.Return the value tracked by this form item as an Integer.Return the value tracked by this form item as a Long.Custom CSS text to be applied to values that have been deleted, whenshowDeletionsis enabled.If this form item maps data values to display values by retrieving thedisplayFieldvalues from anoptionDataSource, this property denotes the the field to use as the underlying data value in records from the optionDataSource.
 If not explicitly supplied, the valueField name will be derived as described ingetValueFieldName().Getter method to retrieve thevalueFieldfor this item.IfvalueIconsis specified, use this property to specify a height for the value icon written out.intIf 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.intIf we're showing a value icon, this attribute governs the amount of space between the icon and the value text.intIfvalueIconsis specified, this property may be used to specify both the width and height of the icon written out.IfvalueIconsis specified, use this property to specify a width for the value icon written out.In a form, valueMaps are used for FormItem types that allow the user to pick from a limited set of values, such as aSelectItem.String[]See alsogetValueMap()Whether this item is currently visible.intOutput the drawn height for this item in pixels.intgetVisibleTitleWidth(Boolean labelOnly) Returns the visible width of this item's title in px.Criteria to be evaluated to determine whether this FormItem should be visible.intOutput the drawn width for this item in pixels.booleanGets whether a warning will be logged if the Framework replaces this SmartGWT FormItem (that wraps the SmartClient item instance) to more closely match the underlying item's type.static booleanGets whether, by default, a warning will be logged if the Framework replaces a SmartGWT FormItem (that wraps the SmartClient item instance) to more closely match the underlying item's type.intgetWidth()Width of the FormItem.Width of the FormItem.If this item is showing ahint, should the hint text be allowed to wrap? Setting this property tofalsewill render the hint on a single line without wrapping, expanding the width required to render the item if necessary.If this item isread-onlyand is usingreadOnlyDisplayReadOnlyDisplayAppearance.STATIC, should the item value wrap?If specified determines whether this items title should wrap.voidhandleWarnOnEditorTypeConversion(FormItem oldItem, FormItem newItem) Does this form item produce anAdvancedCriteriasub criterion object? If this method returns true,DynamicForm.getValuesAsCriteria()on the form containing this item will always return anAdvancedCriteriaobject, callingFormItemCriterionGetter.getCriterion()on each item to retrieve the individual criteria.booleanReturn whether this item currently has any validation errors as a result of a previous validation pass.voidhide()Hide this form item.voidThis method will hide some icon in this item'siconsarray, if it is currently visible.voidIf this item has a specifieddisplayField, the value displayed to the user for this item may be derived from another field.static booleanisAssignableFrom(Class<?> scClass) Whether the supplied class is a subclass ofcom.smartgwt.client.form.fields.FormItem.booleanfinal booleanbooleanIs the user performing a native "cut" event to modify the value of a freeform text field? This method may be invoked during change notification flow methods includingFormItem.change(),FormItem.changed()andFormItem.transformInput().Is this item disabled?isDrawn()Returns true if this item has been written out into the DOM.Returns true if this formItem has the keyboard focus.isInGrid()Returns true if this item'scontainerWidgetis aGridRendereror GridRenderer subclassbooleanIs the user performing a native "paste" event to modify the value of a freeform text field? This method may be invoked during change notification flow methods includingFormItem.change(),FormItem.changed()andFormItem.transformInput().Return true if the form item is currently visible.voidmapDisplayToValue(String value) Given a display value for this FormItem, return the underlying data value.mapValueToDisplay(Object value) mapValueToDisplay(Map value) Given a value for this FormItem, return the value to be displayed.voidredraw()Redraw this form item.voidRedraw this form item.booleanremoveIcon(String icon) Given an icon'sname, remove it from this item.voidselectedRecordChanged(ListGridRecord record) Notification method fired fordata bound itemswithfetchMissingValuesenabled when theselected recordis updated as a result of the value changing or a fetch for a new record completing.
 Note that a formItem with an optionDataSource may avoid fetching an associated record altogether in some cases.setAccessKey(String accessKey) If specified this governs the HTML accessKey for the item.Alignment of this item in its cell.setAllowExpressions(Boolean allowExpressions) For a form that produces filter criteria (seeform.getValuesAsCriteria()), allows the user to type in simple expressions to cause filtering with that operator.setAlwaysFetchMissingValues(Boolean alwaysFetchMissingValues) If this form item has a specifiedoptionDataSourceandfetchMissingValuesis true, when the item value changes, a fetch will be performed against the optionDataSource to retrieve the related record ifdisplayFieldis specified and the new item value is not present in any valueMap explicitly specified on the item.setAlwaysShowControlBox(Boolean alwaysShowControlBox) A formItem showing apickerIconwill always write out a "control box" around the text box and picker icon.setApplyAlignToText(boolean applyAlignToText) setApplyHeightToTextBox(Boolean applyHeightToTextBox) Ifheightis specified, should it be applied to the item's text box element?setAriaRole(String ariaRole) ARIA role of this formItem.voidsetAriaState(String stateName, Object stateValue) Set a specific ARIA state mapping for this form item.setAttribute(String attribute, boolean value) Set attribute value to a boolean.setAttribute(String attribute, double value) Set attribute value to a double.setAttribute(String attribute, double[] value) Set attribute value to a double array.setAttribute(String attribute, int value) Set attribute value to an int.setAttribute(String attribute, int[] value) Set attribute value to an int array.setAttribute(String attribute, long value) Set attribute value to a long.setAttribute(String attribute, JavaScriptObject value) Set attribute value to a JavaScriptObject.setAttribute(String attribute, BaseClass value) Set attribute value to a BaseClass.setAttribute(String attribute, BaseClass[] value) Set attribute value to a BaseClass array.setAttribute(String attribute, DataClass value) Set attribute value to a DataClass.setAttribute(String attribute, DataClass[] value) Set attribute value to a DataClass array.setAttribute(String attribute, ValueEnum[] value) Set attribute value to a ValueEnum array.setAttribute(String attribute, Boolean value) Set attribute value to a Boolean.setAttribute(String attribute, Double value) Set attribute value to a Double.setAttribute(String attribute, Float value) Set attribute value to a Float.setAttribute(String attribute, Integer value) Set attribute value to an Integer.setAttribute(String attribute, Integer[] value) Set attribute value to an Integer array.setAttribute(String attribute, String value) Set attribute value to a StringsetAttribute(String attribute, String[] value) Set attribute value to a String array.setAttribute(String attribute, Date value) Set attribute value to a Date.setAttribute(String attribute, Map value) Set attribute value to a Map.voidsetAutoChildConstructor(String autoChildName, String className) Sets the SmartClient constructor for the AutoChild namedautoChildName.voidsetAutoChildProperties(String autoChildName, EditProxy properties) Sets the properties for creating an AutoChild namedautoChildName.voidsetAutoChildProperties(String autoChildName, Canvas properties) Sets the properties for creating aCanvasAutoChild namedautoChildName.voidsetAutoChildProperties(String autoChildName, FormItem properties) Sets the properties for creating aFormItemAutoChild namedautoChildName.voidsetAutoChildVisibility(String autoChildName, boolean visible) Sets whether to create and show the AutoChild namedautoChildName.setAutoComplete(AutoComplete autoComplete) Should this item allow browser auto-completion of its value? Applies only to items based on native HTML form elements (TextItem,PasswordItem, etc), and will only have a user-visible impact for browsers where native autoComplete behavior is actually supported and enabled via user settings.setAutoCompleteKeywords(String... autoCompleteKeywords) Set of autocompletion keywords to be used with the native "autocomplete" attribute, in accordance with the HTML5 Autofill specification.setBrowserInputType(String browserInputType) Form item input type - governs which keyboard should be displayed for mobile devices (supported on iPhone / iPad)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.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.voidWhen a dynamic form is editing an advanced criteria object viaDynamicForm.setValuesAsCriteria, this predicate is used to determine which sub-criteria apply to which form item(s).setCanEditOpaqueValues(Boolean canEditOpaqueValues) If true, indicates that this FormItem is capable of editing "opaque" values, ie, objects that are more complex than simple primitive types like numbers, strings and dates.setCanFocus(Boolean canFocus) Is this form item focusable? Setting this property to true on an otherwise non-focusable element such as aStaticTextItemwill cause the item to be included in the page's tab order and respond to keyboard events.setCanHover(Boolean canHover) Indicates whether hovers can be shown for this item.setCanSelectText(boolean canSelectText) For items showing a text value, should the user be able to select the text in this item?setCanTabToIcons(Boolean canTabToIcons) Should this item'siconsandpicker iconbe included in the page's tab order by default? If not explicitly set, this property will be derived fromDynamicForm.canTabToIcons.setCellHeight(Integer cellHeight) If specified, this property will govern the height of the cell in which this form item is rendered.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.setChangeOnKeypress(Boolean changeOnKeypress) Should this form item fire itschangehandler (and store its value in the form) on every keypress? Set tofalseto suppress the 'change' handler firing (and the value stored) on every keypress.setClipStaticValue(Boolean clipStaticValue) If this item isread-onlyand is usingreadOnlyDisplayReadOnlyDisplayAppearance.STATIC, should the item value be clipped if it overflows the specified size of the item? If set, overrides the form-levelDynamicForm.clipStaticValuedefault.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?setColSpan(int colSpan) Number of columns that this item spans.setColSpan(String colSpan) Number of columns that this item spans.voidsetConfigOnly(boolean configOnly) setControlStyle(String controlStyle) Base CSS class name for a form item's "control box".setCriteriaField(String criteriaField) final voidsetCriterion(Criterion criterion) Calls thesetCriterion()method of theFormItemCriterionSetterthat is registered with this field.voidProvides a specialized criterion from this formItem when creating an AdvancedCriteria viaDynamicForm.getValuesAsCriteria.voidSet the method to update this form item to reflect a criterion object from within an AdvancedCriteria.voidDeprecated.Do not use CustomStateGetter; usecom.smartgwt.client.widgets.form.fields.FormItem.setStateCustomizerinsteadsetDataPath(String dataPath) dataPath for this item.setDateFormatter(DateDisplayFormat dateFormatter) Display format to use for date type values within this formItem.setDecimalPad(Integer decimalPad) Applies only to fields of type "float" and enforces a minimum number of digits shown after the decimal point.setDecimalPrecision(Integer decimalPrecision) Applies only to fields of type "float" and affects how many significant digits are shown.setDefaultIconSrc(String defaultIconSrc) Default icon image source.setDefaultOperator(OperatorId defaultOperator) The default search-operator for this item when it or its form allowfilter-expressions.static voidsetDefaultProperties(FormItem formItemProperties) Class level method to set the default properties of this class.setDefaultValue(Boolean defaultValue) Value used when no value is provided for this item.setDefaultValue(Double defaultValue) Value used when no value is provided for this item.setDefaultValue(Float defaultValue) Value used when no value is provided for this item.setDefaultValue(Integer defaultValue) Value used when no value is provided for this item.voidsetDefaultValue(Object value) setDefaultValue(String defaultValue) Value used when no value is provided for this item.setDefaultValue(Date defaultValue) Value used when no value is provided for this item.setDisabled(Boolean disabled) Whether this item is disabled.setDisabledHover(String disabledHover) This text is shown as a tooltip prompt when the cursor hovers over this item and the item isdisabledorread-onlywithreadOnlyDisplay:disabled.setDisableIconsOnReadOnly(Boolean disableIconsOnReadOnly) setDisplayField(String displayField) If set, this item will display a value from another field to the user instead of showing the underlying data value for thefield name.setDisplayFormat(DateDisplayFormat displayFormat) voidsetDisplayFormat(TimeFormatter displayFormat) voidsetEditorProperties(FormItem editorProperties) Set the defaultFormItemproperties to be used whenever this field is edited.voidsetEditorType(FormItem editorType) Deprecated.Renamed tosetEditorProperties(FormItem).voidsetEditorType(Class<? extends FormItem> editorType) Set the FormItem subclass to use when editing.voidsetEditorType(String editorType) Set the FormItem subclass to use when editing.voidsetEditorValueFormatter(FormItemValueFormatter formatter) An optionalFormItemValueFormatterto map this item's current data value to a display value.voidsetEditorValueParser(FormItemValueParser valueParser) An optionalFormItemValueParserto map a user-entered display value to a data value for storage.setEditPendingCSSText(String editPendingCSSText) Custom CSS text to be applied to cells with pending edits that have not yet been submitted.setEditProxyConstructor(String editProxyConstructor) Default class used to construct theEditProxyfor this component when the component isfirst placed into edit mode.setEmptyDisplayValue(String emptyDisplayValue) Text to display when this form item has a null or undefined value.setEmptyValueIcon(String emptyValueIcon) This property allows the developer to specify an icon to display when this item has no value.Whether this item should end the row it's in in the form layoutvoidsetErrorFormatter(FormItemErrorFormatter errorFormatter) Register a custom error formatter for this FormItem.setErrorIconHeight(int errorIconHeight) Height of the error icon, if we're showing icons when validation errors occur.setErrorIconProperties(FormItemIcon errorIconProperties) setErrorIconSrc(String errorIconSrc) URL of the image to show as an error icon, if we're showing icons when validation errors occur.setErrorIconWidth(int errorIconWidth) Height of the error icon, if we're showing icons when validation errors occur.setErrorMessageWidth(int errorMessageWidth) WhenDynamicForm.showInlineErrorsandshowErrorTextare both true anderrorOrientationis "left" or "right", errorMessageWidth is the amount to reduce the width of the editor to accommodate the error message and icon.voidsetErrorOrientation(FormErrorOrientation errorOrientation) IfshowInlineErrorsis true, where should the error icon and text appear relative to the form item itself.voidSets a validation error message for this field.voidSets multiple validation error messages for this field.setEscapeHTML(Boolean escapeHTML) Controls whether HTML item value(s) should be rendered or shown as HTML source.setExportFormat(String exportFormat) FormatStringused during exports for numeric or date formatting.setExtraControlTableCSS(String extraControlTableCSS) Additional CSS-text that overrides the item'scontrolStyle, applying arbitrary custom styling to the outer control-table that contains both textBox and icons.setExtraTextBoxCSS(String extraTextBoxCSS) Additional CSS-text that overrides the item'stextBoxStyle, applying arbitrary custom styling to the textBox.setFetchMissingValues(Boolean fetchMissingValues) If this form item has a specifiedoptionDataSource, should the item ever perform a fetch against this dataSource to retrieve the related record.setFilterLocally(Boolean filterLocally) If this form item is mapping data values to a display value by fetching records from a dataSource (seeoptionDataSource,displayFieldandfetchMissingValues), 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.setForeignDisplayField(String foreignDisplayField) For items with anoptionDataSource, this property specifies an explicit display field for records within the option dataSource.FormatStringfor numeric or date formatting.setFormula(UserFormula formula) Formula to be used to calculate the numeric value of this FormItem.setGlobalTabIndex(Integer globalTabIndex) TabIndex for the form item within the page.setHeight(int height) Height of the FormItem.Height of the FormItem.Should this form item be hidden? Setting this property totrueon an item configuration will have the same effect as having ashowIf()implementation which returnsfalse.Specifies "hint" string to show next to the form item to indicate something to the user.setHintStyle(String hintStyle) CSS class for the "hint" string.setHoverAlign(Alignment hoverAlign) Text alignment for text displayed in this item's hover canvas, if shown.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 specifiedthis.form.itemHoverDelaywill be used instead.setHoverFocusKey(String hoverFocusKey) This attribute gives users a way to pin this item's hover in place so they can interact with it (scroll it, click embedded links, etc).setHoverHeight(Integer hoverHeight) Option to specify a height for any hover shown for this item.setHoverHeight(String hoverHeight) Option to specify a height for any hover shown for this item.setHoverOpacity(Integer hoverOpacity) Opacity for any hover shown for this itemsetHoverPersist(HoverPersistMode hoverPersist) Allows interaction with hovers when the cursor is positioned over them.setHoverStyle(String hoverStyle) Explicit CSS Style for any hover shown for this item.setHoverVAlign(VerticalAlignment hoverVAlign) Vertical text alignment for text displayed in this item's hover canvas, if shown.setHoverWidth(Integer hoverWidth) Option to specify a width for any hover shown for this item.setHoverWidth(String hoverWidth) Option to specify a width for any hover shown for this item.setIconBaseStyle(String iconBaseStyle) Fallback base CSS class to apply to this item'siconsif they don't specify abaseStyleor provide a sprite-basedsrc stringthat specifies acssClass.voidsetIconDisabled(String icon, boolean disabled) Set an icon as enabled or disabled at runtime.setIconHeight(int iconHeight) Default height for form item icons.setIconHSpace(int iconHSpace) Horizontal space (in px) to leave between form item icons.setIconPrompt(String iconPrompt) Default prompt (and tooltip-text) for icons.setIcons(FormItemIcon... icons) An array of descriptor objects for icons to display in a line after this form item.voidsetIconShowOnFocus(String icon, Boolean showOnFocus) SetsFormItemIcon.showOnFocusfor the supplied icon, and causes that icon's visibility to be updated and the item redrawn as appropriate.setIconVAlign(VerticalAlignment iconVAlign) How should icons be aligned vertically for this form item.setIconWidth(int iconWidth) Default width for form item icons.Global identifier for referring to the formItem in JavaScript.setImageURLPrefix(String imageURLPrefix) Prefix to apply to the beginning of anyvalueIconswhen determining the URL for the image.setImageURLSuffix(String imageURLSuffix) Suffix to apply to the end of anyvalueIconswhen determining the URL for the image.setImplicitSave(Boolean implicitSave) When true, indicates that changes to this item will cause an automatic save on adelay, as well as when the entire form is submitted.setImplicitSaveOnBlur(Boolean implicitSaveOnBlur) If set to true, this item's value will be saved immediately when its "editorExit" handler is fired.voidsetInitHandler(FormItemInitHandler initHandler) Specify a notification method to fire when this formItem is initialized in JavaScript.setInputFormat(String inputFormat) For fields of type"date", if this is an editable field such as aTextItem, this property allows you to specify theinputFormatapplied to the item.voidsetInputTransformer(FormItemInputTransformer inputTransformer) The transformer is called when a FormItem's value is about to change as the result of user interaction.voidsetItemHoverFormatter(FormItemHoverFormatter hoverFormatter) The FormItemHoverFormatter should return the HTML to display in a hover canvas when the user holds the mousepointer over this item.voidsetItemTitleHoverFormatter(FormItemHoverFormatter hoverFormatter) TheFormItemHoverFormattershould 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.voidsetItemValueHoverFormatter(FormItemHoverFormatter hoverFormatter) TheFormItemHoverFormattershould 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.final voidsetLeft(int left) Left coordinate of this item in pixels.setLinearColSpan(int linearColSpan) Specifies a column span for an item inlinearMode, overriding the default value of "*" in that mode.setLinearColSpan(String linearColSpan) Specifies a column span for an item inlinearMode, overriding the default value of "*" in that mode.setLinearEndRow(int linearEndRow) setLinearEndRow(String linearEndRow) setLinearStartRow(int linearStartRow) setLinearStartRow(String linearStartRow) setLinearWidth(int linearWidth) Specifies a width for an item inlinearMode, overriding the default width of "*" in that mode.setLinearWidth(String linearWidth) Specifies a width for an item inlinearMode, overriding the default width of "*" in that mode.setLoadingDisplayValue(String loadingDisplayValue) Value shown in field whenfetchMissingValuesis active and a fetch is pending.setLocateItemBy(String locateItemBy) WhenAutoTest.getElement()is used to parse locator strings generated byAutoTest.getLocator()for this form item, should the item be identified? If the locator has a specifiedname, it is considered to definitely locate the item and no fallback approach will be used.setMinHintWidth(Integer minHintWidth) If this item is showing ahint, this setting specifies how much horizontal space is made available for rendering the hint text by default.setMultiple(Boolean multiple) If true, multiple values may be selected.setMultipleValueSeparator(String multipleValueSeparator) If this item is displaying multiple values, this property will be the string that separates those values for display purposes.Name for this form field.setNullOriginalValueText(String nullOriginalValueText) Text shown as the value in theoriginalValueMessagewhenshowOldValueInHoveris enabled, and when the value has been modified but was originally unset.voidsetNullProperty(String property) setOperator(OperatorId operator) OperatorIdto be used whenDynamicForm.getValuesAsCriteria()is called.voidsetOptionCriteria(Criteria optionCriteria) If this item has a specifiedoptionDataSource, 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
 mappingsetOptionDataSource(DataSource optionDataSource) If set, this FormItem will map stored values to display values as though acom.smartgwt.client.types.ValueMapwere specified, by fetching records from the specifiedoptionDataSourceand extracting thevalueFieldanddisplayFieldin loaded records, to derive one valueMap entry per record loaded from the optionDataSource.setOptionDataSource(String optionDataSource) If set, this FormItem will map stored values to display values as though acom.smartgwt.client.types.ValueMapwere specified, by fetching records from the specifiedoptionDataSourceand extracting thevalueFieldanddisplayFieldin loaded records, to derive one valueMap entry per record loaded from the optionDataSource.voidsetOptionFilterContext(RPCRequest rpcRequestProperties) If this item has a specifiedoptionDataSource, and this property is
 not null, this will be passed to the datasource asRPCRequestproperties when
 performing the fetch operation on the dataSource to obtain a data-value to display-value
 mappingsetOptionOperationId(String optionOperationId) If this item has a specifiedoptionDataSource, this attribute may be set to specify an explicitDSRequest.operationIdwhen performing a fetch against the option dataSource to pick up display value mapping.setOptionTextMatchStyle(TextMatchStyle optionTextMatchStyle) If this item has a specifiedoptionDataSource, this property determines the textMatchStyle to use when interpretating anyoptionCriteriaduring the fetch to map valueField values to displayField values.setOriginalValueMessage(String originalValueMessage) Message shown whenshowOldValueInHoveris enabled and the value has been modified.setPickerIconHeight(Integer pickerIconHeight) IfshowPickerIconis true for this item, this property governs the size of the picker icon.setPickerIconName(String pickerIconName) IfshowPickerIconis true, this attribute specifies theFormItemIcon.nameapplied to the picker iconsetPickerIconPrompt(String pickerIconPrompt) Prompt to show when the user hovers the mouse over the picker icon.setPickerIconProperties(FormItemIcon pickerIconProperties) IfshowPickerIconis true for this item, this block of properties will be applied to the pickerIcon.setPickerIconSrc(String pickerIconSrc) IfshowPickerIconis true for this item, this property governs thesrcof the picker icon image to be displayed.setPickerIconStyle(String pickerIconStyle) Base CSS class name for a form item's picker icon cell.setPickerIconWidth(Integer pickerIconWidth) IfshowPickerIconis true for this item, this property governs the size of the picker icon.setPrintReadOnlyTextBoxStyle(String printReadOnlyTextBoxStyle) CSS class name to apply to the print view of an item's text box if the item iscanEdit:false, withreadOnlyDisplay:static.setPrintTextBoxStyle(String printTextBoxStyle) Base CSS class name for a form item's text box element when getting printable HTML for the form.setPrintTitleStyle(String printTitleStyle) Base CSS stylename for a form item's title when generating print HTML for the item.This text is shown as a tooltip prompt when the cursor hovers over this item.voidsetProperty(String property, boolean value) voidsetProperty(String property, double value) voidsetProperty(String property, int value) voidsetProperty(String property, JavaScriptObject value) voidsetProperty(String property, String value) setReadOnlyCanSelectText(ReadOnlyDisplayAppearance... readOnlyCanSelectText) For items showing a text value withcanEditset to false, should the user be able to select the text in the item?setReadOnlyControlStyle(String readOnlyControlStyle) Modifiedcontrol styleto apply when this item isread-onlyand is usingreadOnlyDisplayReadOnlyDisplayAppearance.STATIC.setReadOnlyDisplay(ReadOnlyDisplayAppearance readOnlyDisplay) If this item isread-only, how should this item be displayed to the user? If set, overrides the form-levelDynamicForm.readOnlyDisplaydefault.setReadOnlyHover(String readOnlyHover) This text is shown as a tooltip prompt when the cursor hovers over this item and the item isread-only.setReadOnlyTextBoxStyle(String readOnlyTextBoxStyle) Base text box style to apply when this item isread-onlyand is usingreadOnlyDisplayReadOnlyDisplayAppearance.STATIC.setReadOnlyWhen(AdvancedCriteria readOnlyWhen) Criteria to be evaluated to determine whether this FormItem should be maderead-only.setRedrawOnChange(Boolean redrawOnChange) If true, this item will cause the entire form to be redrawn when the item's "elementChanged" event is done firingsetRejectInvalidValueOnChange(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.setRequired(Boolean required) Whether a non-empty value is required for this field to pass validation.setRequiredMessage(String requiredMessage) The required message for required field errors.setRequiredWhen(Criteria requiredWhen) Criteria to be evaluated to determine whether this FormItem should berequired.setRowSpan(int rowSpan) Number of rows that this item spanssetSaveOnEnter(Boolean saveOnEnter) Set this to true to allow the parent form to save it's data when 'Enter' is pressed on this formItem andsaveOnEnteris true on the parent form.voidsetScClassName(String scClassName) Set the name of the underlying SmartClient class.setSelectOnClick(Boolean selectOnClick) Allows theselectOnClickbehavior to be configured on a per-FormItem basis.setSelectOnFocus(Boolean selectOnFocus) Allows theselectOnFocusbehavior to be configured on a per-FormItem basis.setShouldSaveValue(Boolean shouldSaveValue) Should this item's value be saved in the form's values and hence returned fromform.getValues()?setShowClippedTitleOnHover(boolean showClippedTitleOnHover) If true and the title is clipped, then a hover containing the full title of this item is enabled.setShowClippedValueOnHover(Boolean showClippedValueOnHover) If true and the value is clipped, then a hover containing the full value of this item is enabled.setShowDeletions(Boolean showDeletions) For items that supportmultiple values, this causes distinct CSS styling to be applied to values that the user has unselected.setShowDisabled(Boolean showDisabled) When this item is disabled, should it be re-styled to indicate its disabled state?setShowDisabledIconsOnFocus(Boolean showDisabledIconsOnFocus) IfshowIconsOnFocusis true, should icons marked as disabled be shown on focus?setShowDisabledPickerIconOnFocus(Boolean showDisabledPickerIconOnFocus) IfshowPickerIconOnFocusis true, should the picker icon be shown on focus if it is disabled (as in a read-only item, for example?)setShowErrorIcon(Boolean showErrorIcon) showErrorIcons,showErrorText,errorOrientation, andshowErrorStylecontrol how validation errors are displayed when they are displayed inline in the form (next to the form item where there is a validation error).setShowErrorIconInline(Boolean showErrorIconInline) When set to true, this attribute renders theerror-iconinlinein the FormItem, next to other icons, instead of in a separate error-element outside of the item's main editor.setShowErrorStyle(Boolean showErrorStyle) showErrorIcons,showErrorText,errorOrientation, andshowErrorStylecontrol how validation errors are displayed when they are displayed inline in the form (next to the form item where there is a validation error).setShowErrorText(Boolean showErrorText) showErrorIcons,showErrorText,errorOrientation, andshowErrorStylecontrol how validation errors are displayed when they are displayed inline in the form (next to the form item where there is a validation error).setShowFocused(Boolean showFocused) When this item receives focus, should it be re-styled to indicate it has focus?setShowFocusedErrorState(Boolean showFocusedErrorState) If set to true, when an item has errors and is focused, an "ErrorFocused" suffix will appear on the stylename.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 formItemIconshowFocusedproperty.setShowFocusedPickerIcon(Boolean showFocusedPickerIcon) IfshowPickerIconis true for this item, should the picker icon show a focused image when the form item has focus?setShowHint(Boolean showHint) If a hint is defined for this form item, should it be shown?setShowIcons(Boolean showIcons) Set to false to suppress writing out anyiconsfor this item.setShowIconsOnFocus(Boolean showIconsOnFocus) Show theiconswhen the item gets focus, and hide them when it loses focus.voidsetShowIfCondition(FormItemIfFunction showIf) Expression that's evaluated to see if an item should be dynamically hidden.setShowImageAsURL(Boolean showImageAsURL) For fields oftype:"image", if the field is non editable, and being displayed withreadOnlyDisplay:"static", should the value (URL) be displayed as text, or should an image be rendered?setShowOldValueInHover(Boolean showOldValueInHover) Causes the original value to be shown to the end user when the user hovers over the FormItem as such (when theFormItem.itemHover()event would fire).setShowOver(boolean showOver) When the user rolls over this item, should it be re-styled to indicate it has focus?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 formItemIconshowOverproperty.setShowPending(Boolean showPending) When set totrue, this property adds the optional "Pending" suffix to the CSS styles applied to the widget if the current value of the item differs from the value that would be restored by invokingDynamicForm.resetValues().setShowPickerIcon(Boolean showPickerIcon) Should we show a special 'picker'iconfor this form item? Picker icons are customizable viapickerIconProperties.setShowPickerIconOnFocus(Boolean showPickerIconOnFocus) Show the picker icon when the item gets focus, and hide it when it loses focus.setShowRTL(boolean showRTL) When this item is in RTL mode, should its style name include an "RTL" suffix?setShowTitle(Boolean showTitle) Should we show a title cell for this formItem?setShowValueIconOnly(Boolean showValueIconOnly) IfvalueIconsis set, this property may be set to show the valueIcon only and prevent the standard form item element or text from displayingsetStartRow(Boolean startRow) Whether this item should always start a new row in the form layout.voidsetStateCustomizer(FormItem.StateCustomizer customizer) Specify a StateCustomizer to use for this formItem.setStaticHeight(Integer staticHeight) Height of the FormItem whencanEditis false andreadOnlyDisplayis "static".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.setStoreDisplayValues(Boolean storeDisplayValues) If specified, this overrides theDynamicForm.storeDisplayValuesproperty for this field.setSupportsCutPasteEvents(boolean supportsCutPasteEvents) Does the current formItem support native cut and paste events?setSuppressValueIcon(Boolean suppressValueIcon) IfvalueIconsis set, this property may be set to prevent the value icons from showing up next to the form items valuesetSynchronousValidation(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.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.setTextAlign(Alignment textAlign) Alignment of the text / content within this form item.setTextBoxStyle(String textBoxStyle) Base CSS class name for a form item's text box element.setTextFormula(UserSummary textFormula) Formula to be used to calculate the text value of this FormItem.setTimeFormatter(TimeDisplayFormat timeFormatter) Time-format to apply to date type values within this formItem.User visible title for this form item.setTitleAlign(Alignment titleAlign) Alignment of this item's title in its cell.setTitleColSpan(int titleColSpan) Number of columns that this item's title spans.voidsetTitleHoverFormatter(FormItemHoverFormatter hoverFormatter) Synonym forsetItemTitleHoverFormatter(FormItemHoverFormatter).setTitleOrientation(TitleOrientation titleOrientation) On which side of this item should the title be placed.setTitleStyle(String titleStyle) Base CSS class name for a regular form-item's title.setTitleVAlign(VerticalAlignment titleVAlign) Vertical alignment of this item's title in its cell.voidsetTooltip(String tooltip) This text is shown as a tooltip prompt when the cursor hovers over this item.setTop(int top) Top coordinate of this item in pixels.voidThe DynamicForm picks a field renderer based on the type of the field (and sometimes other attributes of the field).setUpdateControlOnOver(Boolean updateControlOnOver) IfshowOveris true, setting this property to false will explicitly disable showing the "Over" state for the control table element of this item (if present).setUpdatePickerIconOnOver(Boolean updatePickerIconOnOver) IfshowOveris true, setting this property to false will explicitly disable showing the "Over" state for the PickerIcon of this item (if present)setUpdateTextBoxOnOver(Boolean updateTextBoxOnOver) IfshowOveris true, setting this property to false will explicitly disable showing the "Over" state for the TextBox element of this item.setUseAdvancedCriteria(Boolean useAdvancedCriteria) Should this form item always produce anAdvancedCriteriasub criterion object? When set to true, causeshasAdvancedCriteriato return true.setUseDisabledHintStyleForReadOnly(Boolean useDisabledHintStyleForReadOnly) By default,read-onlyfields use the same style name as editable fields for in-field hints, unless they aredisabledor configured to use a disabledReadOnlyDisplayAppearance.setUseLocalDisplayFieldValue(Boolean useLocalDisplayFieldValue) IfdisplayFieldis specified for a field, should the display value for the field be picked up from therecord currently being edited?static voidsetUseObjectFactoryForTypeFallback(boolean useFallback) Configures whether we useObjectFactoryas a fallback for resolving editorType class names forsetEditorType(java.lang.String)if Reflection is not available for the type.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.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.setValidators(Validator... validators) Validators for this form item.setValidOperators(OperatorId... validOperators) Array of valid filtering operators (eg "greaterThan") that are legal for this FormItem.setVAlign(VerticalAlignment vAlign) Vertical alignment of this item within its cell.voidsetValue(boolean value) Set the value of the form item.voidsetValue(double value) Set the value of the form item.voidsetValue(int value) Set the value of the form item.voidSet the value of the form item as an object.voidSet the value of the form item.voidSet the value of the form item.setValueDeselectedCSSText(String valueDeselectedCSSText) Custom CSS text to be applied to values that have been deleted, whenshowDeletionsis enabled.setValueField(String valueField) If this form item maps data values to display values by retrieving thedisplayFieldvalues from anoptionDataSource, this property denotes the the field to use as the underlying data value in records from the optionDataSource.
 If not explicitly supplied, the valueField name will be derived as described ingetValueFieldName().voidsetValueFormatter(FormItemValueFormatter formatter) OptionalFormItemValueFormatter, if provided, is evaluated to get the display value to show for this form items underlying data value.voidsetValueHoverFormatter(FormItemHoverFormatter hoverFormatter) Synonym forsetItemValueHoverFormatter(FormItemHoverFormatter).setValueIconHeight(Integer valueIconHeight) IfvalueIconsis specified, use this property to specify a height for the value icon written out.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.voidsetValueIconMapper(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.setValueIconRightPadding(int valueIconRightPadding) If we're showing a value icon, this attribute governs the amount of space between the icon and the value text.voidsetValueIcons(Map valueIcons) Set the valueIcons for this item.setValueIconSize(int valueIconSize) IfvalueIconsis specified, this property may be used to specify both the width and height of the icon written out.setValueIconWidth(Integer valueIconWidth) IfvalueIconsis specified, use this property to specify a width for the value icon written out.setValueMap(String... valueMap) Set the valueMap for this item.setValueMap(Map valueMap) Set the valueMap for this item.setVisible(Boolean visible) Whether this item is currently visible.setVisibleWhen(AdvancedCriteria visibleWhen) Criteria to be evaluated to determine whether this FormItem should be visible.voidsetWarnOnEditorTypeConversion(boolean warn) Sets whether a warning will be logged if the Framework replaces this SmartGwt FormItem (that wraps the SmartClient item instance) to more closely match the underlying item's type whengetOrCreateRef()is called.static voidsetWarnOnEditorTypeConversionDefault(boolean warn) Sets whether, by default, a warning will be logged if the Framework replaces a SmartGWT FormItem (that wraps the SmartClient item instance) to more closely match the underlying item's type.setWidth(int width) Width of the FormItem.Width of the FormItem.setWrapHintText(Boolean wrapHintText) If this item is showing ahint, should the hint text be allowed to wrap? Setting this property tofalsewill render the hint on a single line without wrapping, expanding the width required to render the item if necessary.setWrapStaticValue(Boolean wrapStaticValue) If this item isread-onlyand is usingreadOnlyDisplayReadOnlyDisplayAppearance.STATIC, should the item value wrap?setWrapTitle(Boolean wrapTitle) If specified determines whether this items title should wrap.booleanIfheightis 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 accommodate any specified height.shouldFetchMissingValue(Object newValue) If this field has a specifiedoptionDataSource, should we perform a fetch against that dataSource to find the record that matches this field's value?Returns true if 'Enter' key presses in this formItem should allow a saveOnEnter: true parent form to save it's data.booleanshouldStopKeyPressBubbling(String keyName, int characterValue) Should some keypress event on this item be prevented from bubbling (such that the containing form and ancestors do not receive the event).voidshow()Show this form item.voidThis method will show some icon in this item'siconsarray, if it is not already visible.voidMethod to show a picker for this item.voidThis 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.voidstoreValue(Object value) Store (and optionally show) a value for this form item.voidstoreValue(Object value, Boolean showValue) Store (and optionally show) a value for this form item.voidUpdate the visual state of a FormItem to reflect any changes in state or any changes in style settings (e.g.validate()Validate this item.booleanIs the value clipped?Methods inherited from class com.smartgwt.client.data.FieldgetCanExport, getExportTitle, getPrimaryKey, getSortByField, setCanExport, setExportTitle, setPrimaryKey, setSortByFieldMethods inherited from class com.smartgwt.client.core.RefDataClassgetRef, getRef, internalSetIDMethods inherited from class com.smartgwt.client.core.DataClassapplyFactoryProperties, doAddHandler, fireEvent, getAttributeAsDoubleArray, getAttributeAsElement, getAttributeAsIntArray, getAttributeAsLong, getAttributeAsMap, getAttributeAsObject, getAttributeAsRecord, getAttributeAsStringArray, getAttributes, getHandlerCount, isFactoryCreated, setAttribute, setAttribute, setAttribute, setAttributeAsJavaObject, setFactoryCreatedMethods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.google.gwt.event.shared.HasHandlersfireEvent
- 
Field Details- 
scClassName
- 
configOnlyprotected boolean configOnly
- 
warnOnEditorTypeConversionDefaultprotected static boolean warnOnEditorTypeConversionDefault
- 
warnOnEditorTypeConversionprotected boolean warnOnEditorTypeConversion
 
- 
- 
Constructor Details- 
FormItempublic FormItem()
- 
FormItem
- 
FormItem
 
- 
- 
Method Details- 
getOrCreateRef
- 
getPaletteDefaultsThis method returns a Map of config properties suitable for use as the "defaults" attribute of aPaletteNode. Use it when you need to work with PaletteNodes indirectly, such when setting upTileRecords that will be used in aTilePalette. Seethe dev tools overviewfor examples of how to assemble and acquire a suitable defaults object when you are creating a PaletteNode indirectly
- 
changeAutoChildDefaultsChanges the defaults for Canvas AutoChildren namedautoChildName.- 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. For usage tips on this param, see- SGWTProperties.
- See Also:
 
- 
changeAutoChildDefaultsChanges the defaults for FormItem AutoChildren namedautoChildName.- 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. For usage tips on this param, see- SGWTProperties.
- See Also:
 
- 
changePickerIconDefaults
- 
setAccessKeyIf 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. - Internet Explorer (all platforms):
 Alt+ accessKey
- Mozilla Firefox (Windows, Unix): Alt+Shift+ accessKey
- Mozilla Firefox (Mac): Ctrl+Opt+ accessKey
- Chrome and
 Safari (Windows, Unix):  Alt+ accessKey
- Chrome and Safari (Mac): 
 Ctrl+Opt+ accessKey
 
- Internet Explorer (all platforms):
 
- 
getAccessKeyIf 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. - Internet Explorer (all platforms):
 Alt+ accessKey
- Mozilla Firefox (Windows, Unix): Alt+Shift+ accessKey
- Mozilla Firefox (Mac): Ctrl+Opt+ accessKey
- Chrome and
 Safari (Windows, Unix):  Alt+ accessKey
- Chrome and Safari (Mac): 
 Ctrl+Opt+ accessKey
 - Returns:
- Current accessKey value. Default value is null
- See Also:
 
- Internet Explorer (all platforms):
 
- 
setAlignAlignment of this item in its cell. Note that the alignment of text / content within this item is controlled separately viatextAlign(typicallytextAlignapplies to items showing a "textBox", such as aTextItemorSelectItem, as well as text-only form item types such asStaticTextItemandHeaderItem). IfapplyAlignToTextis true, then thetextAlignsetting, if unset, will default to thealignsetting if set.- Parameters:
- align- New align value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getAlignAlignment of this item in its cell. Note that the alignment of text / content within this item is controlled separately viatextAlign(typicallytextAlignapplies to items showing a "textBox", such as aTextItemorSelectItem, as well as text-only form item types such asStaticTextItemandHeaderItem). IfapplyAlignToTextis true, then thetextAlignsetting, if unset, will default to thealignsetting if set.- Returns:
- Current align value. Default value is null
- See Also:
 
- 
setAllowExpressionsFor a form that produces filter criteria (seeform.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 operatorthat will be used.Prefix Operator < lessThan > greaterThan <= lessThanOrEqual >= greaterThanOrEqual someValue...someValue betweenInclusive ! notEqual ^ startsWith | endsWith !^ notStartsWith plus logical not !@ notEndsWith plus logical not ~ contains !~ notContains $ isBlank !$ notBlank # isNull !# isNotNull == exact match (for fields where 'contains' is the default) Two further special notations are allowed: - /regex/ means the value is taken as a regular expression and applied via the "regexp" operator
- =.fieldName means the value should match the value of another field. Either the user-visible title of the field (field.title) or the field's name (field.name) may be used.
 In all cases, if an operator is disallowed for the field (via field.validOperatorsat 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 operatoris used, or ifformItem.operatoris unspecified, a default operator chosen as described underoperator.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 allowExpressionbehavior can be enabled for every field in a form viaDynamicForm.allowExpressions.Finally, note that, like operator, enablingallowExpressions:truecausesform.getValuesAsCriteria()) to returnAdvancedCriteria.- Parameters:
- allowExpressions- New allowExpressions value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getAllowExpressionsFor a form that produces filter criteria (seeform.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 operatorthat will be used.Prefix Operator < lessThan > greaterThan <= lessThanOrEqual >= greaterThanOrEqual someValue...someValue betweenInclusive ! notEqual ^ startsWith | endsWith !^ notStartsWith plus logical not !@ notEndsWith plus logical not ~ contains !~ notContains $ isBlank !$ notBlank # isNull !# isNotNull == exact match (for fields where 'contains' is the default) Two further special notations are allowed: - /regex/ means the value is taken as a regular expression and applied via the "regexp" operator
- =.fieldName means the value should match the value of another field. Either the user-visible title of the field (field.title) or the field's name (field.name) may be used.
 In all cases, if an operator is disallowed for the field (via field.validOperatorsat 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 operatoris used, or ifformItem.operatoris unspecified, a default operator chosen as described underoperator.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 allowExpressionbehavior can be enabled for every field in a form viaDynamicForm.allowExpressions.Finally, note that, like operator, enablingallowExpressions:truecausesform.getValuesAsCriteria()) to returnAdvancedCriteria.- Returns:
- Current allowExpressions value. Default value is null
- See Also:
 
- 
setAlwaysFetchMissingValuesIf this form item has a specifiedoptionDataSourceandfetchMissingValuesis true, when the item value changes, a fetch will be performed against the optionDataSource to retrieve the related record ifdisplayFieldis 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 displayFieldis 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 formatValue()orformatEditorValue()were written to display properties from theselected 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 invalidateDisplayValueCache()Note : This is an advanced setting - Parameters:
- alwaysFetchMissingValues- New alwaysFetchMissingValues value. Default value is false
- Returns:
- FormIteminstance, for chaining setter calls
 
- 
getAlwaysFetchMissingValuesIf this form item has a specifiedoptionDataSourceandfetchMissingValuesis true, when the item value changes, a fetch will be performed against the optionDataSource to retrieve the related record ifdisplayFieldis 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 displayFieldis 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 formatValue()orformatEditorValue()were written to display properties from theselected 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 invalidateDisplayValueCache()- Returns:
- Current alwaysFetchMissingValues value. Default value is false
 
- 
setAlwaysShowControlBoxA formItem showing apickerIconwill always write out a "control box" around the text box and picker icon. This is an HTML element styled using the specifiedcontrolStyle.This attribute controls whether the control box should be written out even if the picker icon is not being shown. If unset, default behavior will write out a control table if showPickerIconis true and the icon is not suppressed viaFormItemIcon.showIf(). This means the control table can be written out with no visible picker ifshowPickerIconOnFocusis true and the item does not have focus.This attribute is useful for developers who wish to rely on styling specified via the controlStyleeven while the picker icon is not visible.See the form item styling overviewfor details of the control table and other styling options.Note : This is an advanced setting - Parameters:
- alwaysShowControlBox- New alwaysShowControlBox value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
 
- 
getAlwaysShowControlBoxA formItem showing apickerIconwill always write out a "control box" around the text box and picker icon. This is an HTML element styled using the specifiedcontrolStyle.This attribute controls whether the control box should be written out even if the picker icon is not being shown. If unset, default behavior will write out a control table if showPickerIconis true and the icon is not suppressed viaFormItemIcon.showIf(). This means the control table can be written out with no visible picker ifshowPickerIconOnFocusis true and the item does not have focus.This attribute is useful for developers who wish to rely on styling specified via the controlStyleeven while the picker icon is not visible.See the form item styling overviewfor details of the control table and other styling options.- Returns:
- Current alwaysShowControlBox value. Default value is null
 
- 
setApplyAlignToTextIf thetextAlignis unset, should thealignsetting, if set, be used for this item'stextAlign?applyAlignToTextdefaults to false for most form item types. It defaults to true forStaticTextItemandHeaderItem, which are text-based form item types that do not have a natural distinction between the item and its cell.Note : This is an advanced setting - Parameters:
- applyAlignToText- New applyAlignToText value. Default value is false
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getApplyAlignToTextpublic boolean getApplyAlignToText()If thetextAlignis unset, should thealignsetting, if set, be used for this item'stextAlign?applyAlignToTextdefaults to false for most form item types. It defaults to true forStaticTextItemandHeaderItem, which are text-based form item types that do not have a natural distinction between the item and its cell.- Returns:
- Current applyAlignToText value. Default value is false
- See Also:
 
- 
setApplyHeightToTextBoxIfheightis specified, should it be applied to the item's text box element?If unset, behavior is determined as described in shouldApplyHeightToTextBox()Note : This is an advanced setting - Parameters:
- applyHeightToTextBox- New applyHeightToTextBox value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
 
- 
getApplyHeightToTextBoxIfheightis specified, should it be applied to the item's text box element?If unset, behavior is determined as described in shouldApplyHeightToTextBox()- Returns:
- Current applyHeightToTextBox value. Default value is null
 
- 
setAriaRoleARIA role of this formItem. Usually does not need to be manually set - seeAccessibility.Note : This is an advanced setting - Parameters:
- ariaRole- New ariaRole value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getAriaRoleARIA role of this formItem. Usually does not need to be manually set - seeAccessibility.- Returns:
- Current ariaRole value. Default value is null
- See Also:
 
- 
setAutoCompleteShould this item allow browser auto-completion of its value? Applies only to items based on native HTML form elements (TextItem,PasswordItem, etc), and will only have a user-visible impact for browsers where native autoComplete behavior is actually supported and enabled via user settings.Alternatively, autoCompleteKeywordscan be specified, in which case this setting is ignored. IfautoCompleteKeywordsare not provided, andautoCompleteis not set on this FormItem, the value ofDynamicForm.autoCompleteis used.Note that even with this value set to "none", native browser auto-completion may occur for log in forms (forms containing username andpasswordfields). This behavior varies by browser, and is a result of an intentional change by some browser developers to disregard the HTML setting autocomplete=off for password items or log-in forms.In some browsers any form redraw (including a redraw from a call to DynamicForm.setValues()) will re-populate the form with the natively remembered login credentials. This can make it very difficult to control the values displayed to the user, as a call to 'setValues()' may appear to be ignored. While behavior varies by browser we have specifically observed this behavior in Safari. Moreover in this browser, if the user asks the browser to remember login credentials for a URL, any form with a password item and a text item may be auto-filled with the remembered login credentials, even if the form's configuration and field names differ from those on the login form.If an application has both an initial log in form, and a separate form within the application which makes contains a Password item (a use case might be an interface for a user with manager privileges for modifying other users' passwords), this will cause the second form to autofill with unexpected values. Should this arise, developers can avoid this by making the initial log in interface into a separate log in page from the main application page. This is often good practice in any case for reasons outlined in the "Authentication" section of the Quick Start guide. - Parameters:
- autoComplete- New autoComplete value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getAutoCompleteShould this item allow browser auto-completion of its value? Applies only to items based on native HTML form elements (TextItem,PasswordItem, etc), and will only have a user-visible impact for browsers where native autoComplete behavior is actually supported and enabled via user settings.Alternatively, autoCompleteKeywordscan be specified, in which case this setting is ignored. IfautoCompleteKeywordsare not provided, andautoCompleteis not set on this FormItem, the value ofDynamicForm.autoCompleteis used.Note that even with this value set to "none", native browser auto-completion may occur for log in forms (forms containing username andpasswordfields). This behavior varies by browser, and is a result of an intentional change by some browser developers to disregard the HTML setting autocomplete=off for password items or log-in forms.In some browsers any form redraw (including a redraw from a call to DynamicForm.setValues()) will re-populate the form with the natively remembered login credentials. This can make it very difficult to control the values displayed to the user, as a call to 'setValues()' may appear to be ignored. While behavior varies by browser we have specifically observed this behavior in Safari. Moreover in this browser, if the user asks the browser to remember login credentials for a URL, any form with a password item and a text item may be auto-filled with the remembered login credentials, even if the form's configuration and field names differ from those on the login form.If an application has both an initial log in form, and a separate form within the application which makes contains a Password item (a use case might be an interface for a user with manager privileges for modifying other users' passwords), this will cause the second form to autofill with unexpected values. Should this arise, developers can avoid this by making the initial log in interface into a separate log in page from the main application page. This is often good practice in any case for reasons outlined in the "Authentication" section of the Quick Start guide. - Returns:
- Current autoComplete value. Default value is null
- See Also:
 
- 
setAutoCompleteKeywordsSet of autocompletion keywords to be used with the native "autocomplete" attribute, in accordance with the HTML5 Autofill specification.When autoCompleteKeywords are provided, the autoCompletesetting is ignored.- Parameters:
- autoCompleteKeywords- New autoCompleteKeywords value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
 
- 
getAutoCompleteKeywordsSet of autocompletion keywords to be used with the native "autocomplete" attribute, in accordance with the HTML5 Autofill specification.When autoCompleteKeywords are provided, the autoCompletesetting is ignored.- Returns:
- Current autoCompleteKeywords value. Default value is null
 
- 
setBrowserInputTypeForm item input type - governs which keyboard should be displayed for mobile devices (supported on iPhone / iPad)Note : This is an advanced setting - Parameters:
- browserInputType- New browserInputType value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
 
- 
getBrowserInputTypeForm item input type - governs which keyboard should be displayed for mobile devices (supported on iPhone / iPad)- Returns:
- Current browserInputType value. Default value is null
 
- 
setBrowserSpellCheckIf 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- New browserSpellCheck value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getBrowserSpellCheckIf 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:
- Current browserSpellCheck value. Default value is null
- See Also:
 
- 
setCanEditIs 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 thesetCanEdit()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 theDynamicForm.canEditFieldAttributeon the associated dataSource field.Developers should also be aware that the readOnlyDisplayattribute is unrelated to theDataSourceField.readOnlyEditorTypeattribute. When a DynamicForm is first bound to a dataSource, forcanEdit:falseDataSourceFields,DataSourceField.readOnlyEditorTypewill determine whatFormItemTypeshould be created for the field. Once created, a FormItem's type can not be changed. SettingcanEditat runtime will simply change the appearance of the item to allow or disallow editing of the item.Note that this property may validly be nullas a distinct state fromfalse. SeeDynamicForm.fieldIsEditable()for an API that will always returntrueorfalseand give a definitive answer as to whether editing is possible.
 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 viareadOnlyDisplay.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.- Overrides:
- setCanEditin class- Field
- Parameters:
- canEdit- Can this form item be edited?. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getCanEditIs 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 thesetCanEdit()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 theDynamicForm.canEditFieldAttributeon the associated dataSource field.Developers should also be aware that the readOnlyDisplayattribute is unrelated to theDataSourceField.readOnlyEditorTypeattribute. When a DynamicForm is first bound to a dataSource, forcanEdit:falseDataSourceFields,DataSourceField.readOnlyEditorTypewill determine whatFormItemTypeshould be created for the field. Once created, a FormItem's type can not be changed. SettingcanEditat runtime will simply change the appearance of the item to allow or disallow editing of the item.Note that this property may validly be nullas a distinct state fromfalse. SeeDynamicForm.fieldIsEditable()for an API that will always returntrueorfalseand give a definitive answer as to whether editing is possible.- Overrides:
- getCanEditin class- Field
- 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. Important note: this method is not intended as an override point to make an item conditionally read-only. It is not called at the appropriate times to serve as a dynamic control over editability. Developers may instead use readOnlyWhen rulesto dynamically control editability of items. Default value is null
- See Also:
 
- 
setCanEditOpaqueValuesIf true, indicates that this FormItem is capable of editing "opaque" values, ie, objects that are more complex than simple primitive types like numbers, strings and dates. Ordinarily, you use theSimpleType systemto convert these opaque values into "atomic" values that can be edited by the built-in editors likeTextItem. However, sometimes you to create a custom editor that knows how to edit a particular opaque type in a domain-specific way - for example, a composite custom FormItem that allows the user to edit both a number and a currency code, both of which are needed to make a proper monetary amount (for that particular application). When this value is set, the FormItem will manage the opaque value directly, rather than it being filtered through calls togetAtomicValue()andupdateAtomicValue(). Note, if you set this flag on a FormItem that does not have the ability to edit an opaque value (which is something that must be custom-coded) then you will get garbage in your editor, if not an outright crash.Note : This is an advanced setting - Parameters:
- canEditOpaqueValues- New canEditOpaqueValues value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
 
- 
getCanEditOpaqueValuesIf true, indicates that this FormItem is capable of editing "opaque" values, ie, objects that are more complex than simple primitive types like numbers, strings and dates. Ordinarily, you use theSimpleType systemto convert these opaque values into "atomic" values that can be edited by the built-in editors likeTextItem. However, sometimes you to create a custom editor that knows how to edit a particular opaque type in a domain-specific way - for example, a composite custom FormItem that allows the user to edit both a number and a currency code, both of which are needed to make a proper monetary amount (for that particular application). When this value is set, the FormItem will manage the opaque value directly, rather than it being filtered through calls togetAtomicValue()andupdateAtomicValue(). Note, if you set this flag on a FormItem that does not have the ability to edit an opaque value (which is something that must be custom-coded) then you will get garbage in your editor, if not an outright crash.- Returns:
- Current canEditOpaqueValues value. Default value is null
 
- 
setCanFocusIs this form item focusable? Setting this property to true on an otherwise non-focusable element such as aStaticTextItemwill cause the item to be included in the page's tab order and respond to keyboard events.Note : This is an advanced setting 
- 
getCanFocusIs this form item focusable? Setting this property to true on an otherwise non-focusable element such as aStaticTextItemwill 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),CanvasItemswith a focusable canvas, or items wherecanFocuswas explicitly set to true. Default value is null
- See Also:
 
- 
setCanHoverIndicates whether hovers can be shown for this item. When set to false, suppresses all hovers, including those for theitem in general, or for itsvalueortitle.For finer control over suppressing hovers, see itemHover,titleHoverandvalueHover.- Parameters:
- canHover- New canHover value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getCanHoverIndicates whether hovers can be shown for this item. When set to false, suppresses all hovers, including those for theitem in general, or for itsvalueortitle.For finer control over suppressing hovers, see itemHover,titleHoverandvalueHover.- Returns:
- Current canHover value. Default value is null
- See Also:
 
- 
setCanSelectTextFor items showing a text value, should the user be able to select the text in this item?For canEdit:falseitems, seereadOnlyCanSelectText- Parameters:
- canSelectText- New canSelectText value. Default value is true
- Returns:
- FormIteminstance, for chaining setter calls
 
- 
getCanSelectTextpublic boolean getCanSelectText()For items showing a text value, should the user be able to select the text in this item?For canEdit:falseitems, seereadOnlyCanSelectText- Returns:
- Current canSelectText value. Default value is true
 
- 
setCanTabToIconsShould this item'siconsandpicker iconbe included in the page's tab order by default? If not explicitly set, this property will be derived fromDynamicForm.canTabToIcons.Developers may also suppress tabbing to individual icons by setting FormItemIcon.tabIndexto-1.Note that if this form item has tabIndex -1, neither the form item nor the icons will be included in the page's tab order. Note : This is an advanced setting - Parameters:
- canTabToIcons- New canTabToIcons value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
 
- 
getCanTabToIconsShould this item'siconsandpicker iconbe included in the page's tab order by default? If not explicitly set, this property will be derived fromDynamicForm.canTabToIcons.Developers may also suppress tabbing to individual icons by setting FormItemIcon.tabIndexto-1.Note that if this form item has tabIndex -1, neither the form item nor the icons will be included in the page's tab order. - Returns:
- Current canTabToIcons value. Default value is null
 
- 
setCellHeightIf specified, this property will govern the height of the cell in which this form item is rendered. Will not apply when the containing DynamicForm setsitemLayout:"absolute".- Parameters:
- cellHeight- New cellHeight value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getCellHeightIf specified, this property will govern the height of the cell in which this form item is rendered. Will not apply when the containing DynamicForm setsitemLayout:"absolute".- Returns:
- Current cellHeight value. Default value is null
- See Also:
 
- 
setCellStyleCSS 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.See FormItemStylingfor an overview of formItem styling, and theCompoundFormItem_skinningdiscussion for special skinning considerations.
 If this method is called after the component has been drawn/initialized: Setter forcellStyle.- Parameters:
- cellStyle- the new- cellStylevalue. Default value is "formCell"
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getCellStyleCSS 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.See FormItemStylingfor an overview of formItem styling, and theCompoundFormItem_skinningdiscussion for special skinning considerations.- Returns:
- Current cellStyle value. Default value is "formCell"
- See Also:
 
- 
setChangeOnKeypressShould this form item fire itschangehandler (and store its value in the form) on every keypress? Set tofalseto suppress the 'change' handler firing (and the value stored) on every keypress.Note: If false, the value returned bygetValuewill not reflect the value displayed in the form item element as long as focus is in the form item element.- Parameters:
- changeOnKeypress- New changeOnKeypress value. Default value is true
- Returns:
- FormIteminstance, for chaining setter calls
 
- 
getChangeOnKeypressShould this form item fire itschangehandler (and store its value in the form) on every keypress? Set tofalseto suppress the 'change' handler firing (and the value stored) on every keypress.Note: If false, the value returned bygetValuewill not reflect the value displayed in the form item element as long as focus is in the form item element.- Returns:
- Current changeOnKeypress value. Default value is true
 
- 
setClipStaticValueIf this item isread-onlyand is usingreadOnlyDisplayReadOnlyDisplayAppearance.STATIC, should the item value be clipped if it overflows the specified size of the item? If set, overrides the form-levelDynamicForm.clipStaticValuedefault.- Parameters:
- clipStaticValue- New clipStaticValue value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getClipStaticValueIf this item isread-onlyand is usingreadOnlyDisplayReadOnlyDisplayAppearance.STATIC, should the item value be clipped if it overflows the specified size of the item? If set, overrides the form-levelDynamicForm.clipStaticValuedefault.- Returns:
- Current clipStaticValue value. Default value is null
- See Also:
 
- 
setClipTitleIf 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 DynamicForm.clipItemTitles.- Parameters:
- clipTitle- New clipTitle value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
 
- 
getClipTitleIf 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 DynamicForm.clipItemTitles.- Returns:
- Current clipTitle value. Default value is null
 
- 
getContainerWidgetA Read-Only pointer to the Smart GWT canvas that holds this form item. In most cases this will be theDynamicFormcontaining the item but in some cases editable components handle writing out form items directly. An example of this isGrid Editing- when a listGrid shows per-field editors, thecontainerWidgetfor each item will be the listGrid body.Note that even if the containerWidgetis not a DynamicForm, a DynamicForm will still exist for the item (available asform), allowing access to standard APIs such asDynamicForm.getValues()- Returns:
- Current containerWidget value. Default value is null
 
- 
setControlStyleBase CSS class name for a form item's "control box". This is an HTML element which contains the text box and picker icon for the item.See alwaysShowControlBoxfor details on when the control box is written out.See FormItemStylingfor an overview of formItem styling, and theCompoundFormItem_skinningdiscussion for special skinning considerations.- Parameters:
- controlStyle- New controlStyle value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getControlStyleBase CSS class name for a form item's "control box". This is an HTML element which contains the text box and picker icon for the item.See alwaysShowControlBoxfor details on when the control box is written out.See FormItemStylingfor an overview of formItem styling, and theCompoundFormItem_skinningdiscussion for special skinning considerations.- Returns:
- Current controlStyle value. Default value is null
- See Also:
 
- 
setCriteriaFieldWhen usingoperator, the name of the DataSource field for theCriterionthis FormItem generates. If not specified, defaults toname.Generally, because criteriaFielddefaults toitem.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 fornamebut should setcriteriaFieldto 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 criteriaFieldto "joinDate" on both fields but give the fields distinct names (eg "minDate" and "maxDate") and use those names for any programmatic access, such asDynamicForm.setValue().
- 
getCriteriaFieldWhen usingoperator, the name of the DataSource field for theCriterionthis FormItem generates. If not specified, defaults toname.Generally, because criteriaFielddefaults toitem.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 fornamebut should setcriteriaFieldto 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 criteriaFieldto "joinDate" on both fields but give the fields distinct names (eg "minDate" and "maxDate") and use those names for any programmatic access, such asDynamicForm.setValue().- Returns:
- Current criteriaField value. Default value is null
- See Also:
 
- 
setDataPathdataPath for this item. Allows the user to edit details nested data structures in a flat set of form fieldsNOTE: the dataPath feature is intended to help certain legacy architectures, such as systems that work in terms of exchanging large messages with several different entity types in one message, and are incapable of providing separate access to each entity type. 
 See theDataPath overviewfor more information.Note that an item must have a valid dataPath or namein order for its value to be validated and/or saved.
- 
getDataPathdataPath for this item. Allows the user to edit details nested data structures in a flat set of form fieldsNOTE: the dataPath feature is intended to help certain legacy architectures, such as systems that work in terms of exchanging large messages with several different entity types in one message, and are incapable of providing separate access to each entity type. 
 See theDataPath overviewfor more information.Note that an item must have a valid dataPath or namein order for its value to be validated and/or saved.- Returns:
- Return the dataPath for the this formItem. Default value is null
- See Also:
 
- 
setDateFormatterDisplay format to use for date type values within this formItem.Note that Fields of type "date","datetime"or"time"will be edited using aDateItemorTimeItemby default, but this can be overridden - forcanEdit:falsefields, aStaticTextItemis used by default, and the developer can always specify a customeditorTypeas well asdata type.The timeFormattermay also be used to format underlying Date values as times (ommitting the date part entirely). If bothdateFormatterandtimeFormatterare specified on an item, for fields specified astype "time"thetimeFormatterwill be used, otherwise thedateFormatterIf item.dateFormatteranditem.timeFormatteris unspecified, date display format may be defined at the component level viaDynamicForm.dateFormatter, or for fields of type"datetime"DynamicForm.datetimeFormatter. Otherwise the default is to use the system-wide default short date format, configured viaDateUtil.setShortDisplayFormat(). Specify any validDateDisplayFormatto 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 explicitinputFormator via entirely customsetEditorValueFormatterandsetEditorValueParsermethods.Note : This is an advanced setting - Parameters:
- dateFormatter- New dateFormatter value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getDateFormatterDisplay format to use for date type values within this formItem.Note that Fields of type "date","datetime"or"time"will be edited using aDateItemorTimeItemby default, but this can be overridden - forcanEdit:falsefields, aStaticTextItemis used by default, and the developer can always specify a customeditorTypeas well asdata type.The timeFormattermay also be used to format underlying Date values as times (ommitting the date part entirely). If bothdateFormatterandtimeFormatterare specified on an item, for fields specified astype "time"thetimeFormatterwill be used, otherwise thedateFormatterIf item.dateFormatteranditem.timeFormatteris unspecified, date display format may be defined at the component level viaDynamicForm.dateFormatter, or for fields of type"datetime"DynamicForm.datetimeFormatter. Otherwise the default is to use the system-wide default short date format, configured viaDateUtil.setShortDisplayFormat(). Specify any validDateDisplayFormatto 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 explicitinputFormator via entirely customsetEditorValueFormatterandsetEditorValueParsermethods.- Returns:
- Current dateFormatter value. Default value is null
- See Also:
 
- 
setDecimalPadApplies 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- New decimalPad value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getDecimalPadApplies 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:
- Current decimalPad value. Default value is null
- See Also:
 
- 
setDecimalPrecisionApplies 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 DataSourceField.decimalPadfor this.A number is always shown with its original precision when edited. - Parameters:
- decimalPrecision- New decimalPrecision value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getDecimalPrecisionApplies 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 DataSourceField.decimalPadfor this.A number is always shown with its original precision when edited. - Returns:
- Current decimalPrecision value. Default value is null
- See Also:
 
- 
setDefaultIconSrcDefault 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 theicon.srcproperty.
 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. Ificon.showOveris true, this url will be modified by adding "_Over" to get an over state image for the icon.Spritingcan be used for this image, by setting this property to aSCSpriteConfigformatted string.Note : This is an advanced setting 
- 
getDefaultIconSrcDefault 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 theicon.srcproperty.
 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. Ificon.showOveris true, this url will be modified by adding "_Over" to get an over state image for the icon.Spritingcan be used for this image, by setting this property to aSCSpriteConfigformatted string.- Returns:
- Current defaultIconSrc value. Default value is "[SKIN]/DynamicForm/default_formItem_icon.gif"
- See Also:
 
- 
setDefaultOperatorThe default search-operator for this item when it or its form allowfilter-expressions.- Parameters:
- defaultOperator- New defaultOperator value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getDefaultOperatorThe default search-operator for this item when it or its form allowfilter-expressions.- Returns:
- Current defaultOperator value. Default value is null
- See Also:
 
- 
getDefaultValueValue used when no value is provided for this item. Note that whenever this item's value is cleared programmatically (for example viaitem.clearValue()oritem.setValue(null)), it will be reverted to thedefaultValue.Developers should use the DynamicForm.valuesobject if their intention is to provide an initial value for a field in a form rather than a value to use in place ofnull.Developers looking to provide a 'hint' or placeholder value for an empty item may wish to use hint(possibly in conjunction withTextItem.showHintInField), orprompt.Note: Some items provide a user interface allowing the user to explicitly clear them - for example a standard TextItem. If such an item has a defaultValue specified, and the user explicitly clears that value, the value of the item will be (correctly) reported as null, and will remain null over form item redraw()s. However any programmatic call to set the value to null (including, but not limited to item.clearValue(),item.setValue(null),dynamicForm.setValues(...)with a null value for this field, etc) will reset the item value to its default.- Returns:
- Current defaultValue value. Default value is null
- See Also:
- 
- com.smartgwt.client.widgets.form.fields.FormItem#defaultDynamicValue
- Enable & Disable Example
 
 
- 
getDestroyedThe destroyed attribute will be set to true if this item has been destroyed() Note that FormItem lifecycle is managed by the DynamicForm itself. FormItem instances are created and destroyed automatically when new fields are added to the form.- Returns:
- Current destroyed value. Default value is null
 
- 
setDisabledWhether this item is disabled. Can be updated at runtime via thesetDisabled()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
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
setDisabledHoverThis text is shown as a tooltip prompt when the cursor hovers over this item and the item isdisabledorread-onlywithreadOnlyDisplay:disabled.You can also override itemHoverHTMLon the item to show a custom hover, whether or not the item is disabled.Note that when the form is disabled, or when this itemsuppresses hovers, nothing will be shown.- Parameters:
- disabledHover- New disabledHover value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getDisabledHoverThis text is shown as a tooltip prompt when the cursor hovers over this item and the item isdisabledorread-onlywithreadOnlyDisplay:disabled.You can also override itemHoverHTMLon the item to show a custom hover, whether or not the item is disabled.Note that when the form is disabled, or when this itemsuppresses hovers, nothing will be shown.- Returns:
- Current disabledHover value. Default value is null
- See Also:
 
- 
setDisableIconsOnReadOnlyIfcanEditis set to false, shouldiconsbe disabled by default?This may also be specified at the icon level. See FormItemIcon.disableOnReadOnly.- Parameters:
- disableIconsOnReadOnly- New disableIconsOnReadOnly value. Default value is true
- Returns:
- FormIteminstance, for chaining setter calls
 
- 
getDisableIconsOnReadOnlyIfcanEditis set to false, shouldiconsbe disabled by default?This may also be specified at the icon level. See FormItemIcon.disableOnReadOnly.- Returns:
- Current disableIconsOnReadOnly value. Default value is true
 
- 
setDisplayFieldIf set, this item will display a value from another field to the user instead of showing the underlying data value for thefield name.This property is used in two ways: The item will display the displayField value from the record currently being editedifuseLocalDisplayFieldValueis true, (or if unset and the conditions outlined in the documentation for that property are met).If this field has an optionDataSource, this property is used by default to identify which value to use as a display value in records from this related dataSource. In this usage the specified displayField must be explicitly defined in the optionDataSource to be used - seegetDisplayFieldName()for more on this behavior.
 If not usinglocal display values, the display value for this item will be derived by performing a fetch against theoption dataSourceto find a record where thevalue fieldmatches this item's value, and use thedisplayFieldvalue from that record.
 In addition to this, PickList-based form items that provide a list of possible options such as theSelectItemorComboBoxItemwill show thedisplayFieldvalues to the user by default, allowing them to choose a new data value (seevalueField) from a list of user-friendly display values.This essentially allows the specified optionDataSourceto be used as a server basedvalueMap.If local display valuesare being used andstoreDisplayValuesis true, selecting a new value will update both the value for this field and the associated display-field value on the record being edited.Note: Developers may specify the foreignDisplayFieldproperty in addition todisplayField. This is useful for cases where the display field name in the local dataSource differs from the display field name in the optionDataSource. See the documentation forDataSourceField.foreignDisplayFieldfor more on this.
 If a foreignDisplayField is specified, as with just displayField, iflocal display valuesare being used andstoreDisplayValuesis true, when the user chooses a value the associated display-field value on the record being edited will be updated. In this case it would be set to the foreignDisplayField value from the related record. This means foreignDisplayField is always expected to be set to the equivalent field in the related dataSources.
 Developers looking to display some other arbitrary field(s) from the related dataSource during editing should consider using custom PickList.pickListFields instead of setting a foreignDisplayField.Note that if optionDataSourceis set and no valid display field is specified,getDisplayFieldName()will return the dataSource title field by default.If a displayField is specified for a freeform text based item (such as a ComboBoxItem), any user-entered value will be treated as a display value. In this scenario, items will derive the data value for the item from the first record where the displayField value matches the user-entered value. To avoid ambiguity, developers may wish to avoid this usage if display values are not unique.- Parameters:
- displayField- New displayField value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getDisplayFieldIf set, this item will display a value from another field to the user instead of showing the underlying data value for thefield name.This property is used in two ways: The item will display the displayField value from the record currently being editedifuseLocalDisplayFieldValueis true, (or if unset and the conditions outlined in the documentation for that property are met).If this field has an optionDataSource, this property is used by default to identify which value to use as a display value in records from this related dataSource. In this usage the specified displayField must be explicitly defined in the optionDataSource to be used - seegetDisplayFieldName()for more on this behavior.
 If not usinglocal display values, the display value for this item will be derived by performing a fetch against theoption dataSourceto find a record where thevalue fieldmatches this item's value, and use thedisplayFieldvalue from that record.
 In addition to this, PickList-based form items that provide a list of possible options such as theSelectItemorComboBoxItemwill show thedisplayFieldvalues to the user by default, allowing them to choose a new data value (seevalueField) from a list of user-friendly display values.This essentially allows the specified optionDataSourceto be used as a server basedvalueMap.If local display valuesare being used andstoreDisplayValuesis true, selecting a new value will update both the value for this field and the associated display-field value on the record being edited.Note: Developers may specify the foreignDisplayFieldproperty in addition todisplayField. This is useful for cases where the display field name in the local dataSource differs from the display field name in the optionDataSource. See the documentation forDataSourceField.foreignDisplayFieldfor more on this.
 If a foreignDisplayField is specified, as with just displayField, iflocal display valuesare being used andstoreDisplayValuesis true, when the user chooses a value the associated display-field value on the record being edited will be updated. In this case it would be set to the foreignDisplayField value from the related record. This means foreignDisplayField is always expected to be set to the equivalent field in the related dataSources.
 Developers looking to display some other arbitrary field(s) from the related dataSource during editing should consider using custom PickList.pickListFields instead of setting a foreignDisplayField.Note that if optionDataSourceis set and no valid display field is specified,getDisplayFieldName()will return the dataSource title field by default.If a displayField is specified for a freeform text based item (such as a ComboBoxItem), any user-entered value will be treated as a display value. In this scenario, items will derive the data value for the item from the first record where the displayField value matches the user-entered value. To avoid ambiguity, developers may wish to avoid this usage if display values are not unique.- Returns:
- Returns the displayFieldfor this item.Behavior varies based on the configuration of this item, as follows: - If this item has an optionDataSourceand an explicitforeignDisplayFieldis specified, this will be returned.
- Otherwise if an explicit displayFieldis specified it will be returned by default. If thedisplayFieldwas specified on the underlying dataSource field, and no matching field is present in theoptionDataSourcefor the item, we avoid returning the specified displayField value and instead return the title field of the option DataSource. We do this to avoid confusion for the case where the displayField is intended as a display-field value for showing another field value within the same record in the underlying dataSource only.
- If no explicit foreignDisplay or
 displayField   specification was found, and the valueFieldfor this item is hidden in theoptionDataSource, this method will return the title field for theoptionDataSource.
 
- If this item has an 
- See Also:
 
- 
setEditPendingCSSTextCustom CSS text to be applied to cells with pending edits that have not yet been submitted.Note : This is an advanced setting - Parameters:
- editPendingCSSText- New editPendingCSSText value. Default value is "color:#0066CC;"
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getEditPendingCSSTextCustom CSS text to be applied to cells with pending edits that have not yet been submitted.- Returns:
- Current editPendingCSSText value. Default value is "color:#0066CC;"
- See Also:
 
- 
setEditProxyConstructorDefault class used to construct theEditProxyfor this component when the component isfirst placed into edit mode.- Parameters:
- editProxyConstructor- New editProxyConstructor value. Default value is "FormItemEditProxy"
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getEditProxyConstructorDefault class used to construct theEditProxyfor this component when the component isfirst placed into edit mode.- Returns:
- Current editProxyConstructor value. Default value is "FormItemEditProxy"
- See Also:
 
- 
setEmptyDisplayValueText to display when this form item has a null or undefined value.If the formItem has a databound pickList, and its displayFieldorvalueField(if the former isn't set) has an undefinedemptyCellValuesetting, that field'semptyCellValuewill automatically be set to theemptyDisplayValue.- Parameters:
- emptyDisplayValue- New emptyDisplayValue value. Default value is ""
- Returns:
- FormIteminstance, for chaining setter calls
 
- 
getEmptyDisplayValueText to display when this form item has a null or undefined value.If the formItem has a databound pickList, and its displayFieldorvalueField(if the former isn't set) has an undefinedemptyCellValuesetting, that field'semptyCellValuewill automatically be set to theemptyDisplayValue.- Returns:
- Current emptyDisplayValue value. Default value is ""
 
- 
setEmptyValueIconThis 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 (seevalueIcons)- Parameters:
- emptyValueIcon- New emptyValueIcon value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
 
- 
getEmptyValueIconThis 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 (seevalueIcons)- Returns:
- Current emptyValueIcon value. Default value is null
 
- 
setEndRowWhether this item should end the row it's in in the form layout- Parameters:
- endRow- New endRow value. Default value is false
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getEndRowWhether this item should end the row it's in in the form layout- Returns:
- Current endRow value. Default value is false
- See Also:
 
- 
setErrorIconHeightHeight of the error icon, if we're showing icons when validation errors occur.- Parameters:
- errorIconHeight- New errorIconHeight value. Default value is 16
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getErrorIconHeightpublic int getErrorIconHeight()Height of the error icon, if we're showing icons when validation errors occur.- Returns:
- Current errorIconHeight value. Default value is 16
- See Also:
 
- 
setErrorIconPropertiesIcon-propertiesto apply to theerror-iconwhenshowErrorIconInlineis true.Note : This is an advanced setting - Parameters:
- errorIconProperties- New errorIconProperties value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
 
- 
getErrorIconProperties- Returns:
- Current errorIconProperties value. Default value is null
 
- 
setErrorIconSrcURL of the image to show as an error icon, if we're showing icons when validation errors occur.- Parameters:
- errorIconSrc- New errorIconSrc value. Default value is "[SKIN]/DynamicForm/validation_error_icon.png"
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getErrorIconSrcURL of the image to show as an error icon, if we're showing icons when validation errors occur.- Returns:
- Current errorIconSrc value. Default value is "[SKIN]/DynamicForm/validation_error_icon.png"
- See Also:
 
- 
setErrorIconWidthHeight of the error icon, if we're showing icons when validation errors occur.- Parameters:
- errorIconWidth- New errorIconWidth value. Default value is 16
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getErrorIconWidthpublic int getErrorIconWidth()Height of the error icon, if we're showing icons when validation errors occur.- Returns:
- Current errorIconWidth value. Default value is 16
- See Also:
 
- 
setErrorMessageWidthWhenDynamicForm.showInlineErrorsandshowErrorTextare both true anderrorOrientationis "left" or "right", errorMessageWidth is the amount to reduce the width of the editor to accommodate the error message and icon.- Parameters:
- errorMessageWidth- New errorMessageWidth value. Default value is 80
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getErrorMessageWidthpublic int getErrorMessageWidth()WhenDynamicForm.showInlineErrorsandshowErrorTextare both true anderrorOrientationis "left" or "right", errorMessageWidth is the amount to reduce the width of the editor to accommodate the error message and icon.- Returns:
- Current errorMessageWidth value. Default value is 80
- See Also:
 
- 
setEscapeHTMLControls whether HTML item value(s) should be rendered or shown as HTML source.This property is supported by specific formItem sub-types (e.g. TextItem), and has no effect in others. To understand the effects, look at the documentation for the specific formItem sub-type in question.- Overrides:
- setEscapeHTMLin class- Field
- Parameters:
- escapeHTML- New escapeHTML value. Default value is varies
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getEscapeHTMLControls whether HTML item value(s) should be rendered or shown as HTML source.This property is supported by specific formItem sub-types (e.g. TextItem), and has no effect in others. To understand the effects, look at the documentation for the specific formItem sub-type in question.- Overrides:
- getEscapeHTMLin class- Field
- Returns:
- Current escapeHTML value. Default value is varies
- See Also:
 
- 
setExportFormatFormatStringused during exports for numeric or date formatting. SeeDataSourceField.exportFormat.- Parameters:
- exportFormat- New exportFormat value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getExportFormatFormatStringused during exports for numeric or date formatting. SeeDataSourceField.exportFormat.- Returns:
- Current exportFormat value. Default value is null
- See Also:
 
- 
setExtraControlTableCSSAdditional CSS-text that overrides the item'scontrolStyle, applying arbitrary custom styling to the outer control-table that contains both textBox and icons.This is an advanced attribute - while it can be used to modify many properties, such as colors, font-style and border-radius, it should not be used to modify any property that may affect element-size, such as height, padding/margin or overflow. Note : This is an advanced setting - Parameters:
- extraControlTableCSS- New extraControlTableCSS value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
 
- 
getExtraControlTableCSSAdditional CSS-text that overrides the item'scontrolStyle, applying arbitrary custom styling to the outer control-table that contains both textBox and icons.This is an advanced attribute - while it can be used to modify many properties, such as colors, font-style and border-radius, it should not be used to modify any property that may affect element-size, such as height, padding/margin or overflow. - Returns:
- Current extraControlTableCSS value. Default value is null
 
- 
setExtraTextBoxCSSAdditional CSS-text that overrides the item'stextBoxStyle, applying arbitrary custom styling to the textBox.This is an advanced attribute - while it can be used to modify many properties, such as colors, font-style and border-radius, it should not be used to modify any property that may affect element-size, such as height, padding/margin or overflow. Note : This is an advanced setting - Parameters:
- extraTextBoxCSS- New extraTextBoxCSS value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
 
- 
getExtraTextBoxCSSAdditional CSS-text that overrides the item'stextBoxStyle, applying arbitrary custom styling to the textBox.This is an advanced attribute - while it can be used to modify many properties, such as colors, font-style and border-radius, it should not be used to modify any property that may affect element-size, such as height, padding/margin or overflow. - Returns:
- Current extraTextBoxCSS value. Default value is null
 
- 
setFetchMissingValuesIf this form item has a specifiedoptionDataSource, 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 getSelectedRecord()api.By default, a fetch will only occur if displayFieldis specified, and the item does not have an explicitvalueMapcontaining the data value as a key.
 However you can also setalwaysFetchMissingValuesto have a fetch occur even if nodisplayFieldis specified. This ensuresgetSelectedRecord()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 invalidateDisplayValueCache()Note : This is an advanced setting - Parameters:
- fetchMissingValues- New fetchMissingValues value. Default value is true
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getFetchMissingValuesIf this form item has a specifiedoptionDataSource, 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 getSelectedRecord()api.By default, a fetch will only occur if displayFieldis specified, and the item does not have an explicitvalueMapcontaining the data value as a key.
 However you can also setalwaysFetchMissingValuesto have a fetch occur even if nodisplayFieldis specified. This ensuresgetSelectedRecord()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 invalidateDisplayValueCache()- Returns:
- Current fetchMissingValues value. Default value is true
- See Also:
 
- 
setFilterLocallyIf this form item is mapping data values to a display value by fetching records from a dataSource (seeoptionDataSource,displayFieldandfetchMissingValues), 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 PickList.filterLocally for behavior on form items such as SelectItems that show pick-lists. Note : This is an advanced setting - Parameters:
- filterLocally- New filterLocally value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
 
- 
getFilterLocallyIf this form item is mapping data values to a display value by fetching records from a dataSource (seeoptionDataSource,displayFieldandfetchMissingValues), 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 PickList.filterLocally for behavior on form items such as SelectItems that show pick-lists. - Returns:
- Current filterLocally value. Default value is null
 
- 
setForeignDisplayFieldFor items with anoptionDataSource, this property specifies an explicit display field for records within the option dataSource. Typically this property will be set in conjunction withdisplayFieldin the case where the name of the displayField within the record being edited differs from the displayField in the optionDataSource.See DataSourceField.foreignDisplayFieldfor additional details.- Parameters:
- foreignDisplayField- New foreignDisplayField value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getForeignDisplayFieldFor items with anoptionDataSource, this property specifies an explicit display field for records within the option dataSource. Typically this property will be set in conjunction withdisplayFieldin the case where the name of the displayField within the record being edited differs from the displayField in the optionDataSource.See DataSourceField.foreignDisplayFieldfor additional details.- Returns:
- Current foreignDisplayField value. Default value is null
- See Also:
 
- 
setFormatFormatStringfor numeric or date formatting. SeeDataSourceField.format.- Parameters:
- format- New format value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getFormatFormatStringfor numeric or date formatting. SeeDataSourceField.format.- Returns:
- Current format value. Default value is null
- See Also:
 
- 
setFormulaFormula to be used to calculate the numeric value of this FormItem. For a field of type "text" (or subtypes)textFormulais used instead.Available fields for use in the formula are the current rule context. The formula is re-evaluated every time the rule context changes.Values calculated by the formula will always replace the current value of a non-editable field. For an editable field, the current value will be replaced if the end user has not changed the value since the last time it was computed by the formula, or if the value of the field is invalid according to declared validators.Note: A FormItem using a formula must have a namedefined.shouldSaveValuecan be set tofalseto prevent the formula field from storing the calculated value into the form's values.- Parameters:
- formula- New formula value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getFormulaFormula to be used to calculate the numeric value of this FormItem. For a field of type "text" (or subtypes)textFormulais used instead.Available fields for use in the formula are the current rule context. The formula is re-evaluated every time the rule context changes.Values calculated by the formula will always replace the current value of a non-editable field. For an editable field, the current value will be replaced if the end user has not changed the value since the last time it was computed by the formula, or if the value of the field is invalid according to declared validators.Note: A FormItem using a formula must have a namedefined.shouldSaveValuecan be set tofalseto prevent the formula field from storing the calculated value into the form's values.- Returns:
- Current formula value. Default value is null
- See Also:
 
- 
setGlobalTabIndexTabIndex for the form item within the page. Takes precedence over any local tab index specified asitem.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 
- 
getGlobalTabIndexTabIndex for the form item within the page. Takes precedence over any local tab index specified asitem.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:
- Current globalTabIndex value. Default value is null
- See Also:
 
- 
setHeightHeight 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 theFormLayoutoverview for details.If height is specified as a String, getHeight() will return -1. Use getHeightAsString.() in this case. For form items having a picker icon(e.g.SelectItem,ComboBoxItem) andSpinnerItems, if there is no explicitpickerIconHeight, the pickerIcon will be sized to match the available space based on the specified item height.
 Note that if spriting is being used, and the image to be displayed in these icons is specified using css properties such asbackground-image,background-size, changing this value may result in an unexpected appearance as the image will not scale.
 Scaleable spriting can be achieved using theSCSpriteConfigformat. See the section on spriting in theskinning overviewfor further information.
 Alternatively, thepickerIconStylecould be changed to a custom CSS style name, and in the case ofSpinnerItems, thebaseStyleandsrcof theSpinnerItem.increaseIconandSpinnerItem.decreaseIconAutoChildren could be customized.Note that when FormItem is rendered as read-only with readOnlyDisplayas "static" the propertystaticHeightis used instead.- Parameters:
- height- New height value. Default value is 20
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getHeightpublic 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 theFormLayoutoverview for details.If height is specified as a String, getHeight() will return -1. Use getHeightAsString.() in this case. For form items having a picker icon(e.g.SelectItem,ComboBoxItem) andSpinnerItems, if there is no explicitpickerIconHeight, the pickerIcon will be sized to match the available space based on the specified item height.
 Note that if spriting is being used, and the image to be displayed in these icons is specified using css properties such asbackground-image,background-size, changing this value may result in an unexpected appearance as the image will not scale.
 Scaleable spriting can be achieved using theSCSpriteConfigformat. See the section on spriting in theskinning overviewfor further information.
 Alternatively, thepickerIconStylecould be changed to a custom CSS style name, and in the case ofSpinnerItems, thebaseStyleandsrcof theSpinnerItem.increaseIconandSpinnerItem.decreaseIconAutoChildren could be customized.Note that when FormItem is rendered as read-only with readOnlyDisplayas "static" the propertystaticHeightis used instead.Note : This method will return -1 if the underlying SmartClient JavaScript attribute value cannot be expressed as a(n) int. In that case, other getters, similarly-named but ending in AsString,AsCanvas, etc., may be provided.- Returns:
- Current height value. Default value is 20
- See Also:
 
- 
setHeightHeight 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 theFormLayoutoverview for details.If height is specified as a String, getHeight() will return -1. Use getHeightAsString.() in this case. For form items having a picker icon(e.g.SelectItem,ComboBoxItem) andSpinnerItems, if there is no explicitpickerIconHeight, the pickerIcon will be sized to match the available space based on the specified item height.
 Note that if spriting is being used, and the image to be displayed in these icons is specified using css properties such asbackground-image,background-size, changing this value may result in an unexpected appearance as the image will not scale.
 Scaleable spriting can be achieved using theSCSpriteConfigformat. See the section on spriting in theskinning overviewfor further information.
 Alternatively, thepickerIconStylecould be changed to a custom CSS style name, and in the case ofSpinnerItems, thebaseStyleandsrcof theSpinnerItem.increaseIconandSpinnerItem.decreaseIconAutoChildren could be customized.Note that when FormItem is rendered as read-only with readOnlyDisplayas "static" the propertystaticHeightis used instead.- Parameters:
- height- New height value. Default value is 20
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getHeightAsStringHeight 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 theFormLayoutoverview for details.If height is specified as a String, getHeight() will return -1. Use getHeightAsString.() in this case. For form items having a picker icon(e.g.SelectItem,ComboBoxItem) andSpinnerItems, if there is no explicitpickerIconHeight, the pickerIcon will be sized to match the available space based on the specified item height.
 Note that if spriting is being used, and the image to be displayed in these icons is specified using css properties such asbackground-image,background-size, changing this value may result in an unexpected appearance as the image will not scale.
 Scaleable spriting can be achieved using theSCSpriteConfigformat. See the section on spriting in theskinning overviewfor further information.
 Alternatively, thepickerIconStylecould be changed to a custom CSS style name, and in the case ofSpinnerItems, thebaseStyleandsrcof theSpinnerItem.increaseIconandSpinnerItem.decreaseIconAutoChildren could be customized.Note that when FormItem is rendered as read-only with readOnlyDisplayas "static" the propertystaticHeightis used instead.- Returns:
- Current height value. Default value is 20
- See Also:
 
- 
setHiddenShould this form item be hidden? Setting this property totrueon an item configuration will have the same effect as having ashowIf()implementation which returnsfalse.Note this differs slightly from DataSourceField.hidden. That property will cause the field in question to be omitted entirely from databound components by default. A dataSourceField withhiddenset totruecan still be displayed in a DynamicForm either by being explicitly included in the specifieditems array, or by havingDataBoundComponent.showHiddenFieldsset to true. In this case, this property will not be inherited onto the FormItem instance, meaning the item will be visible in the form even though thehiddenproperty was set to true on the dataSourceField configuration object.- Parameters:
- hidden- New hidden value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
 
- 
getHiddenShould this form item be hidden? Setting this property totrueon an item configuration will have the same effect as having ashowIf()implementation which returnsfalse.Note this differs slightly from DataSourceField.hidden. That property will cause the field in question to be omitted entirely from databound components by default. A dataSourceField withhiddenset totruecan still be displayed in a DynamicForm either by being explicitly included in the specifieditems array, or by havingDataBoundComponent.showHiddenFieldsset to true. In this case, this property will not be inherited onto the FormItem instance, meaning the item will be visible in the form even though thehiddenproperty was set to true on the dataSourceField configuration object.- Returns:
- Current hidden value. Default value is null
 
- 
setHintSpecifies "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: Sets thehintfor this item.- Parameters:
- hint- new hint for the item. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getHintSpecifies "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:
- Current hint value. Default value is null
- See Also:
 
- 
setHintStyleCSS class for the "hint" string. For items that supportTextItem.showHintInField, this only applies when showHintInField is false.
 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"
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getHintStyleCSS class for the "hint" string. For items that supportTextItem.showHintInField, this only applies when showHintInField is false.- Returns:
- Current hintStyle value. Default value is "formHint"
- See Also:
 
- 
setHoverAlignText alignment for text displayed in this item's hover canvas, if shown.- Parameters:
- hoverAlign- New hoverAlign value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getHoverAlignText alignment for text displayed in this item's hover canvas, if shown.- Returns:
- Current hoverAlign value. Default value is null
- See Also:
 
- 
setHoverDelayIf 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 specifiedthis.form.itemHoverDelaywill be used instead.Note : This is an advanced setting - Parameters:
- hoverDelay- New hoverDelay value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
 
- 
getHoverDelayIf 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 specifiedthis.form.itemHoverDelaywill be used instead.- Returns:
- Current hoverDelay value. Default value is null
 
- 
setHoverFocusKeyThis attribute gives users a way to pin this item's hover in place so they can interact with it (scroll it, click embedded links, etc).Overrides the same attributeon the parent form.- Parameters:
- hoverFocusKey- New hoverFocusKey value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getHoverFocusKeyThis attribute gives users a way to pin this item's hover in place so they can interact with it (scroll it, click embedded links, etc).Overrides the same attributeon the parent form.- Returns:
- Current hoverFocusKey value. Default value is null
- See Also:
 
- 
setHoverHeightOption to specify a height for any hover shown for this item.- Parameters:
- hoverHeight- New hoverHeight value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getHoverHeightOption to specify a height for any hover shown for this item.- Returns:
- Current hoverHeight value. Default value is null
- See Also:
 
- 
setHoverHeightOption to specify a height for any hover shown for this item.- Parameters:
- hoverHeight- New hoverHeight value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getHoverHeightAsStringOption to specify a height for any hover shown for this item.- Returns:
- Current hoverHeight value. Default value is null
- See Also:
 
- 
setHoverOpacityOpacity for any hover shown for this item- Parameters:
- hoverOpacity- New hoverOpacity value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getHoverOpacityOpacity for any hover shown for this item- Returns:
- Current hoverOpacity value. Default value is null
- See Also:
 
- 
setHoverPersistAllows interaction with hovers when the cursor is positioned over them.Overrides the same attributeon the parent form.- Parameters:
- hoverPersist- New hoverPersist value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getHoverPersistAllows interaction with hovers when the cursor is positioned over them.Overrides the same attributeon the parent form.- Returns:
- Current hoverPersist value. Default value is null
- See Also:
 
- 
setHoverStyleExplicit CSS Style for any hover shown for this item.- Parameters:
- hoverStyle- New hoverStyle value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getHoverStyleExplicit CSS Style for any hover shown for this item.- Returns:
- Current hoverStyle value. Default value is null
- See Also:
 
- 
setHoverVAlignVertical text alignment for text displayed in this item's hover canvas, if shown.- Parameters:
- hoverVAlign- New hoverVAlign value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getHoverVAlignVertical text alignment for text displayed in this item's hover canvas, if shown.- Returns:
- Current hoverVAlign value. Default value is null
- See Also:
 
- 
setHoverWidthOption to specify a width for any hover shown for this item.- Parameters:
- hoverWidth- New hoverWidth value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getHoverWidthOption to specify a width for any hover shown for this item.- Returns:
- Current hoverWidth value. Default value is null
- See Also:
 
- 
setHoverWidthOption to specify a width for any hover shown for this item.- Parameters:
- hoverWidth- New hoverWidth value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getHoverWidthAsStringOption to specify a width for any hover shown for this item.- Returns:
- Current hoverWidth value. Default value is null
- See Also:
 
- 
setIconBaseStyleFallback base CSS class to apply to this item'siconsif they don't specify abaseStyleor provide a sprite-basedsrc stringthat specifies acssClass.- Parameters:
- iconBaseStyle- New iconBaseStyle value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getIconBaseStyleFallback base CSS class to apply to this item'siconsif they don't specify abaseStyleor provide a sprite-basedsrc stringthat specifies acssClass.- Returns:
- Current iconBaseStyle value. Default value is null
- See Also:
 
- 
setIconHeightDefault height for form item icons. May be overridden at the icon level byFormItemIcon.height.Note : This is an advanced setting - Parameters:
- iconHeight- New iconHeight value. Default value is 20
- Returns:
- FormIteminstance, for chaining setter calls
 
- 
getIconHeightpublic int getIconHeight()Default height for form item icons. May be overridden at the icon level byFormItemIcon.height.- Returns:
- Takes an icon definition object, and returns the height for that icon in px. Default value is 20
 
- 
setIconHSpaceHorizontal space (in px) to leave between form item icons. The space appears either on the left or right of each icon. May be overridden at the icon level viaFormItemIcon.hspace. Must be non-negative.- Parameters:
- iconHSpace- New iconHSpace value. Default value is 3
- Returns:
- FormIteminstance, for chaining setter calls
 
- 
getIconHSpacepublic int getIconHSpace()Horizontal space (in px) to leave between form item icons. The space appears either on the left or right of each icon. May be overridden at the icon level viaFormItemIcon.hspace. Must be non-negative.- Returns:
- Current iconHSpace value. Default value is 3
 
- 
setIconPromptDefault prompt (and tooltip-text) for icons.If canHoveris set to false, this prompt will not be shown.Note : This is an advanced setting - Parameters:
- iconPrompt- New iconPrompt value. Default value is ""
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getIconPromptDefault prompt (and tooltip-text) for icons.If canHoveris set to false, this prompt will not be shown.- Returns:
- Current iconPrompt value. Default value is ""
- See Also:
 
- 
setIconsAn 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- New icons value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getIconsAn 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.- Returns:
- Current icons value. Default value is null
- See Also:
 
- 
setIconVAlignHow should icons be aligned vertically for this form item.Note : This is an advanced setting - Parameters:
- iconVAlign- New iconVAlign value. Default value is "bottom"
- Returns:
- FormIteminstance, for chaining setter calls
 
- 
getIconVAlignHow should icons be aligned vertically for this form item.- Returns:
- Current iconVAlign value. Default value is "bottom"
 
- 
setIconWidthDefault width for form item icons. May be overridden at the icon level byFormItemIcon.width.Note : This is an advanced setting - Parameters:
- iconWidth- New iconWidth value. Default value is 20
- Returns:
- FormIteminstance, for chaining setter calls
 
- 
getIconWidthpublic int getIconWidth()Default width for form item icons. May be overridden at the icon level byFormItemIcon.width.- Returns:
- Takes an icon definition object, and returns the width for that icon in px. Default value is 20
 
- 
setIDGlobal identifier for referring to the formItem in JavaScript. The ID property is optional if you do not need to refer to the widget from JavaScript, or can refer to it indirectly (for example, viaform.getItem("itemName")).An internal, unique ID will automatically be created upon instantiation for any formItem where one is not provided. 
- 
getIDGlobal identifier for referring to the formItem in JavaScript. The ID property is optional if you do not need to refer to the widget from JavaScript, or can refer to it indirectly (for example, viaform.getItem("itemName")).An internal, unique ID will automatically be created upon instantiation for any formItem where one is not provided. - Returns:
- Current ID value. Default value is null
- See Also:
 
- 
setImageURLPrefixPrefix to apply to the beginning of anyvalueIconswhen determining the URL for the image. Will not be applied if thevalueIconURL is absolute.Note : This is an advanced setting - Parameters:
- imageURLPrefix- New imageURLPrefix value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
 
- 
getImageURLPrefixPrefix to apply to the beginning of anyvalueIconswhen determining the URL for the image. Will not be applied if thevalueIconURL is absolute.- Returns:
- Current imageURLPrefix value. Default value is null
 
- 
setImageURLSuffixSuffix to apply to the end of anyvalueIconswhen determining the URL for the image. A common usage would be to specify a suffix of".gif"in which case thevalueIconsproperty would map values to the names of images without the".gif"extension.Note : This is an advanced setting - Parameters:
- imageURLSuffix- New imageURLSuffix value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
 
- 
getImageURLSuffixSuffix to apply to the end of anyvalueIconswhen determining the URL for the image. A common usage would be to specify a suffix of".gif"in which case thevalueIconsproperty would map values to the names of images without the".gif"extension.- Returns:
- Current imageURLSuffix value. Default value is null
 
- 
setImplicitSaveWhen true, indicates that changes to this item will cause an automatic save on adelay, as well as when the entire form is submitted. If implicitSaveOnBlur is set to true on either thisformItemor it'sform, changes will also be automatically saved immediately on editorExit.- Parameters:
- implicitSave- New implicitSave value. Default value is false
- Returns:
- FormIteminstance, for chaining setter calls
 
- 
getImplicitSaveWhen true, indicates that changes to this item will cause an automatic save on adelay, as well as when the entire form is submitted. If implicitSaveOnBlur is set to true on either thisformItemor it'sform, changes will also be automatically saved immediately on editorExit.- Returns:
- Current implicitSave value. Default value is false
 
- 
setImplicitSaveOnBlurIf set to true, this item's value will be saved immediately when its "editorExit" handler is fired. This attribute works separately fromimplicitSave, which causes saves during editing, after ashort delay, and when the entire form is submitted.- Parameters:
- implicitSaveOnBlur- New implicitSaveOnBlur value. Default value is false
- Returns:
- FormIteminstance, for chaining setter calls
 
- 
getImplicitSaveOnBlurIf set to true, this item's value will be saved immediately when its "editorExit" handler is fired. This attribute works separately fromimplicitSave, which causes saves during editing, after ashort delay, and when the entire form is submitted.- Returns:
- Current implicitSaveOnBlur value. Default value is false
 
- 
setInputFormatFor fields of type"date", if this is an editable field such as aTextItem, this property allows you to specify theinputFormatapplied to the item.Note : This is an advanced setting - Parameters:
- inputFormat- New inputFormat value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getInputFormatFor fields of type"date", if this is an editable field such as aTextItem, this property allows you to specify theinputFormatapplied to the item.- Returns:
- Current inputFormat value. Default value is null
- See Also:
 
- 
setLeftLeft coordinate of this item in pixels. Applies only when the containing DynamicForm setsitemLayout:"absolute".
 If this method is called after the component has been drawn/initialized: For a form withitemLayout:"absolute" only, set the left coordinate of this form item.Causes the form to redraw. Note : This is an advanced setting - Parameters:
- left- New left value. Default value is 0
- Returns:
- FormIteminstance, for chaining setter calls
 
- 
getLeftpublic int getLeft()Left coordinate of this item in pixels. Applies only when the containing DynamicForm setsitemLayout:"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. Default value is 0
 
- 
setLinearColSpanSpecifies a column span for an item inlinearMode, overriding the default value of "*" in that mode.- Parameters:
- linearColSpan- New linearColSpan value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getLinearColSpanpublic int getLinearColSpan()Specifies a column span for an item inlinearMode, overriding the default value of "*" in that mode.Note : This method will return -1 if the underlying SmartClient JavaScript attribute value cannot be expressed as a(n) int. In that case, other getters, similarly-named but ending in AsString,AsCanvas, etc., may be provided.- Returns:
- Current linearColSpan value. Default value is null
- See Also:
- 
- com.smartgwt.client.widgets.form.fields.FormItem#getColSpan
- Form Layout
 
 
- 
setLinearColSpanSpecifies a column span for an item inlinearMode, overriding the default value of "*" in that mode.- Parameters:
- linearColSpan- New linearColSpan value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getLinearColSpanAsStringSpecifies a column span for an item inlinearMode, overriding the default value of "*" in that mode.- Returns:
- Current linearColSpan value. Default value is null
- See Also:
- 
- com.smartgwt.client.widgets.form.fields.FormItem#getColSpan
- Form Layout
 
 
- 
setLinearEndRow- Parameters:
- linearEndRow- New linearEndRow value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getLinearEndRowpublic int getLinearEndRow()SpecifiesendRowfor an item inlinearMode, overriding the default oftruein that mode.Note : This method will return -1 if the underlying SmartClient JavaScript attribute value cannot be expressed as a(n) int. In that case, other getters, similarly-named but ending in AsString,AsCanvas, etc., may be provided.- Returns:
- Current linearEndRow value. Default value is null
- See Also:
 
- 
setLinearEndRow- Parameters:
- linearEndRow- New linearEndRow value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getLinearEndRowAsString- Returns:
- Current linearEndRow value. Default value is null
- See Also:
 
- 
setLinearStartRow- Parameters:
- linearStartRow- New linearStartRow value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getLinearStartRowpublic int getLinearStartRow()SpecifiesstartRowfor an item inlinearMode, overriding the default offalsein that mode.Note : This method will return -1 if the underlying SmartClient JavaScript attribute value cannot be expressed as a(n) int. In that case, other getters, similarly-named but ending in AsString,AsCanvas, etc., may be provided.- Returns:
- Current linearStartRow value. Default value is null
- See Also:
 
- 
setLinearStartRow- Parameters:
- linearStartRow- New linearStartRow value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getLinearStartRowAsString- Returns:
- Current linearStartRow value. Default value is null
- See Also:
 
- 
setLinearWidthSpecifies a width for an item inlinearMode, overriding the default width of "*" in that mode.- Parameters:
- linearWidth- New linearWidth value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getLinearWidthpublic int getLinearWidth()Specifies a width for an item inlinearMode, overriding the default width of "*" in that mode.Note : This method will return -1 if the underlying SmartClient JavaScript attribute value cannot be expressed as a(n) int. In that case, other getters, similarly-named but ending in AsString,AsCanvas, etc., may be provided.- Returns:
- Current linearWidth value. Default value is null
- See Also:
 
- 
setLinearWidthSpecifies a width for an item inlinearMode, overriding the default width of "*" in that mode.- Parameters:
- linearWidth- New linearWidth value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getLinearWidthAsStringSpecifies a width for an item inlinearMode, overriding the default width of "*" in that mode.- Returns:
- Current linearWidth value. Default value is null
- See Also:
 
- 
setLoadingDisplayValueValue shown in field whenfetchMissingValuesis active and a fetch is pending. The field is read-only while a fetch is pending.Set to nullto show actual value until display value is loaded.- Parameters:
- loadingDisplayValue- New loadingDisplayValue value. Default value is "Loading..."
- Returns:
- FormIteminstance, for chaining setter calls
 
- 
getLoadingDisplayValueValue shown in field whenfetchMissingValuesis active and a fetch is pending. The field is read-only while a fetch is pending.Set to nullto show actual value until display value is loaded.- Returns:
- Current loadingDisplayValue value. Default value is "Loading..."
 
- 
setLocateItemByWhenAutoTest.getElement()is used to parse locator strings generated byAutoTest.getLocator()for this form item, should the item be identified? If the locator has a specifiedname, it is considered to definitely locate the item and no fallback approach will be used.Otherwise, 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.
 If unset, and the locator has no specified name, default behavior is to identify by title (if available), then value (if available), otherwise by index. Note : This is an advanced setting - Parameters:
- locateItemBy- New locateItemBy value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getLocateItemByWhenAutoTest.getElement()is used to parse locator strings generated byAutoTest.getLocator()for this form item, should the item be identified? If the locator has a specifiedname, it is considered to definitely locate the item and no fallback approach will be used.Otherwise, 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.
 If unset, and the locator has no specified name, default behavior is to identify by title (if available), then value (if available), otherwise by index. - Returns:
- Current locateItemBy value. Default value is null
- See Also:
 
- 
setMinHintWidthIf this item is showing ahint, this setting specifies how much horizontal space is made available for rendering the hint text by default. Typically this reflects how much space the hint text takes up before it wraps.Note that the presence of a hint may cause a form item to expand horizontally past its specified width. This property value acts as a minimum - if the hint text can not wrap within this width (either due towrapHintTextbeing set tofalse, or due to it containing long, un-wrappable content), it will further expand to take up the space it needs.If unset this property will be picked up from the DynamicForm.minHintWidthsetting.This setting does not apply to hints that are shown in field.- Parameters:
- minHintWidth- New minHintWidth value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getMinHintWidthIf this item is showing ahint, this setting specifies how much horizontal space is made available for rendering the hint text by default. Typically this reflects how much space the hint text takes up before it wraps.Note that the presence of a hint may cause a form item to expand horizontally past its specified width. This property value acts as a minimum - if the hint text can not wrap within this width (either due towrapHintTextbeing set tofalse, or due to it containing long, un-wrappable content), it will further expand to take up the space it needs.If unset this property will be picked up from the DynamicForm.minHintWidthsetting.This setting does not apply to hints that are shown in field.- Returns:
- Current minHintWidth value. Default value is null
- See Also:
 
- 
setMultipleIf true, multiple values may be selected.Only certain FormItems that support both singular and multiple values actually use this setting, such as SelectItem. Other FormItems such asMultiComboBoxItemare always effectively multiple:true, even if multiple:true is not set.- Overrides:
- setMultiplein class- Field
- Parameters:
- multiple- New multiple value. Default value is false
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getMultipleIf true, multiple values may be selected.Only certain FormItems that support both singular and multiple values actually use this setting, such as SelectItem. Other FormItems such asMultiComboBoxItemare always effectively multiple:true, even if multiple:true is not set.- Overrides:
- getMultiplein class- Field
- Returns:
- Current multiple value. Default value is false
- See Also:
 
- 
setMultipleValueSeparatorIf this item is displaying multiple values, this property will be the string that separates those values for display purposes.- Parameters:
- multipleValueSeparator- New multipleValueSeparator value. Default value is ', '
- Returns:
- FormIteminstance, for chaining setter calls
 
- 
getMultipleValueSeparatorIf this item is displaying multiple values, this property will be the string that separates those values for display purposes.- Returns:
- Current multipleValueSeparator value. Default value is ', '
 
- 
getNameName for this form field. Must be unique within the form as well as a valid JavaScript identifier - seeFieldNamefor details and how to check for validity.The FormItem's name determines the name of the property it edits within the form. Note that an item must have a valid name or dataPathin order for its value to be validated and/or saved.
- 
setNullOriginalValueTextText shown as the value in theoriginalValueMessagewhenshowOldValueInHoveris enabled, and when the value has been modified but was originally unset.Note : This is an advanced setting - Parameters:
- nullOriginalValueText- New nullOriginalValueText value. Default value is "None"
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getNullOriginalValueTextText shown as the value in theoriginalValueMessagewhenshowOldValueInHoveris enabled, and when the value has been modified but was originally unset.- Returns:
- Current nullOriginalValueText value. Default value is "None"
- See Also:
 
- 
setOperatorOperatorIdto be used whenDynamicForm.getValuesAsCriteria()is called.item.operatorcan be used to create a form that offers search functions such as numeric range filtering, without the more advanced user interface of theFilterBuilder. For example, two SpinnerItems could be created withformItem.operatorset to "greaterThan" and "lessThan" respectively to enable filtering by a numeric range.When item.operatoris set for any FormItem in a form,form.getValuesAsCriteria()will return anAdvancedCriteriaobject instead of a normalCriteriaobject. Each FormItem will produce oneCriterionaffecting the DataSource field specified bycriteriaField. The criteria produced by the FormItems will be grouped under the logical operator provided byDynamicForm.operator.If operatoris 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 byDynamicForm.defaultSearchOperator.Note: formItem.operatoris only supported for a form that has adataSource. In a form with no DataSource, settingformItem.operatorwill have no effect.- Parameters:
- operator- New operator value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getOperatorOperatorIdto be used whenDynamicForm.getValuesAsCriteria()is called.item.operatorcan be used to create a form that offers search functions such as numeric range filtering, without the more advanced user interface of theFilterBuilder. For example, two SpinnerItems could be created withformItem.operatorset to "greaterThan" and "lessThan" respectively to enable filtering by a numeric range.When item.operatoris set for any FormItem in a form,form.getValuesAsCriteria()will return anAdvancedCriteriaobject instead of a normalCriteriaobject. Each FormItem will produce oneCriterionaffecting the DataSource field specified bycriteriaField. The criteria produced by the FormItems will be grouped under the logical operator provided byDynamicForm.operator.If operatoris 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 byDynamicForm.defaultSearchOperator.Note: formItem.operatoris only supported for a form that has adataSource. In a form with no DataSource, settingformItem.operatorwill have no effect.- Returns:
- Current operator value. Default value is null
- See Also:
 
- 
setOptionDataSourceIf set, this FormItem will map stored values to display values as though acom.smartgwt.client.types.ValueMapwere specified, by fetching records from the specifiedoptionDataSourceand extracting thevalueFieldanddisplayFieldin loaded records, to derive one valueMap entry per record loaded from the optionDataSource.With the default setting of fetchMissingValues, fetches will be initiated against the optionDataSource any time the FormItem has a non-null value and no corresponding display value is available. This includes when the form is first initialized, as well as any subsequent calls tosetValue(), such as may happen whenDynamicForm.editRecord()is called. Retrieved values are automatically cached by the FormItem.Note that if a normal, static valueMapis also specified for the field (either directly in the form item or as part of the field definition in the dataSource), it will be preferred to the data derived from the optionDataSource for whatever mappings are present.In a databound form, if displayFieldis specified for a FormItem andoptionDataSourceis unset,optionDataSourcewill default to the form's current DataSource
 If this method is called after the component has been drawn/initialized: Method to set theoptionDataSourceat runtime- Parameters:
- optionDataSource- new optionDatasource. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getOptionDataSourceIf set, this FormItem will map stored values to display values as though acom.smartgwt.client.types.ValueMapwere specified, by fetching records from the specifiedoptionDataSourceand extracting thevalueFieldanddisplayFieldin loaded records, to derive one valueMap entry per record loaded from the optionDataSource.With the default setting of fetchMissingValues, fetches will be initiated against the optionDataSource any time the FormItem has a non-null value and no corresponding display value is available. This includes when the form is first initialized, as well as any subsequent calls tosetValue(), such as may happen whenDynamicForm.editRecord()is called. Retrieved values are automatically cached by the FormItem.Note that if a normal, static valueMapis also specified for the field (either directly in the form item or as part of the field definition in the dataSource), it will be preferred to the data derived from the optionDataSource for whatever mappings are present.In a databound form, if displayFieldis specified for a FormItem andoptionDataSourceis unset,optionDataSourcewill default to the form's current DataSource- Returns:
- Returns the optionDataSourcefor this item.Always uses item.optionDataSourceif specified. Otherwise, ifDataSourceField.foreignKeywas specified, uses the target DataSource. Otherwise, uses the DataSource of this item's form (if one is configured). Default value is null
- See Also:
 
- 
setOptionDataSourceIf set, this FormItem will map stored values to display values as though acom.smartgwt.client.types.ValueMapwere specified, by fetching records from the specifiedoptionDataSourceand extracting thevalueFieldanddisplayFieldin loaded records, to derive one valueMap entry per record loaded from the optionDataSource.With the default setting of fetchMissingValues, fetches will be initiated against the optionDataSource any time the FormItem has a non-null value and no corresponding display value is available. This includes when the form is first initialized, as well as any subsequent calls tosetValue(), such as may happen whenDynamicForm.editRecord()is called. Retrieved values are automatically cached by the FormItem.Note that if a normal, static valueMapis also specified for the field (either directly in the form item or as part of the field definition in the dataSource), it will be preferred to the data derived from the optionDataSource for whatever mappings are present.In a databound form, if displayFieldis specified for a FormItem andoptionDataSourceis unset,optionDataSourcewill default to the form's current DataSource
 If this method is called after the component has been drawn/initialized: Method to set theoptionDataSourceat runtime- Parameters:
- optionDataSource- new optionDatasource. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getOptionDataSourceAsStringIf set, this FormItem will map stored values to display values as though acom.smartgwt.client.types.ValueMapwere specified, by fetching records from the specifiedoptionDataSourceand extracting thevalueFieldanddisplayFieldin loaded records, to derive one valueMap entry per record loaded from the optionDataSource.With the default setting of fetchMissingValues, fetches will be initiated against the optionDataSource any time the FormItem has a non-null value and no corresponding display value is available. This includes when the form is first initialized, as well as any subsequent calls tosetValue(), such as may happen whenDynamicForm.editRecord()is called. Retrieved values are automatically cached by the FormItem.Note that if a normal, static valueMapis also specified for the field (either directly in the form item or as part of the field definition in the dataSource), it will be preferred to the data derived from the optionDataSource for whatever mappings are present.In a databound form, if displayFieldis specified for a FormItem andoptionDataSourceis unset,optionDataSourcewill default to the form's current DataSource- Returns:
- Returns the optionDataSourcefor this item.Always uses item.optionDataSourceif specified. Otherwise, ifDataSourceField.foreignKeywas specified, uses the target DataSource. Otherwise, uses the DataSource of this item's form (if one is configured). Default value is null
- See Also:
 
- 
setOptionOperationIdIf this item has a specifiedoptionDataSource, this attribute may be set to specify an explicitDSRequest.operationIdwhen performing a fetch against the option dataSource to pick up display value mapping.Note : This is an advanced setting - Parameters:
- optionOperationId- New optionOperationId value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getOptionOperationIdIf this item has a specifiedoptionDataSource, this attribute may be set to specify an explicitDSRequest.operationIdwhen performing a fetch against the option dataSource to pick up display value mapping.- Returns:
- Current optionOperationId value. Default value is null
- See Also:
 
- 
setOptionTextMatchStyleIf this item has a specifiedoptionDataSource, this property determines the textMatchStyle to use when interpretating anyoptionCriteriaduring the fetch to map valueField values to displayField values.Note : This is an advanced setting - Parameters:
- optionTextMatchStyle- New optionTextMatchStyle value. Default value is "exact"
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getOptionTextMatchStyleIf this item has a specifiedoptionDataSource, this property determines the textMatchStyle to use when interpretating anyoptionCriteriaduring the fetch to map valueField values to displayField values.- Returns:
- Current optionTextMatchStyle value. Default value is "exact"
- See Also:
 
- 
setOriginalValueMessageMessage shown whenshowOldValueInHoveris enabled and the value has been modified.If unset, defaults to the form's DynamicForm.originalValueMessage. Otherwise, overrides the form-defaultoriginalValueMessagefor this item.Note : This is an advanced setting - Parameters:
- originalValueMessage- New originalValueMessage value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getOriginalValueMessageMessage shown whenshowOldValueInHoveris enabled and the value has been modified.If unset, defaults to the form's DynamicForm.originalValueMessage. Otherwise, overrides the form-defaultoriginalValueMessagefor this item.- Returns:
- Current originalValueMessage value. Default value is null
- See Also:
 
- 
getPickerThe component that will be displayed whenshowPicker()is called due to a click on thepicker icon.Can be specified directly as a Canvas, or created automatically via the com.smartgwt.client.types.AutoChildpattern. The default autoChild configuration for the picker is a Canvas with backgroundColor set and no other modifications.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().This component is an AutoChild named "picker". For an overview of how to use and configure AutoChildren, see Using AutoChildren.- Returns:
- Current picker value. Default value is null
 
- 
setPickerIconHeightIfshowPickerIconis 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.Note that if spriting is being used, and the image to be displayed is specified using css properties such as background-image,background-size, changing this value may result in an unexpected appearance as the image will not scale.
 Scaleable spriting can be achieved using theSCSpriteConfigformat. See the section on spriting in theskinning overviewfor further information.Note : This is an advanced setting - Parameters:
- pickerIconHeight- New pickerIconHeight value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
 
- 
getPickerIconHeightIfshowPickerIconis 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.Note that if spriting is being used, and the image to be displayed is specified using css properties such as background-image,background-size, changing this value may result in an unexpected appearance as the image will not scale.
 Scaleable spriting can be achieved using theSCSpriteConfigformat. See the section on spriting in theskinning overviewfor further information.- Returns:
- Current pickerIconHeight value. Default value is null
 
- 
setPickerIconNameIfshowPickerIconis true, this attribute specifies theFormItemIcon.nameapplied to the picker iconNote : This is an advanced setting - Parameters:
- pickerIconName- New pickerIconName value. Default value is "picker"
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getPickerIconNameIfshowPickerIconis true, this attribute specifies theFormItemIcon.nameapplied to the picker icon- Returns:
- Current pickerIconName value. Default value is "picker"
- See Also:
 
- 
setPickerIconPromptPrompt to show when the user hovers the mouse over the picker icon.- Parameters:
- pickerIconPrompt- New pickerIconPrompt value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getPickerIconPromptPrompt to show when the user hovers the mouse over the picker icon.- Returns:
- Current pickerIconPrompt value. Default value is null
- See Also:
 
- 
setPickerIconPropertiesIfshowPickerIconis 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- New pickerIconProperties value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
 
- 
getPickerIconPropertiesIfshowPickerIconis true for this item, this block of properties will be applied to the pickerIcon. Allows for advanced customization of this icon.- Returns:
- Current pickerIconProperties value. Default value is null
 
- 
setPickerIconSrcIfshowPickerIconis true for this item, this property governs thesrcof the picker icon image to be displayed.Spritingcan be used for this image, by setting this property to aSCSpriteConfigformatted string.Note : This is an advanced setting 
- 
getPickerIconSrcIfshowPickerIconis true for this item, this property governs thesrcof the picker icon image to be displayed.Spritingcan be used for this image, by setting this property to aSCSpriteConfigformatted string.- Returns:
- Current pickerIconSrc value. Default value is ""
- See Also:
 
- 
setPickerIconStyleBase CSS class name for a form item's picker icon cell. If unset, inherits from this item'scontrolStyle.- Parameters:
- pickerIconStyle- New pickerIconStyle value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getPickerIconStyleBase CSS class name for a form item's picker icon cell. If unset, inherits from this item'scontrolStyle.- Returns:
- Current pickerIconStyle value. Default value is null
- See Also:
 
- 
setPickerIconWidthIfshowPickerIconis 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.Note that if spriting is being used, and the image to be displayed is specified using css properties such as background-image,background-size, changing this value may result in an unexpected appearance as the image will not scale.
 Scaleable spriting can be achieved using theSCSpriteConfigformat. See the section on spriting in theskinning overviewfor further information.Note : This is an advanced setting - Parameters:
- pickerIconWidth- New pickerIconWidth value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
 
- 
getPickerIconWidthIfshowPickerIconis 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.Note that if spriting is being used, and the image to be displayed is specified using css properties such as background-image,background-size, changing this value may result in an unexpected appearance as the image will not scale.
 Scaleable spriting can be achieved using theSCSpriteConfigformat. See the section on spriting in theskinning overviewfor further information.- Returns:
- Current pickerIconWidth value. Default value is null
 
- 
setPrintReadOnlyTextBoxStyleCSS class name to apply to the print view of an item's text box if the item iscanEdit:false, withreadOnlyDisplay:static.If specified this will take precedence over printTextBoxStylefor static readonly items.- Parameters:
- printReadOnlyTextBoxStyle- New printReadOnlyTextBoxStyle value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getPrintReadOnlyTextBoxStyleCSS class name to apply to the print view of an item's text box if the item iscanEdit:false, withreadOnlyDisplay:static.If specified this will take precedence over printTextBoxStylefor static readonly items.- Returns:
- Current printReadOnlyTextBoxStyle value. Default value is null
- See Also:
 
- 
setPrintTextBoxStyleBase CSS class name for a form item's text box element when getting printable HTML for the form. If unsettextBoxStylewill be used instead. Note that focused styling will never be displayed while printing, though error and disabled styling will.By default this style will be used for printHTML for the item even if the item is canEdit:falsewithreadOnlyDisplay:static.
 To override this behavior, developers may also specify a custom print style for this state via theprintReadOnlyTextBoxStyle.- Parameters:
- printTextBoxStyle- New printTextBoxStyle value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getPrintTextBoxStyleBase CSS class name for a form item's text box element when getting printable HTML for the form. If unsettextBoxStylewill be used instead. Note that focused styling will never be displayed while printing, though error and disabled styling will.By default this style will be used for printHTML for the item even if the item is canEdit:falsewithreadOnlyDisplay:static.
 To override this behavior, developers may also specify a custom print style for this state via theprintReadOnlyTextBoxStyle.- Returns:
- Current printTextBoxStyle value. Default value is null
- See Also:
 
- 
setPrintTitleStyleBase CSS stylename for a form item's title when generating print HTML for the item. If unsettitleStylewill be used instead.- Parameters:
- printTitleStyle- New printTitleStyle value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getPrintTitleStyleBase CSS stylename for a form item's title when generating print HTML for the item. If unsettitleStylewill be used instead.- Returns:
- Current printTitleStyle value. Default value is null
- See Also:
 
- 
setPromptThis text is shown as a tooltip prompt when the cursor hovers over this item.When the item is read-onlya different hover can be shown withreadOnlyHover. Or, when the item isdisabledor read-only withreadOnlyDisplay:disableda different hover can be shown withdisabledHover.Note that when the form is disabled, or when this itemsuppresses hovers, this prompt will not be shown.
 If this method is called after the component has been drawn/initialized: Sets thepromptfor this item.- Parameters:
- prompt- new prompt for the item. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getPromptThis text is shown as a tooltip prompt when the cursor hovers over this item.When the item is read-onlya different hover can be shown withreadOnlyHover. Or, when the item isdisabledor read-only withreadOnlyDisplay:disableda different hover can be shown withdisabledHover.Note that when the form is disabled, or when this itemsuppresses hovers, this prompt will not be shown.- Returns:
- Current prompt value. Default value is null
- See Also:
 
- 
setReadOnlyCanSelectTextFor items showing a text value withcanEditset to false, should the user be able to select the text in the item?Default behavior allows selection if readOnlyDisplayis"static"or"readOnly"[but not"disabled"]. Developers may add or remove ReadOnlyDisplayAppearance values to change this behavior.Note that this does not apply to disabled items, where text selection is never enabled- Parameters:
- readOnlyCanSelectText- New readOnlyCanSelectText value. Default value is ["static", "readOnly"]
- Returns:
- FormIteminstance, for chaining setter calls
 
- 
getReadOnlyCanSelectTextFor items showing a text value withcanEditset to false, should the user be able to select the text in the item?Default behavior allows selection if readOnlyDisplayis"static"or"readOnly"[but not"disabled"]. Developers may add or remove ReadOnlyDisplayAppearance values to change this behavior.Note that this does not apply to disabled items, where text selection is never enabled- Returns:
- Current readOnlyCanSelectText value. Default value is ["static", "readOnly"]
 
- 
setReadOnlyControlStyleModifiedcontrol styleto apply when this item isread-onlyand is usingreadOnlyDisplayReadOnlyDisplayAppearance.STATIC.- Parameters:
- readOnlyControlStyle- New readOnlyControlStyle value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getReadOnlyControlStyleModifiedcontrol styleto apply when this item isread-onlyand is usingreadOnlyDisplayReadOnlyDisplayAppearance.STATIC.- Returns:
- Current readOnlyControlStyle value. Default value is null
- See Also:
 
- 
setReadOnlyDisplayIf this item isread-only, how should this item be displayed to the user? If set, overrides the form-levelDynamicForm.readOnlyDisplaydefault.
 If this method is called after the component has been drawn/initialized: Setter forreadOnlyDisplay.Note that calling this method for a ButtonItemwithButtonItem.enableWhenset is an error, sincereadOnlyDisplayis then considered to always be "disabled".- Parameters:
- readOnlyDisplay- new- readOnlyDisplayvalue. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getReadOnlyDisplayIf this item isread-only, how should this item be displayed to the user? If set, overrides the form-levelDynamicForm.readOnlyDisplaydefault.- Returns:
- Current readOnlyDisplay value. Default value is null
- See Also:
 
- 
setReadOnlyHoverThis text is shown as a tooltip prompt when the cursor hovers over this item and the item isread-only.Note that when the form is disabled, or when this itemsuppresses hovers, nothing will be shown.- Parameters:
- readOnlyHover- New readOnlyHover value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getReadOnlyHoverThis text is shown as a tooltip prompt when the cursor hovers over this item and the item isread-only.Note that when the form is disabled, or when this itemsuppresses hovers, nothing will be shown.- Returns:
- Current readOnlyHover value. Default value is null
- See Also:
 
- 
setReadOnlyTextBoxStyleBase text box style to apply when this item isread-onlyand is usingreadOnlyDisplayReadOnlyDisplayAppearance.STATIC. If set, overrides the form-levelDynamicForm.readOnlyTextBoxStyledefault.- Parameters:
- readOnlyTextBoxStyle- New readOnlyTextBoxStyle value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getReadOnlyTextBoxStyleBase text box style to apply when this item isread-onlyand is usingreadOnlyDisplayReadOnlyDisplayAppearance.STATIC. If set, overrides the form-levelDynamicForm.readOnlyTextBoxStyledefault.- Returns:
- Current readOnlyTextBoxStyle value. Default value is null
- See Also:
 
- 
setReadOnlyWhenCriteria to be evaluated to determine whether this FormItem should be maderead-only. Appearance when read-only is determined byreadOnlyDisplay.Criteria are evaluated against the form's current valuesas well as the currentrule context. Criteria are re-evaluated every time form values or the rule context changes, whether by end user action or by programmatic calls.A basic criteria uses textMatchStyle:"exact". When specified in Component XMLthis property allowsshorthand formatsfor defining criteria.Note: A FormItem using readOnlyWhen must have a namedefined.shouldSaveValuecan be set tofalseto prevent the field from storing its value into the form's values.- Parameters:
- readOnlyWhen- New readOnlyWhen value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getReadOnlyWhenCriteria to be evaluated to determine whether this FormItem should be maderead-only. Appearance when read-only is determined byreadOnlyDisplay.Criteria are evaluated against the form's current valuesas well as the currentrule context. Criteria are re-evaluated every time form values or the rule context changes, whether by end user action or by programmatic calls.A basic criteria uses textMatchStyle:"exact". When specified in Component XMLthis property allowsshorthand formatsfor defining criteria.Note: A FormItem using readOnlyWhen must have a namedefined.shouldSaveValuecan be set tofalseto prevent the field from storing its value into the form's values.- Returns:
- Current readOnlyWhen value. Default value is null
- See Also:
 
- 
setRedrawOnChangeIf true, this item will cause the entire form to be redrawn when the item's "elementChanged" event is done firing- Parameters:
- redrawOnChange- New redrawOnChange value. Default value is false
- Returns:
- FormIteminstance, for chaining setter calls
 
- 
getRedrawOnChangeIf true, this item will cause the entire form to be redrawn when the item's "elementChanged" event is done firing- Returns:
- Current redrawOnChange value. Default value is false
 
- 
setRejectInvalidValueOnChangeIf 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- New rejectInvalidValueOnChange value. Default value is false
- Returns:
- FormIteminstance, for chaining setter calls
 
- 
getRejectInvalidValueOnChangeIf 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:
- Current rejectInvalidValueOnChange value. Default value is false
 
- 
setRequiredWhether 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,DynamicForm.requiredMessage,DataSource.requiredMessage,requiredField.Note: if specified on a FormItem, requiredis only enforced on the client.requiredshould generally be specified on aDataSourceField.
 If this method is called after the component has been drawn/initialized: Setter to mark this formItem asrequired, or not required at runtime. Note that an alternative approach to updating therequiredflag directly would be to simply use arequiredIftype 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 validate()orDynamicForm.clearErrors().- Overrides:
- setRequiredin class- Field
- Parameters:
- required- new- requiredvalue. Default value is false
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getRequiredWhether 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,DynamicForm.requiredMessage,DataSource.requiredMessage,requiredField.Note: if specified on a FormItem, requiredis only enforced on the client.requiredshould generally be specified on aDataSourceField.- Returns:
- Current required value. Default value is false
- See Also:
 
- 
setRequiredMessageThe required message for required field errors.- Parameters:
- requiredMessage- New requiredMessage value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getRequiredMessageThe required message for required field errors.- Returns:
- Current requiredMessage value. Default value is null
- See Also:
 
- 
setRequiredWhenCriteria to be evaluated to determine whether this FormItem should berequired.Criteria are evaluated against the form's current valuesas well as the currentrule context. Criteria are re-evaluated every time form values or the rule context changes, whether by end user action or by programmatic calls.A basic criteria uses textMatchStyle:"exact". When specified in Component XMLthis property allowsshorthand formatsfor defining criteria.Note: A FormItem using requiredWhen must have a namedefined.- Parameters:
- requiredWhen- New requiredWhen value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getRequiredWhenCriteria to be evaluated to determine whether this FormItem should berequired.Criteria are evaluated against the form's current valuesas well as the currentrule context. Criteria are re-evaluated every time form values or the rule context changes, whether by end user action or by programmatic calls.A basic criteria uses textMatchStyle:"exact". When specified in Component XMLthis property allowsshorthand formatsfor defining criteria.Note: A FormItem using requiredWhen must have a namedefined.- Returns:
- Current requiredWhen value. Default value is null
- See Also:
 
- 
setRowSpanNumber of rows that this item spans- Parameters:
- rowSpan- New rowSpan value. Default value is 1
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getRowSpanpublic int getRowSpan()Number of rows that this item spans- Returns:
- Current rowSpan value. Default value is 1
- See Also:
 
- 
setSaveOnEnterSet this to true to allow the parent form to save it's data when 'Enter' is pressed on this formItem andsaveOnEnteris true on the parent form.- Parameters:
- saveOnEnter- New saveOnEnter value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
 
- 
getSaveOnEnterSet this to true to allow the parent form to save it's data when 'Enter' is pressed on this formItem andsaveOnEnteris true on the parent form.- Returns:
- Current saveOnEnter value. Default value is null
 
- 
setSelectOnClickAllows theselectOnClickbehavior to be configured on a per-FormItem basis. Normally all items in a form default to the value ofDynamicForm.selectOnClick.
- 
getSelectOnClickAllows theselectOnClickbehavior to be configured on a per-FormItem basis. Normally all items in a form default to the value ofDynamicForm.selectOnClick.- Returns:
- Current selectOnClick value. Default value is null
- See Also:
 
- 
setSelectOnFocusAllows theselectOnFocusbehavior to be configured on a per-FormItem basis. Normally all items in a form default to the value ofDynamicForm.selectOnFocus.
- 
getSelectOnFocusAllows theselectOnFocusbehavior to be configured on a per-FormItem basis. Normally all items in a form default to the value ofDynamicForm.selectOnFocus.- Returns:
- Current selectOnFocus value. Default value is null
- See Also:
 
- 
setShouldSaveValueShould this item's value be saved in the form's values and hence returned fromform.getValues()?shouldSaveValue:falseis used to mark formItems which do not correspond to the underlying data model and should not save a value into the form'svalues. Example includes visual separators, password re-type fields, or checkboxes used to show/hide other form items.A shouldSaveValue:falseitem should be given a value either viadefaultValueor by callingform.setValue(item, value)orformItem.setValue(value). Providing a value viaform.valuesorform.setValues()will automatically switch the item toshouldSaveValue:true.Note that - if an item is shouldSaveValue true, but has no name, a warning is logged, and shouldSaveValue will be set to false.
 - Parameters:
- shouldSaveValue- New shouldSaveValue value. Default value is true
- Returns:
- FormIteminstance, for chaining setter calls
 
- 
getShouldSaveValueShould this item's value be saved in the form's values and hence returned fromform.getValues()?shouldSaveValue:falseis used to mark formItems which do not correspond to the underlying data model and should not save a value into the form'svalues. Example includes visual separators, password re-type fields, or checkboxes used to show/hide other form items.A shouldSaveValue:falseitem should be given a value either viadefaultValueor by callingform.setValue(item, value)orformItem.setValue(value). Providing a value viaform.valuesorform.setValues()will automatically switch the item toshouldSaveValue:true.Note that - if an item is shouldSaveValue true, but has no name, a warning is logged, and shouldSaveValue will be set to false.
 - Returns:
- Current shouldSaveValue value. Default value is true
 
- 
setShowClippedTitleOnHoverIf true and the title is clipped, then a hover containing the full title of this item is enabled.A TitleHoverEventis 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 aFormItemHoverFormatteron either thisFormItemor theDynamicForm. SeesetItemTitleHoverFormatter().If the item suppresses hovers, nothing will be shown.- Parameters:
- showClippedTitleOnHover- New showClippedTitleOnHover value. Default value is true
- Returns:
- FormIteminstance, for chaining setter calls
 
- 
getShowClippedTitleOnHoverpublic boolean getShowClippedTitleOnHover()If true and the title is clipped, then a hover containing the full title of this item is enabled.A TitleHoverEventis 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 aFormItemHoverFormatteron either thisFormItemor theDynamicForm. SeesetItemTitleHoverFormatter().If the item suppresses hovers, nothing will be shown.- Returns:
- Current showClippedTitleOnHover value. Default value is true
 
- 
setShowClippedValueOnHoverIf true and the value is clipped, then a hover containing the full value of this item is enabled.A ValueHoverEventis 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 aFormItemHoverFormatteron either thisFormItemor theDynamicForm. SeesetItemValueHoverFormatter().If the item suppresses hovers, nothing will be shown.- Parameters:
- showClippedValueOnHover- New showClippedValueOnHover value. Default value is true
- Returns:
- FormIteminstance, for chaining setter calls
 
- 
getShowClippedValueOnHoverIf true and the value is clipped, then a hover containing the full value of this item is enabled.A ValueHoverEventis 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 aFormItemHoverFormatteron either thisFormItemor theDynamicForm. SeesetItemValueHoverFormatter().If the item suppresses hovers, nothing will be shown.- Returns:
- Current showClippedValueOnHover value. Default value is true
 
- 
setShowDeletionsFor items that supportmultiple values, this causes distinct CSS styling to be applied to values that the user has unselected.Only allowed when showPendingistrue. Defaults to the form-levelDynamicForm.showDeletionssetting if set; otherwise, to the value ofshowPending.Only supported for MultiComboBoxItemand forSelectItemwhenmultiple:trueis set. The specific default behaviors are:- For MultiComboBoxItem, buttons corresponding to deleted values (also called "deselected buttons") will be disabled and have theirButton.baseStyleset toMultiComboBoxItem.deselectedButtonStyle.
- For a multiple SelectItem,valueDeselectedCSSTextis applied to any deleted value in the text box. In addition, "Deselected" is appended to the cells'ListGrid.baseStylefor cells in the pickList menu corresponding to deleted values.
 NOTE: When a value is shown as deleted, this is not reflected to screen readers, and screen readers are instructed to ignore the deleted value. Therefore, it is not advisable to design a UI where it is necessary for the user to know whether a value is shown as deleted in order to work with the form. Note : This is an advanced setting - Parameters:
- showDeletions- New showDeletions value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- For 
- 
getShowDeletionsFor items that supportmultiple values, this causes distinct CSS styling to be applied to values that the user has unselected.Only allowed when showPendingistrue. Defaults to the form-levelDynamicForm.showDeletionssetting if set; otherwise, to the value ofshowPending.Only supported for MultiComboBoxItemand forSelectItemwhenmultiple:trueis set. The specific default behaviors are:- For MultiComboBoxItem, buttons corresponding to deleted values (also called "deselected buttons") will be disabled and have theirButton.baseStyleset toMultiComboBoxItem.deselectedButtonStyle.
- For a multiple SelectItem,valueDeselectedCSSTextis applied to any deleted value in the text box. In addition, "Deselected" is appended to the cells'ListGrid.baseStylefor cells in the pickList menu corresponding to deleted values.
 NOTE: When a value is shown as deleted, this is not reflected to screen readers, and screen readers are instructed to ignore the deleted value. Therefore, it is not advisable to design a UI where it is necessary for the user to know whether a value is shown as deleted in order to work with the form. - Returns:
- Current showDeletions value. Default value is null
- See Also:
 
- For 
- 
setShowDisabledWhen this item is disabled, should it be re-styled to indicate its disabled state?See FormItemStylingfor more details on formItem styling.
 If this method is called after the component has been drawn/initialized: Setter method forshowDisabledNote : This is an advanced setting - Parameters:
- showDisabled- new showDisabled setting. Default value is true
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getShowDisabledWhen this item is disabled, should it be re-styled to indicate its disabled state?See FormItemStylingfor more details on formItem styling.- Returns:
- Current showDisabled value. Default value is true
- See Also:
 
- 
setShowDisabledIconsOnFocusIfshowIconsOnFocusis true, should icons marked as disabled be shown on focus?Default setting is false- it is not commonly desirable to present a user with a disabled icon on focus.Can be overridden at the icon level by FormItemIcon.showDisabledOnFocusNote : This is an advanced setting - Parameters:
- showDisabledIconsOnFocus- New showDisabledIconsOnFocus value. Default value is false
- Returns:
- FormIteminstance, for chaining setter calls
 
- 
getShowDisabledIconsOnFocusIfshowIconsOnFocusis true, should icons marked as disabled be shown on focus?Default setting is false- it is not commonly desirable to present a user with a disabled icon on focus.Can be overridden at the icon level by FormItemIcon.showDisabledOnFocus- Returns:
- Current showDisabledIconsOnFocus value. Default value is false
 
- 
setShowDisabledPickerIconOnFocusIfshowPickerIconOnFocusis true, should the picker icon be shown on focus if it is disabled (as in a read-only item, for example?)Default setting is false- it is not commonly desirable to present a user with a disabled icon on focus.Can be overridden at the icon level by FormItemIcon.showDisabledOnFocusNote : This is an advanced setting - Parameters:
- showDisabledPickerIconOnFocus- New showDisabledPickerIconOnFocus value. Default value is false
- Returns:
- FormIteminstance, for chaining setter calls
 
- 
getShowDisabledPickerIconOnFocusIfshowPickerIconOnFocusis true, should the picker icon be shown on focus if it is disabled (as in a read-only item, for example?)Default setting is false- it is not commonly desirable to present a user with a disabled icon on focus.Can be overridden at the icon level by FormItemIcon.showDisabledOnFocus- Returns:
- Current showDisabledPickerIconOnFocus value. Default value is false
 
- 
setShowErrorIconshowErrorIcons,showErrorText,errorOrientation, andshowErrorStylecontrol 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, setshowInlineErrors:false.showErrorIcons,showErrorText,errorOrientationandshowErrorStyleare 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 getErrorHTML(). The default implementation of that method respectsshowErrorIconsandshowErrorTextas follows:showErrorIcons, orshowErrorIconat the FormItem level controls whether an error icon should appear next to fields which have validation errors. The icon's appearance is governed byerrorIconSrc,errorIconWidthanderrorIconHeightshowErrorTextdetermines whether the text of the validation error should be displayed next to fields which have validation errors. The attributeDynamicForm.showTitlesWithErrorMessagesmay be set to prefix error messages with the form item's title +":"(may be desired if the item hasshowTitleset to false).
 IfshowErrorTextis unset, the error text will be shown ifDynamicForm.linearModeis true (orDynamicForm.linearOnMobileis true for mobile devices), otherwise it will not be shown.In addition to this: DynamicForm.errorOrientationcontrols where the error HTML should appear relative to form items. Therefore the combination ofshowErrorText:falseanderrorOrientation:"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).
 IferrorOrientationis unset, the error orientation will default to "top" ifDynamicForm.linearModeis enabled (orDynamicForm.linearOnMobileis true for mobile devices) and error text is not showing, "left" otherwise.showErrorStyledetermines whether fields with validation errors should have special styling applied to them. Error styling is achieved by applying suffixes to existing styling applied to various parts of the form item. SeeFormItemBaseStylefor more on this.- Parameters:
- showErrorIcon- New showErrorIcon value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getShowErrorIconshowErrorIcons,showErrorText,errorOrientation, andshowErrorStylecontrol 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, setshowInlineErrors:false.showErrorIcons,showErrorText,errorOrientationandshowErrorStyleare 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 getErrorHTML(). The default implementation of that method respectsshowErrorIconsandshowErrorTextas follows:showErrorIcons, orshowErrorIconat the FormItem level controls whether an error icon should appear next to fields which have validation errors. The icon's appearance is governed byerrorIconSrc,errorIconWidthanderrorIconHeightshowErrorTextdetermines whether the text of the validation error should be displayed next to fields which have validation errors. The attributeDynamicForm.showTitlesWithErrorMessagesmay be set to prefix error messages with the form item's title +":"(may be desired if the item hasshowTitleset to false).
 IfshowErrorTextis unset, the error text will be shown ifDynamicForm.linearModeis true (orDynamicForm.linearOnMobileis true for mobile devices), otherwise it will not be shown.In addition to this: DynamicForm.errorOrientationcontrols where the error HTML should appear relative to form items. Therefore the combination ofshowErrorText:falseanderrorOrientation:"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).
 IferrorOrientationis unset, the error orientation will default to "top" ifDynamicForm.linearModeis enabled (orDynamicForm.linearOnMobileis true for mobile devices) and error text is not showing, "left" otherwise.showErrorStyledetermines whether fields with validation errors should have special styling applied to them. Error styling is achieved by applying suffixes to existing styling applied to various parts of the form item. SeeFormItemBaseStylefor more on this.- Returns:
- Current showErrorIcon value. Default value is null
- See Also:
 
- 
setShowErrorIconInlineWhen set to true, this attribute renders theerror-iconinlinein the FormItem, next to other icons, instead of in a separate error-element outside of the item's main editor. When rendering the error-icon inline, theerror-textis not displayed but is available in the icon's hover.Icon-propertiescan be applied to the error-icon viaerrorIconProperties.Note : This is an advanced setting - Parameters:
- showErrorIconInline- New showErrorIconInline value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
 
- 
getShowErrorIconInlineWhen set to true, this attribute renders theerror-iconinlinein the FormItem, next to other icons, instead of in a separate error-element outside of the item's main editor. When rendering the error-icon inline, theerror-textis not displayed but is available in the icon's hover.Icon-propertiescan be applied to the error-icon viaerrorIconProperties.- Returns:
- Current showErrorIconInline value. Default value is null
 
- 
setShowErrorStyleshowErrorIcons,showErrorText,errorOrientation, andshowErrorStylecontrol 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, setshowInlineErrors:false.showErrorIcons,showErrorText,errorOrientationandshowErrorStyleare 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 getErrorHTML(). The default implementation of that method respectsshowErrorIconsandshowErrorTextas follows:showErrorIcons, orshowErrorIconat the FormItem level controls whether an error icon should appear next to fields which have validation errors. The icon's appearance is governed byerrorIconSrc,errorIconWidthanderrorIconHeightshowErrorTextdetermines whether the text of the validation error should be displayed next to fields which have validation errors. The attributeDynamicForm.showTitlesWithErrorMessagesmay be set to prefix error messages with the form item's title +":"(may be desired if the item hasshowTitleset to false).
 IfshowErrorTextis unset, the error text will be shown ifDynamicForm.linearModeis true (orDynamicForm.linearOnMobileis true for mobile devices), otherwise it will not be shown.In addition to this: DynamicForm.errorOrientationcontrols where the error HTML should appear relative to form items. Therefore the combination ofshowErrorText:falseanderrorOrientation:"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).
 IferrorOrientationis unset, the error orientation will default to "top" ifDynamicForm.linearModeis enabled (orDynamicForm.linearOnMobileis true for mobile devices) and error text is not showing, "left" otherwise.showErrorStyledetermines whether fields with validation errors should have special styling applied to them. Error styling is achieved by applying suffixes to existing styling applied to various parts of the form item. SeeFormItemBaseStylefor more on this.- Parameters:
- showErrorStyle- New showErrorStyle value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getShowErrorStyleshowErrorIcons,showErrorText,errorOrientation, andshowErrorStylecontrol 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, setshowInlineErrors:false.showErrorIcons,showErrorText,errorOrientationandshowErrorStyleare 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 getErrorHTML(). The default implementation of that method respectsshowErrorIconsandshowErrorTextas follows:showErrorIcons, orshowErrorIconat the FormItem level controls whether an error icon should appear next to fields which have validation errors. The icon's appearance is governed byerrorIconSrc,errorIconWidthanderrorIconHeightshowErrorTextdetermines whether the text of the validation error should be displayed next to fields which have validation errors. The attributeDynamicForm.showTitlesWithErrorMessagesmay be set to prefix error messages with the form item's title +":"(may be desired if the item hasshowTitleset to false).
 IfshowErrorTextis unset, the error text will be shown ifDynamicForm.linearModeis true (orDynamicForm.linearOnMobileis true for mobile devices), otherwise it will not be shown.In addition to this: DynamicForm.errorOrientationcontrols where the error HTML should appear relative to form items. Therefore the combination ofshowErrorText:falseanderrorOrientation:"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).
 IferrorOrientationis unset, the error orientation will default to "top" ifDynamicForm.linearModeis enabled (orDynamicForm.linearOnMobileis true for mobile devices) and error text is not showing, "left" otherwise.showErrorStyledetermines whether fields with validation errors should have special styling applied to them. Error styling is achieved by applying suffixes to existing styling applied to various parts of the form item. SeeFormItemBaseStylefor more on this.- Returns:
- Current showErrorStyle value. Default value is null
- See Also:
 
- 
setShowErrorTextshowErrorIcons,showErrorText,errorOrientation, andshowErrorStylecontrol 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, setshowInlineErrors:false.showErrorIcons,showErrorText,errorOrientationandshowErrorStyleare 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 getErrorHTML(). The default implementation of that method respectsshowErrorIconsandshowErrorTextas follows:showErrorIcons, orshowErrorIconat the FormItem level controls whether an error icon should appear next to fields which have validation errors. The icon's appearance is governed byerrorIconSrc,errorIconWidthanderrorIconHeightshowErrorTextdetermines whether the text of the validation error should be displayed next to fields which have validation errors. The attributeDynamicForm.showTitlesWithErrorMessagesmay be set to prefix error messages with the form item's title +":"(may be desired if the item hasshowTitleset to false).
 IfshowErrorTextis unset, the error text will be shown ifDynamicForm.linearModeis true (orDynamicForm.linearOnMobileis true for mobile devices), otherwise it will not be shown.In addition to this: DynamicForm.errorOrientationcontrols where the error HTML should appear relative to form items. Therefore the combination ofshowErrorText:falseanderrorOrientation:"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).
 IferrorOrientationis unset, the error orientation will default to "top" ifDynamicForm.linearModeis enabled (orDynamicForm.linearOnMobileis true for mobile devices) and error text is not showing, "left" otherwise.showErrorStyledetermines whether fields with validation errors should have special styling applied to them. Error styling is achieved by applying suffixes to existing styling applied to various parts of the form item. SeeFormItemBaseStylefor more on this.- Parameters:
- showErrorText- New showErrorText value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getShowErrorTextshowErrorIcons,showErrorText,errorOrientation, andshowErrorStylecontrol 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, setshowInlineErrors:false.showErrorIcons,showErrorText,errorOrientationandshowErrorStyleare 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 getErrorHTML(). The default implementation of that method respectsshowErrorIconsandshowErrorTextas follows:showErrorIcons, orshowErrorIconat the FormItem level controls whether an error icon should appear next to fields which have validation errors. The icon's appearance is governed byerrorIconSrc,errorIconWidthanderrorIconHeightshowErrorTextdetermines whether the text of the validation error should be displayed next to fields which have validation errors. The attributeDynamicForm.showTitlesWithErrorMessagesmay be set to prefix error messages with the form item's title +":"(may be desired if the item hasshowTitleset to false).
 IfshowErrorTextis unset, the error text will be shown ifDynamicForm.linearModeis true (orDynamicForm.linearOnMobileis true for mobile devices), otherwise it will not be shown.In addition to this: DynamicForm.errorOrientationcontrols where the error HTML should appear relative to form items. Therefore the combination ofshowErrorText:falseanderrorOrientation:"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).
 IferrorOrientationis unset, the error orientation will default to "top" ifDynamicForm.linearModeis enabled (orDynamicForm.linearOnMobileis true for mobile devices) and error text is not showing, "left" otherwise.showErrorStyledetermines whether fields with validation errors should have special styling applied to them. Error styling is achieved by applying suffixes to existing styling applied to various parts of the form item. SeeFormItemBaseStylefor more on this.- Returns:
- Current showErrorText value. Default value is null
- See Also:
 
- 
setShowFocusedWhen this item receives focus, should it be re-styled to indicate it has focus?See FormItemStylingfor more details on formItem styling.Note : This is an advanced setting - Parameters:
- showFocused- New showFocused value. Default value is false
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getShowFocusedWhen this item receives focus, should it be re-styled to indicate it has focus?See FormItemStylingfor more details on formItem styling.- Returns:
- Current showFocused value. Default value is false
- See Also:
 
- 
setShowFocusedErrorStateIf 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- New showFocusedErrorState value. Default value is false
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getShowFocusedErrorStateIf set to true, when an item has errors and is focused, an "ErrorFocused" suffix will appear on the stylename.- Returns:
- Current showFocusedErrorState value. Default value is false
- See Also:
 
- 
setShowFocusedIconsIf 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 formItemIconshowFocusedproperty.Note : This is an advanced setting - Parameters:
- showFocusedIcons- New showFocusedIcons value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
 
- 
getShowFocusedIconsIf 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 formItemIconshowFocusedproperty.- Returns:
- Current showFocusedIcons value. Default value is null
 
- 
setShowFocusedPickerIconIfshowPickerIconis true for this item, should the picker icon show a focused image when the form item has focus?- Parameters:
- showFocusedPickerIcon- New showFocusedPickerIcon value. Default value is false
- Returns:
- FormIteminstance, for chaining setter calls
 
- 
getShowFocusedPickerIconIfshowPickerIconis true for this item, should the picker icon show a focused image when the form item has focus?- Returns:
- Current showFocusedPickerIcon value. Default value is false
 
- 
setShowHintIf a hint is defined for this form item, should it be shown?Note : This is an advanced setting - Parameters:
- showHint- New showHint value. Default value is true
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getShowHintIf a hint is defined for this form item, should it be shown?- Returns:
- Current showHint value. Default value is true
- See Also:
 
- 
setShowIconsSet to false to suppress writing out anyiconsfor this item.Note : This is an advanced setting - Parameters:
- showIcons- New showIcons value. Default value is true
- Returns:
- FormIteminstance, for chaining setter calls
 
- 
getShowIconsSet to false to suppress writing out anyiconsfor this item.- Returns:
- Current showIcons value. Default value is true
 
- 
setShowIconsOnFocusShow theiconswhen the item gets focus, and hide them when it loses focus. Can be overridden at the icon level byFormItemIcon.showOnFocus.Note that icons marked as disabled will not be shown on focus even if this flag is true by default. This may be overridden by showDisabledIconsOnFocus.
 If this method is called after the component has been drawn/initialized: SetsshowIconsOnFocusand causes the visibility of alliconsto be updated and the item redrawn as appropriate.Note : This is an advanced setting - Parameters:
- showIconsOnFocus- new value of- showIconsOnFocus. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
 
- 
getShowIconsOnFocusShow theiconswhen the item gets focus, and hide them when it loses focus. Can be overridden at the icon level byFormItemIcon.showOnFocus.Note that icons marked as disabled will not be shown on focus even if this flag is true by default. This may be overridden by showDisabledIconsOnFocus.- Returns:
- Current showIconsOnFocus value. Default value is null
 
- 
setShowImageAsURLFor fields oftype:"image", if the field is non editable, and being displayed withreadOnlyDisplay:"static", should the value (URL) be displayed as text, or should an image be rendered?If unset, DynamicForm.showImageAsURLwill be consulted instead.- Parameters:
- showImageAsURL- New showImageAsURL value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
 
- 
getShowImageAsURLFor fields oftype:"image", if the field is non editable, and being displayed withreadOnlyDisplay:"static", should the value (URL) be displayed as text, or should an image be rendered?If unset, DynamicForm.showImageAsURLwill be consulted instead.- Returns:
- Current showImageAsURL value. Default value is null
 
- 
setShowOldValueInHoverCauses the original value to be shown to the end user when the user hovers over the FormItem as such (when theFormItem.itemHover()event would fire).When showOldValueInHoverand the form'sDynamicForm.showOldValueInHoverare both unset, defaults to the value ofshowPending.The message shown is controlled by originalValueMessage, unless the item isdisabledanddisabledHoveris set - in this case, the hover shows thedisabledHoverHTML.If the item suppresses hovers, nothing will be shown.Note : This is an advanced setting - Parameters:
- showOldValueInHover- New showOldValueInHover value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
 
- 
getShowOldValueInHoverCauses the original value to be shown to the end user when the user hovers over the FormItem as such (when theFormItem.itemHover()event would fire).When showOldValueInHoverand the form'sDynamicForm.showOldValueInHoverare both unset, defaults to the value ofshowPending.The message shown is controlled by originalValueMessage, unless the item isdisabledanddisabledHoveris set - in this case, the hover shows thedisabledHoverHTML.If the item suppresses hovers, nothing will be shown.- Returns:
- Current showOldValueInHover value. Default value is null
 
- 
setShowOverWhen the user rolls over this item, should it be re-styled to indicate it has focus?When enabled, the "Over" styling is applied to the text box, control table (if present), and pickerIcon (if present), and any icons where FormItemIcon.showOveris true andFormItemIcon.showOverWhenis set to "textBox".
 These behaviors can be disabled piecemeal viaupdateTextBoxOnOver,updateControlOnOverandupdatePickerIconOnOverproperties.Developers may also show rollover styling for other icons (see showOverIconsandFormItemIcon.showOverWhen).See FormItemStylingfor more details on formItem styling.Note : This is an advanced setting - Parameters:
- showOver- New showOver value. Default value is false
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getShowOverpublic boolean getShowOver()When the user rolls over this item, should it be re-styled to indicate it has focus?When enabled, the "Over" styling is applied to the text box, control table (if present), and pickerIcon (if present), and any icons where FormItemIcon.showOveris true andFormItemIcon.showOverWhenis set to "textBox".
 These behaviors can be disabled piecemeal viaupdateTextBoxOnOver,updateControlOnOverandupdatePickerIconOnOverproperties.Developers may also show rollover styling for other icons (see showOverIconsandFormItemIcon.showOverWhen).See FormItemStylingfor more details on formItem styling.- Returns:
- Current showOver value. Default value is false
- See Also:
 
- 
setShowOverIconsIf 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 formItemIconshowOverproperty.Note : This is an advanced setting - Parameters:
- showOverIcons- New showOverIcons value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
 
- 
getShowOverIconsIf 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 formItemIconshowOverproperty.- Returns:
- Current showOverIcons value. Default value is null
 
- 
setShowPendingWhen set totrue, this property adds the optional "Pending" suffix to the CSS styles applied to the widget if the current value of the item differs from the value that would be restored by invokingDynamicForm.resetValues(). SeeFormItemBaseStylefor details.shouldSaveValuemust betruefor this setting to have an effect.Styling of the value is updated only after the FormItem.change()event is processed, so depending on the value ofchangeOnKeypress, styling may be updated immediately on keystroke or only when the user leaves the field.Default styling is provided for the Enterprise, EnterpriseBlue, and Graphite skins only. showPendingshould not be enabled for an item when using a skin without default styling unless the defaultFormItem.pendingStatusChanged()behavior is canceled and a custom pending visual state is implemented by the item.On the other hand, when set to trueand ifcanHoveris also true, a hover will appear, displaying the old value and controlled byshowOldValueInHover,originalValueMessageandnullOriginalValueText. Additionally, if the new value isclipped, it will be shown in the hover as well.NOTE: Whether an item is shown as pending is not reflected to screen readers. Therefore, it is not advisable to design a UI where it is necessary for the user to know whether an item is shown as pending in order to work with the form. Note : This is an advanced setting - Parameters:
- showPending- New showPending value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getShowPendingWhen set totrue, this property adds the optional "Pending" suffix to the CSS styles applied to the widget if the current value of the item differs from the value that would be restored by invokingDynamicForm.resetValues(). SeeFormItemBaseStylefor details.shouldSaveValuemust betruefor this setting to have an effect.Styling of the value is updated only after the FormItem.change()event is processed, so depending on the value ofchangeOnKeypress, styling may be updated immediately on keystroke or only when the user leaves the field.Default styling is provided for the Enterprise, EnterpriseBlue, and Graphite skins only. showPendingshould not be enabled for an item when using a skin without default styling unless the defaultFormItem.pendingStatusChanged()behavior is canceled and a custom pending visual state is implemented by the item.On the other hand, when set to trueand ifcanHoveris also true, a hover will appear, displaying the old value and controlled byshowOldValueInHover,originalValueMessageandnullOriginalValueText. Additionally, if the new value isclipped, it will be shown in the hover as well.NOTE: Whether an item is shown as pending is not reflected to screen readers. Therefore, it is not advisable to design a UI where it is necessary for the user to know whether an item is shown as pending in order to work with the form. - Returns:
- Current showPending value. Default value is null
- See Also:
 
- 
setShowPickerIconShould we show a special 'picker'iconfor this form item? Picker icons are customizable viapickerIconProperties. By default they will be rendered inside the form item's"control box"area. By default clicking the pickerIcon will callshowPicker().- Parameters:
- showPickerIcon- New showPickerIcon value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
 
- 
getShowPickerIconShould we show a special 'picker'iconfor this form item? Picker icons are customizable viapickerIconProperties. By default they will be rendered inside the form item's"control box"area. By default clicking the pickerIcon will callshowPicker().- Returns:
- Current showPickerIcon value. Default value is null
 
- 
setShowPickerIconOnFocusShow the picker icon when the item gets focus, and hide it when it loses focus. Can be overridden at the icon level byFormItemIcon.showOnFocus.Note that a pickerIcon marked as disabled will not be shown on focus even if this flag is true by default. This may be overridden by showDisabledIconsOnFocus.
 If this method is called after the component has been drawn/initialized: SetsshowPickerIconOnFocusand causes the visibility of the picker icon to be updated and the item redrawn as appropriate.Note : This is an advanced setting - Parameters:
- showPickerIconOnFocus- new value of- showPickerIconOnFocus. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
 
- 
getShowPickerIconOnFocusShow the picker icon when the item gets focus, and hide it when it loses focus. Can be overridden at the icon level byFormItemIcon.showOnFocus.Note that a pickerIcon marked as disabled will not be shown on focus even if this flag is true by default. This may be overridden by showDisabledIconsOnFocus.- Returns:
- Current showPickerIconOnFocus value. Default value is null
 
- 
setShowRTLWhen this item is in RTL mode, should its style name include an "RTL" suffix?Note : This is an advanced setting - Parameters:
- showRTL- New showRTL value. Default value is false
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getShowRTLpublic boolean getShowRTL()When this item is in RTL mode, should its style name include an "RTL" suffix?- Returns:
- Current showRTL value. Default value is false
- See Also:
 
- 
setShowTitleShould we show a title cell for this formItem?Note: the default value of this attribute is overridden by some subclasses. - Parameters:
- showTitle- New showTitle value. Default value is true
- Returns:
- FormIteminstance, for chaining setter calls
 
- 
getShowTitleShould we show a title cell for this formItem?Note: the default value of this attribute is overridden by some subclasses. - Returns:
- Current showTitle value. Default value is true
 
- 
setShowValueIconOnlyIfvalueIconsis set, this property may be set to show the valueIcon only and prevent the standard form item element or text from displaying- Parameters:
- showValueIconOnly- New showValueIconOnly value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
 
- 
getShowValueIconOnlyIfvalueIconsis set, this property may be set to show the valueIcon only and prevent the standard form item element or text from displaying- Returns:
- Current showValueIconOnly value. Default value is null
 
- 
setStartRowWhether this item should always start a new row in the form layout.- Parameters:
- startRow- New startRow value. Default value is false
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getStartRowWhether this item should always start a new row in the form layout.- Returns:
- Current startRow value. Default value is false
- See Also:
 
- 
setStaticHeightHeight of the FormItem whencanEditis false andreadOnlyDisplayis "static". The normalheightis used if this property is not set.- Parameters:
- staticHeight- New staticHeight value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getStaticHeightHeight of the FormItem whencanEditis false andreadOnlyDisplayis "static". The normalheightis used if this property is not set.- Returns:
- Current staticHeight value. Default value is null
- See Also:
 
- 
setStopOnErrorIndicates 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 DynamicForm.stopOnErrorif unset.Enabling this property also implies validateOnExitis automatically enabled. If there are server-based validators on this item, setting this property also implies thatsynchronousValidationis forced on.- Parameters:
- stopOnError- New stopOnError value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
 
- 
getStopOnErrorIndicates 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 DynamicForm.stopOnErrorif unset.Enabling this property also implies validateOnExitis automatically enabled. If there are server-based validators on this item, setting this property also implies thatsynchronousValidationis forced on.- Returns:
- Current stopOnError value. Default value is null
 
- 
setStoreDisplayValuesIf specified, this overrides theDynamicForm.storeDisplayValuesproperty for this field.Note : This is an advanced setting - Parameters:
- storeDisplayValues- New storeDisplayValues value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
 
- 
getStoreDisplayValuesIf specified, this overrides theDynamicForm.storeDisplayValuesproperty for this field.- Returns:
- Current storeDisplayValues value. Default value is null
 
- 
setSupportsCutPasteEventsDoes the current formItem support native cut and paste events?This attribute only applies to freeform text entry fields such as TextItemandTextAreaItem, and only ifchangeOnKeypressis true. If true, developers can detect the user editing the value via cut or paste interactions (triggered from keyboard shortcuts or the native browser menu options) using theisCutEvent()andisPasteEvent()methods. This allows custom cut/paste handling to be added to the various change notification flow methods includingFormItem.change(), andFormItem.transformInput().- Parameters:
- supportsCutPasteEvents- New supportsCutPasteEvents value. Default value is false
- Returns:
- FormIteminstance, for chaining setter calls
 
- 
getSupportsCutPasteEventspublic boolean getSupportsCutPasteEvents()Does the current formItem support native cut and paste events?This attribute only applies to freeform text entry fields such as TextItemandTextAreaItem, and only ifchangeOnKeypressis true. If true, developers can detect the user editing the value via cut or paste interactions (triggered from keyboard shortcuts or the native browser menu options) using theisCutEvent()andisPasteEvent()methods. This allows custom cut/paste handling to be added to the various change notification flow methods includingFormItem.change(), andFormItem.transformInput().- Returns:
- Current supportsCutPasteEvents value. Default value is false
 
- 
setSuppressValueIconIfvalueIconsis set, this property may be set to prevent the value icons from showing up next to the form items valueNote : This is an advanced setting - Parameters:
- suppressValueIcon- New suppressValueIcon value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
 
- 
getSuppressValueIconIfvalueIconsis set, this property may be set to prevent the value icons from showing up next to the form items value- Returns:
- Current suppressValueIcon value. Default value is null
 
- 
setSynchronousValidationIf 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- New synchronousValidation value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
 
- 
getSynchronousValidationIf 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:
- Current synchronousValidation value. Default value is null
 
- 
setTabIndexTabIndex 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 DynamicForm.itemslist.To specify the tabindex of an item within the page as a whole (not just this form), use globalTabIndexinstead.
 If this method is called after the component has been drawn/initialized: Setter fortabIndex.
- 
getTabIndexTabIndex 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 DynamicForm.itemslist.To specify the tabindex of an item within the page as a whole (not just this form), use globalTabIndexinstead.- Returns:
- Current tabIndex value. Default value is null
- See Also:
 
- 
setTextAlignAlignment of the text / content within this form item. Note thatalignmay be used to control alignment of the entire form item within its cell.textAligndoes not apply to all form item types; typically it applies only to items showing a "textBox", such as aTextItemorSelectItem, as well as text-only form item types such asStaticTextItemandHeaderItem.If applyAlignToTextis true, thentextAlignwill default to thealignsetting if set. Otherwise, if this item hasicons, thentextAlignwill default toAlignment.LEFT(Alignment.RIGHTinRTL mode).- Parameters:
- textAlign- New textAlign value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getTextAlignAlignment of the text / content within this form item. Note thatalignmay be used to control alignment of the entire form item within its cell.textAligndoes not apply to all form item types; typically it applies only to items showing a "textBox", such as aTextItemorSelectItem, as well as text-only form item types such asStaticTextItemandHeaderItem.If applyAlignToTextis true, thentextAlignwill default to thealignsetting if set. Otherwise, if this item hasicons, thentextAlignwill default toAlignment.LEFT(Alignment.RIGHTinRTL mode).- Returns:
- Current textAlign value. Default value is null
- See Also:
 
- 
setTextBoxStyleBase CSS class name for a form item's text box element.See FormItemStylingfor an overview of formItem styling, and theCompoundFormItem_skinningdiscussion for special skinning considerations.If the textBoxStyleis changed at runtime,updateState()must be called to update the visual state of this item.- Parameters:
- textBoxStyle- New textBoxStyle value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getTextBoxStyleBase CSS class name for a form item's text box element.See FormItemStylingfor an overview of formItem styling, and theCompoundFormItem_skinningdiscussion for special skinning considerations.If the textBoxStyleis changed at runtime,updateState()must be called to update the visual state of this item.- Returns:
- Current textBoxStyle value. Default value is null
- See Also:
 
- 
setTextFormulaFormula to be used to calculate the text value of this FormItem. For a numeric fieldformulais used instead.Available fields for use in the formula are the current rule context. The formula is re-evaluated every time the rule context changes.See formulafor details on available fields for the formula and when the formula is calculated.Note: A FormItem using a textFormula must have a namedefined.shouldSaveValuecan be set tofalseto prevent the formula field from storing the calculated value into the form's values.- Parameters:
- textFormula- New textFormula value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getTextFormulaFormula to be used to calculate the text value of this FormItem. For a numeric fieldformulais used instead.Available fields for use in the formula are the current rule context. The formula is re-evaluated every time the rule context changes.See formulafor details on available fields for the formula and when the formula is calculated.Note: A FormItem using a textFormula must have a namedefined.shouldSaveValuecan be set tofalseto prevent the formula field from storing the calculated value into the form's values.- Returns:
- Current textFormula value. Default value is null
- See Also:
 
- 
setTimeFormatterTime-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 explicitdateFormatteris specified it will be respected for other fields as well.If unspecified, a timeFormatter may be defined at the component leveland will be respected by fields of type"time".Note : This is an advanced setting - Parameters:
- timeFormatter- New timeFormatter value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getTimeFormatterTime-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 explicitdateFormatteris specified it will be respected for other fields as well.If unspecified, a timeFormatter may be defined at the component leveland will be respected by fields of type"time".- Returns:
- Current timeFormatter value. Default value is null
- See Also:
 
- 
setTitleUser visible title for this form item.
- 
getTitleUser visible title for this form item.
- 
setTitleAlignAlignment of this item's title in its cell.If null, dynamically set according to text direction. - Parameters:
- titleAlign- New titleAlign value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
 
- 
getTitleAlignAlignment of this item's title in its cell.If null, dynamically set according to text direction. - Returns:
- Current titleAlign value. Default value is null
 
- 
setTitleColSpanNumber of columns that this item's title spans.This setting only applies for items that are showing a title and whose TitleOrientationis either "left" or "right".- Parameters:
- titleColSpan- New titleColSpan value. Default value is 1
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getTitleColSpanpublic int getTitleColSpan()Number of columns that this item's title spans.This setting only applies for items that are showing a title and whose TitleOrientationis either "left" or "right".- Returns:
- Current titleColSpan value. Default value is 1
- See Also:
 
- 
setTitleOrientationOn which side of this item should the title be placed.TitleOrientationlists 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- New titleOrientation value. Default value is Canvas.LEFT
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getTitleOrientationOn which side of this item should the title be placed.TitleOrientationlists 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:
- Current titleOrientation value. Default value is Canvas.LEFT
- See Also:
 
- 
setTitleStyleBase CSS class name for a regular form-item's title. Note that this is aFormItemBaseStyleso will pick up stateful suffixes on focus, disabled state change etc. by default.When the titleis shownabovethe item, the title element is given theverticalTitleStyleif it's set, as it is in some skins - otherwise, it will fall back totitleStyle.Note the appearance of the title is also affected by DynamicForm.titlePrefix/titleSuffixandDynamicForm.requiredTitlePrefix/requiredTitleSuffix.- Parameters:
- titleStyle- New titleStyle value. Default value is "formTitle"
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getTitleStyleBase CSS class name for a regular form-item's title. Note that this is aFormItemBaseStyleso will pick up stateful suffixes on focus, disabled state change etc. by default.When the titleis shownabovethe item, the title element is given theverticalTitleStyleif it's set, as it is in some skins - otherwise, it will fall back totitleStyle.Note the appearance of the title is also affected by DynamicForm.titlePrefix/titleSuffixandDynamicForm.requiredTitlePrefix/requiredTitleSuffix.- Returns:
- Current titleStyle value. Default value is "formTitle"
- See Also:
 
- 
setTitleVAlignVertical alignment of this item's title in its cell. Only applies whentitleOrientationis"left"or"right".- Parameters:
- titleVAlign- New titleVAlign value. Default value is Canvas.CENTER
- Returns:
- FormIteminstance, for chaining setter calls
 
- 
getTitleVAlignVertical alignment of this item's title in its cell. Only applies whentitleOrientationis"left"or"right".- Returns:
- Current titleVAlign value. Default value is Canvas.CENTER
 
- 
setTopTop coordinate of this item in pixels. Applies only when the containing DynamicForm setsitemLayout:"absolute".
 If this method is called after the component has been drawn/initialized: For a form withitemLayout:"absolute" only, set the top coordinate of this form item.Causes the form to redraw. Note : This is an advanced setting - Parameters:
- top- New top value. Default value is 0
- Returns:
- FormIteminstance, for chaining setter calls
 
- 
getToppublic int getTop()Top coordinate of this item in pixels. Applies only when the containing DynamicForm setsitemLayout:"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. Default value is 0
 
- 
setUpdateControlOnOverIfshowOveris true, setting this property to false will explicitly disable showing the "Over" state for the control table element of this item (if present).Note : This is an advanced setting - Parameters:
- updateControlOnOver- New updateControlOnOver value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getUpdateControlOnOverIfshowOveris true, setting this property to false will explicitly disable showing the "Over" state for the control table element of this item (if present).- Returns:
- Current updateControlOnOver value. Default value is null
- See Also:
 
- 
setUpdatePickerIconOnOverIfshowOveris true, setting this property to false will explicitly disable showing the "Over" state for the PickerIcon of this item (if present)Note : This is an advanced setting - Parameters:
- updatePickerIconOnOver- New updatePickerIconOnOver value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getUpdatePickerIconOnOverIfshowOveris true, setting this property to false will explicitly disable showing the "Over" state for the PickerIcon of this item (if present)- Returns:
- Current updatePickerIconOnOver value. Default value is null
- See Also:
 
- 
setUpdateTextBoxOnOverIfshowOveris true, setting this property to false will explicitly disable showing the "Over" state for the TextBox element of this item.Note : This is an advanced setting - Parameters:
- updateTextBoxOnOver- New updateTextBoxOnOver value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getUpdateTextBoxOnOverIfshowOveris true, setting this property to false will explicitly disable showing the "Over" state for the TextBox element of this item.- Returns:
- Current updateTextBoxOnOver value. Default value is null
- See Also:
 
- 
setUseAdvancedCriteriaShould this form item always produce anAdvancedCriteriasub criterion object? When set to true, causeshasAdvancedCriteriato return true. Can also be set at theListGridlevel.- Parameters:
- useAdvancedCriteria- New useAdvancedCriteria value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getUseAdvancedCriteriaShould this form item always produce anAdvancedCriteriasub criterion object? When set to true, causeshasAdvancedCriteriato return true. Can also be set at theListGridlevel.- Returns:
- Current useAdvancedCriteria value. Default value is null
- See Also:
 
- 
setUseDisabledHintStyleForReadOnlyBy default,read-onlyfields use the same style name as editable fields for in-field hints, unless they aredisabledor configured to use a disabledReadOnlyDisplayAppearance. This is described underTextItem.showHintInFieldIf useDisabledHintStyleForReadOnlyis set, the "HintDisabled" style will be used for read-only fields regardless of theirReadOnlyDisplayAppearance. This allows you to use a different in-field hint style for read-only fields without having to use a general disabled appearance for those fields- Parameters:
- useDisabledHintStyleForReadOnly- New useDisabledHintStyleForReadOnly value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getUseDisabledHintStyleForReadOnlyBy default,read-onlyfields use the same style name as editable fields for in-field hints, unless they aredisabledor configured to use a disabledReadOnlyDisplayAppearance. This is described underTextItem.showHintInFieldIf useDisabledHintStyleForReadOnlyis set, the "HintDisabled" style will be used for read-only fields regardless of theirReadOnlyDisplayAppearance. This allows you to use a different in-field hint style for read-only fields without having to use a general disabled appearance for those fields- Returns:
- Current useDisabledHintStyleForReadOnly value. Default value is null
- See Also:
 
- 
setUseLocalDisplayFieldValueIfdisplayFieldis specified for a field, should the display value for the field be picked up from therecord currently being edited?This behavior is typically valuable for dataBound components where the displayField is specified at the DataSourceField level. See DataSourceField.displayFieldfor more on this.Note that for DataSources backed by the Smart GWT server, fields with a specifiedDataSourceField.foreignKeyandDataSourceField.displayFieldwill automatically have this property set to true if not explicitly set to false in the dataSource configuration.Otherwise, if not explicitly set, local display value will be used unless: - This item has an explicitly specified optionDataSource, rather
 than      deriving its optionDataSource from a specified       DataSourceField.foreignKeyspecification
- The namediffers from thevalueFieldfor the item
 - Parameters:
- useLocalDisplayFieldValue- New useLocalDisplayFieldValue value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
 
- This item has an explicitly specified optionDataSource, rather
 than      deriving its optionDataSource from a specified       
- 
getUseLocalDisplayFieldValueIfdisplayFieldis specified for a field, should the display value for the field be picked up from therecord currently being edited?This behavior is typically valuable for dataBound components where the displayField is specified at the DataSourceField level. See DataSourceField.displayFieldfor more on this.Note that for DataSources backed by the Smart GWT server, fields with a specifiedDataSourceField.foreignKeyandDataSourceField.displayFieldwill automatically have this property set to true if not explicitly set to false in the dataSource configuration.Otherwise, if not explicitly set, local display value will be used unless: - This item has an explicitly specified optionDataSource, rather
 than      deriving its optionDataSource from a specified       DataSourceField.foreignKeyspecification
- The namediffers from thevalueFieldfor the item
 - Returns:
- Current useLocalDisplayFieldValue value. Default value is null
 
- This item has an explicitly specified optionDataSource, rather
 than      deriving its optionDataSource from a specified       
- 
setValidateOnChangeIf 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:falsewill be fired on change - displaying errors and rejecting the change on validation failure.- Parameters:
- validateOnChange- New validateOnChange value. Default value is false
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getValidateOnChangeIf 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:falsewill be fired on change - displaying errors and rejecting the change on validation failure.- Returns:
- Current validateOnChange value. Default value is false
- See Also:
 
- 
setValidateOnExitIf 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- New validateOnExit value. Default value is false
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getValidateOnExitIf 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:
- Current validateOnExit value. Default value is false
- See Also:
 
- 
setValidatorsValidators for this form item.Note: these validators will only be run on the client; to do real client-server validation, validators must be specified via DataSourceField.validators.- Parameters:
- validators- New validators value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
 
- 
setValidOperatorsArray of valid filtering operators (eg "greaterThan") that are legal for this FormItem.Applies only to form/formItem when allowExpressionsis true, allowing the user to input expressions.- Parameters:
- validOperators- New validOperators value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getValidOperatorsArray of valid filtering operators (eg "greaterThan") that are legal for this FormItem.Applies only to form/formItem when allowExpressionsis true, allowing the user to input expressions.- Returns:
- Current validOperators value. Default value is null
- See Also:
 
- 
setVAlignVertical 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). IfshouldApplyHeightToTextBox()is true, for this to have a visible effect, the cell height must exceed the specified height of the item, either due to an explicitcellHeightspecification, or due to the row being expanded by another taller item.Has no effect if DynamicForm.itemLayoutis set to"absolute"for the form.- Parameters:
- vAlign- New vAlign value. Default value is Canvas.CENTER
- Returns:
- FormIteminstance, for chaining setter calls
 
- 
getVAlignVertical 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). IfshouldApplyHeightToTextBox()is true, for this to have a visible effect, the cell height must exceed the specified height of the item, either due to an explicitcellHeightspecification, or due to the row being expanded by another taller item.Has no effect if DynamicForm.itemLayoutis set to"absolute"for the form.- Returns:
- Returns the vertical-alignment for this item within its cell.  By default, when titleOrientationis "top", this method will return "top", so that items of varying height are top-aligned, beneath their titles. Default value is Canvas.CENTER
 
- 
setValueDeselectedCSSTextCustom CSS text to be applied to values that have been deleted, whenshowDeletionsis enabled.Note : This is an advanced setting 
- 
getValueDeselectedCSSTextCustom CSS text to be applied to values that have been deleted, whenshowDeletionsis enabled.- Returns:
- Current valueDeselectedCSSText value. Default value is "color:#A8A8A8;text-decoration:line-through;"
- See Also:
 
- 
setValueFieldIf this form item maps data values to display values by retrieving thedisplayFieldvalues from anoptionDataSource, this property denotes the the field to use as the underlying data value in records from the optionDataSource.
 If not explicitly supplied, the valueField name will be derived as described ingetValueFieldName().- Parameters:
- valueField- New valueField value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getValueFieldIf this form item maps data values to display values by retrieving thedisplayFieldvalues from anoptionDataSource, this property denotes the the field to use as the underlying data value in records from the optionDataSource.
 If not explicitly supplied, the valueField name will be derived as described ingetValueFieldName().- Returns:
- Getter method to retrieve the valueFieldfor this item. For items with a specifiedoptionDataSource, this determines which field in that dataSource corresponds to the value for this item.If unset, if a foreignKey relationshipexists between this field and the optionDataSource, this will be used, otherwise default behavior will return thenameof this field. Default value is null
- See Also:
 
- 
setValueIconHeightIfvalueIconsis specified, use this property to specify a height for the value icon written out.- Parameters:
- valueIconHeight- New valueIconHeight value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getValueIconHeightIfvalueIconsis specified, use this property to specify a height for the value icon written out.- Returns:
- Current valueIconHeight value. Default value is null
- See Also:
 
- 
setValueIconLeftPaddingIf 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- New valueIconLeftPadding value. Default value is 0
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getValueIconLeftPaddingpublic 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:
- Current valueIconLeftPadding value. Default value is 0
- See Also:
- 
- com.smartgwt.client.widgets.form.fields.FormItem#getValueIcons
 
 
- 
setValueIconRightPaddingIf 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- New valueIconRightPadding value. Default value is 3
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getValueIconRightPaddingpublic 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:
- Current valueIconRightPadding value. Default value is 3
- See Also:
- 
- com.smartgwt.client.widgets.form.fields.FormItem#getValueIcons
 
 
- 
setValueIconSizeIfvalueIconsis specified, this property may be used to specify both the width and height of the icon written out. Note thatvalueIconWidthandvalueIconHeighttake precedence over this value, if specified.- Parameters:
- valueIconSize- New valueIconSize value. Default value is 16
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getValueIconSizepublic int getValueIconSize()IfvalueIconsis specified, this property may be used to specify both the width and height of the icon written out. Note thatvalueIconWidthandvalueIconHeighttake precedence over this value, if specified.- Returns:
- Current valueIconSize value. Default value is 16
- See Also:
 
- 
setValueIconWidthIfvalueIconsis specified, use this property to specify a width for the value icon written out.- Parameters:
- valueIconWidth- New valueIconWidth value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getValueIconWidthIfvalueIconsis specified, use this property to specify a width for the value icon written out.- Returns:
- Current valueIconWidth value. Default value is null
- See Also:
 
- 
setVisibleWhether this item is currently visible.visiblecan only be set on creation. After creation, useshow()andhide()to manipulate visibility.- Parameters:
- visible- New visible value. Default value is true
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getVisibleWhether this item is currently visible.visiblecan only be set on creation. After creation, useshow()andhide()to manipulate visibility.- Returns:
- Current visible value. Default value is true
- See Also:
 
- 
setVisibleWhenCriteria to be evaluated to determine whether this FormItem should be visible.Criteria are evaluated against the form's current valuesas well as the currentrule context. Criteria are re-evaluated every time form values or the rule context changes, whether by end user action or by programmatic calls.If both showIf()andvisibleWhenare specified,visibleWhenis ignored.A basic criteria uses textMatchStyle:"exact". When specified in Component XMLthis property allowsshorthand formatsfor defining criteria.Note: A FormItem using visibleWhen must have a namedefined.shouldSaveValuecan be set tofalseto prevent the field from storing its value into the form's values.- Parameters:
- visibleWhen- New visibleWhen value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getVisibleWhenCriteria to be evaluated to determine whether this FormItem should be visible.Criteria are evaluated against the form's current valuesas well as the currentrule context. Criteria are re-evaluated every time form values or the rule context changes, whether by end user action or by programmatic calls.If both showIf()andvisibleWhenare specified,visibleWhenis ignored.A basic criteria uses textMatchStyle:"exact". When specified in Component XMLthis property allowsshorthand formatsfor defining criteria.Note: A FormItem using visibleWhen must have a namedefined.shouldSaveValuecan be set tofalseto prevent the field from storing its value into the form's values.- Returns:
- Current visibleWhen value. Default value is null
- See Also:
 
- 
setWidthWidth 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 acolumn spanningitem). You may also use "100%" as a synonym for "*", but other percentages are not supported.Note that for "absolute" item layout rather than the default "table" layout, the rules for specifying the width are slightly different. All percent sizes are allowed, but not "*". See DynamicForm.itemLayoutfor further details.If width is specified as a String, getWidth() will return -1. Use getWidthAsString.() in this case. See the FormLayoutoverview for details.- Parameters:
- width- New width value. Default value is "*"
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getWidthpublic 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 acolumn spanningitem). You may also use "100%" as a synonym for "*", but other percentages are not supported.Note that for "absolute" item layout rather than the default "table" layout, the rules for specifying the width are slightly different. All percent sizes are allowed, but not "*". See DynamicForm.itemLayoutfor further details.If width is specified as a String, getWidth() will return -1. Use getWidthAsString.() in this case. See the FormLayoutoverview for details.Note : This method will return -1 if the underlying SmartClient JavaScript attribute value cannot be expressed as a(n) int. In that case, other getters, similarly-named but ending in AsString,AsCanvas, etc., may be provided.- 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. Default value is "*"
- See Also:
 
- 
setWidthWidth 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 acolumn spanningitem). You may also use "100%" as a synonym for "*", but other percentages are not supported.Note that for "absolute" item layout rather than the default "table" layout, the rules for specifying the width are slightly different. All percent sizes are allowed, but not "*". See DynamicForm.itemLayoutfor further details.If width is specified as a String, getWidth() will return -1. Use getWidthAsString.() in this case. See the FormLayoutoverview for details.- Parameters:
- width- New width value. Default value is "*"
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getWidthAsStringWidth 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 acolumn spanningitem). You may also use "100%" as a synonym for "*", but other percentages are not supported.Note that for "absolute" item layout rather than the default "table" layout, the rules for specifying the width are slightly different. All percent sizes are allowed, but not "*". See DynamicForm.itemLayoutfor further details.If width is specified as a String, getWidth() will return -1. Use getWidthAsString.() in this case. See the FormLayoutoverview 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. Default value is "*"
- See Also:
 
- 
setWrapHintTextIf this item is showing ahint, should the hint text be allowed to wrap? Setting this property tofalsewill render the hint on a single line without wrapping, expanding the width required to render the item if necessary.If unset this property will be picked up from the DynamicForm.wrapHintTextsetting.This setting does not apply to hints that are shown in field.- Parameters:
- wrapHintText- New wrapHintText value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
getWrapHintTextIf this item is showing ahint, should the hint text be allowed to wrap? Setting this property tofalsewill render the hint on a single line without wrapping, expanding the width required to render the item if necessary.If unset this property will be picked up from the DynamicForm.wrapHintTextsetting.This setting does not apply to hints that are shown in field.- Returns:
- Current wrapHintText value. Default value is null
- See Also:
 
- 
setWrapStaticValueIf this item isread-onlyand is usingreadOnlyDisplayReadOnlyDisplayAppearance.STATIC, should the item value wrap?- Parameters:
- wrapStaticValue- New wrapStaticValue value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
 
- 
getWrapStaticValueIf this item isread-onlyand is usingreadOnlyDisplayReadOnlyDisplayAppearance.STATIC, should the item value wrap?- Returns:
- Current wrapStaticValue value. Default value is null
 
- 
setWrapTitleIf specified determines whether this items title should wrap. OverrideswrapItemTitlesat the DynamicForm level.- Parameters:
- wrapTitle- New wrapTitle value. Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
 
- 
getWrapTitleIf specified determines whether this items title should wrap. OverrideswrapItemTitlesat the DynamicForm level.- Returns:
- Current wrapTitle value. Default value is null
 
- 
addIconAdds aFormItemIconto this item. If the optional index parameter is not passed, the icon is added to the end of the existingicon list.If the passed icon already exists in the icon list, byname, the original icon is moved to the new index and no new icon is added.- Parameters:
- icon- the icon to add
- Returns:
- the live form item icon
 
- 
addIconAdds aFormItemIconto this item. If the optional index parameter is not passed, the icon is added to the end of the existingicon list.If the passed icon already exists in the icon list, byname, the original icon is moved to the new index and no new icon is added.- Parameters:
- icon- the icon to add
- index- the index to add the icon at - if omitted, add the icon to the end of the current icon list
- Returns:
- the live form item icon
 
- 
applyFormulapublic void applyFormula()Manually sets this FormItem to the result offormulaortextFormula. Formulas are normally automatically recomputed and the result automatically applied to the FormItem according to the rules described underformula.applyFormula()exists to cover any rare cases where these rules are not correct.Calling applyFormula()has no effect if noformulaortextFormulais configured for this FormItem.
- 
addBlurHandlerAdd a blur handler.Called when this FormItem loses focus. - Specified by:
- addBlurHandlerin interface- HasBlurHandlers
- Parameters:
- handler- the blur handler
- Returns:
- HandlerRegistrationused to remove this handler
 
- 
blurItempublic void blurItem()Takes focus from this form item's focusable element.- See Also:
 
- 
addChangeHandlerAdd 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 transformInputrather than using a combination of change() and setValue() to accomplish the same thing. Returning false fromchangeis 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. Change/Changed notifications vs "...When" rules: the changeandchangedevents only fire when an end user modifies a field value. If you are trying to dynamically control the visibility or enabled state of other components in response to these events, consider instead using properties such asCanvas.visibleWhen,item.readOnlyWhen,Canvas.enableWhenon the target component. (Similar properties are available onFormItem,Canvas,MenuItemand other components).- Specified by:
- addChangeHandlerin interface- HasChangeHandlers
- Parameters:
- handler- the change handler
- Returns:
- HandlerRegistrationused to remove this handler
 
- 
addChangedHandlerAdd 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. Change/Changed notifications vs "...When" rules: the changeandchangedevents only fire when an end user modifies a field value. If you are trying to dynamically control the visibility or enabled state of other components in response to these events, consider instead using properties such asCanvas.visibleWhen,item.readOnlyWhen,Canvas.enableWhenon the target component. (Similar properties are available onFormItem,Canvas,MenuItemand other components).- Specified by:
- addChangedHandlerin interface- HasChangedHandlers
- Parameters:
- handler- the changed handler
- Returns:
- HandlerRegistrationused to remove this handler
 
- 
clearErrorspublic void clearErrors()Clear all error messages for this item- See Also:
 
- 
clearValuepublic 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). 
- 
addClickHandlerAdd 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 supportclick().- Specified by:
- addClickHandlerin interface- HasClickHandlers
- Parameters:
- handler- the click handler
- Returns:
- HandlerRegistrationused to remove this handler
 
- 
disablepublic void disable()Set this item to be disabled at runtime.- See Also:
 
- 
disableIconThis method will disable some icon in this item'siconsarray, if it is currently enabled.- Parameters:
- icon-- nameof the icon to be disabled. See- Identifier
- See Also:
 
- 
addDoubleClickHandlerAdd a doubleClick handler.Called when this FormItem is double-clicked. - Specified by:
- addDoubleClickHandlerin interface- HasDoubleClickHandlers
- Parameters:
- handler- the doubleClick handler
- Returns:
- HandlerRegistrationused to remove this handler
 
- 
addEditorEnterHandlerAdd a editorEnter handler.Notification method fired when the user enters this formItem. Differs from FormItem.focus()in that whilefocusandblurmay fire multiple as the user navigates sub elements of an item (such as interacting with a pick list),editorEnterwill 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:
- addEditorEnterHandlerin interface- HasEditorEnterHandlers
- Parameters:
- handler- the editorEnter handler
- Returns:
- HandlerRegistrationused to remove this handler
 
- 
addEditorExitHandlerAdd a editorExit handler.Notification method fired when the user leaves this formItem. Differs from FormItem.blur()in that whilefocusandblurmay fire multiple as the user navigates sub elements of an item (such as interacting with a pick list),editorEnterwill typically fire once when the user starts to edit this item as a whole, andeditorExitfires once when the user moves onto a different item or component- Specified by:
- addEditorExitHandlerin interface- HasEditorExitHandlers
- Parameters:
- handler- the editorExit handler
- Returns:
- HandlerRegistrationused to remove this handler
 
- 
enablepublic void enable()Set this item to be enabled at runtime.- See Also:
 
- 
enableIconThis method will enable some icon in this item'siconsarray, if it is currently disabled.- Parameters:
- icon-- nameof the icon to be enabled. See- Identifier
- See Also:
 
- 
addFocusHandlerAdd a focus handler.Called when this FormItem receives focus. - Specified by:
- addFocusHandlerin interface- HasFocusHandlers
- Parameters:
- handler- the focus handler
- Returns:
- HandlerRegistrationused to remove this handler
 
- 
focusAfterItempublic void focusAfterItem(boolean forward) Shifts focus to the next focusable element after this item, skipping any elements nested inside the tabbing group for this item, such as sub-elements, nested canvases in a CanvasItem, or icons.This method makes use of the TabIndexManager.shiftFocusAfterGroup()method to request focus be changed to the next registered entry. By default standard focusable Smart GWT UI elements, including Canvases, FormItems, FormItemIcons, etc are registered with the TabIndexManager in the appropriate order, and will accept focus iffocusable, and notdisabledormasked.Canvases support a similar method: Canvas.focusAfterGroup().NOTE: Focusable elements created directly in the raw HTML bootstrap or by application code will not be passed focus by this method unless they have also been explicitly registered with the TabIndexManager. See the TabOrderOverviewfor more information.- Parameters:
- forward- direction to shift focus - true to move forward, false to move backwards (as with a shift+tab interaction).
- See Also:
 
- 
focusInItempublic void focusInItem()Move the keyboard focus into this item's focusable element- See Also:
 
- 
getCursorPositionFor text-based items, this method returns the index of the start of the current selection if the item currently has the focus (if no text is selected, this equates to the current position of the text editing cursor). SeeTextItem.getSelectionRange()for details of what is returned if the item does not have the focus (note, it is important to read this documentation, because the behavior when the item does not have the focus varies by browser)- Returns:
- Index of the current or past selection's start point
 
- 
getCustomStateOptional method to retrieve a custom state suffix to append to the style name that is applied to some element of a formItem - seeFormItemBaseStylefor more information on how state-based FormItem style names are derived.If this method exists on a formItem, the framework will call it, passing in the state suffix it has derived. Your getCustomState()implementation can make use of this derived state or ignore it. For example, if you wanted two different types of focus styling depending on some factor unrelated to focus, you would probably make use of the incoming "Focused" state and return something like "Focused1" or "Focused2". On the other hand, if you want your custom state to just override whatever the system derived, you would ignore the incoming state. Finally, if you do not wish to provide a custom style for this formItem element at this time - for example, you are only interested in providing a custom "textBox" style and this call is for a "cell" element type - yourgetCustomStyle()method should just return the state it was passed.This method is an advanced API, and you should only provide an implementation of it if you have specialized styling requirements. If you do implement it, note that it will be called very frequently, from rendering code: if your custom logic does significant processing, it could introduce a system-wide performance problem. - Parameters:
- elementType- The element type to return a custom state for
- derivedState- The state suffix the system derived
- Returns:
- custom state suffix to use for the parameter elementType for this FormItem
- See Also:
 
- 
getDisplayFieldNameReturns thedisplayFieldfor this item.Behavior varies based on the configuration of this item, as follows: - If this item has an optionDataSourceand an explicitforeignDisplayFieldis specified, this will be returned.
- Otherwise if an explicit displayFieldis specified it will be returned by default. If thedisplayFieldwas specified on the underlying dataSource field, and no matching field is present in theoptionDataSourcefor the item, we avoid returning the specified displayField value and instead return the title field of the option DataSource. We do this to avoid confusion for the case where the displayField is intended as a display-field value for showing another field value within the same record in the underlying dataSource only.
- If no explicit foreignDisplay or
 displayField   specification was found, and the valueFieldfor this item is hidden in theoptionDataSource, this method will return the title field for theoptionDataSource.
 - Returns:
- display field name, or null if there is no separate display field to                     use.
 See FieldName
 
- If this item has an 
- 
getFieldNameReturn the name for the this formItem.- Returns:
- name for this form item
- See Also:
 
- 
getFullDataPathReturn 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 callednamethat 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.
 See DataPath
 
- 
getGridColNumIf this formItem is part of aListGrid'sinline edit form, returns the number of the grid column this formItem is responsible for editing, but only if a row is currently being edited. If the formItem is not part of a ListGrid inline edit for any reason, this method returns null. Reasons for a formItem not being part of an inline edit include- The item is part of an ordinary DynamicForm, not an inline edit form
- There is no row in the grid currently being edited
- A row is being edited, but this formItem is not currently visible and is being excluded because of horizontal incremental rendering (where Smart GWT avoids drawing grid columns that would not be visible without scrolling)
 - Returns:
- The grid column number being edited by this formItem, or null, as described above
 
- 
getGridRowNumIf this formItem is part of aListGrid'sinline edit form, returns the number of the row currently being edited. If the formItem is not part of a ListGrid inline edit for any reason, this method returns null. Reasons for a formItem not being part of an inline edit include- The item is part of an ordinary DynamicForm, not an inline edit form
- There is no row in the grid currently being edited
- A row is being edited, but this formItem is not currently visible and is being excluded because of horizontal incremental rendering (where Smart GWT avoids drawing grid columns that would not be visible without scrolling)
 - Returns:
- The grid row number being edited or null, as described above
 
- 
getIconGiven aFormItemIcon.name, returns theFormItemIconobject.- Parameters:
- name- specified- FormItemIcon.name. See- Identifier
- Returns:
- form item icon matching the specified name, or nullif there is no such icon.
- See Also:
 
- 
getIconTabPositionReturns the desired tab-position of some icon with respect to other focusable sub-elements for this formItem.Default implementation returns the index of the icon in the icons array, (plus one if a pickerIcon is showing) meaning users can tab through icons in order. Has no effect for non-focusable icons. - Returns:
- desired position in the tab-order within this item's sub-elements
 
- 
getListGridIf this item is being used to edit cells in a ListGrid (seeisInGrid()), this method returns the grid in question.- Returns:
- For listGrid edit items, the listGrid containing the item. Will return null for items that are edit items of a listGrid.
 
- 
getPageLeftpublic int getPageLeft()Returns the drawn page-left coordinate of this form item in pixels.- Returns:
- page-left coordinate in px
- See Also:
 
- 
getPageToppublic int getPageTop()Returns the drawn page-top coordinate of this form item in pixels.- Returns:
- page-top coordinate in px
- See Also:
 
- 
getPickerIconTabPositionReturns the desired tab-position of the picker icon with respect to other focusable sub-elements for this formItem.Default implementation returns zero, making the picker the first focusable element after the items text box. - Returns:
- desired position in the tab-order within this item's sub-elements
 
- 
getPixelHeightpublic int getPixelHeight()Returns the specifiedheightof 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.
 
- 
getPixelWidthpublic int getPixelWidth()Returns the specifiedwidthof 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.
 
- 
getSelectedRecordGet the record returned from theoptionDataSourcewhenfetchMissingValuesis true, and the missing value is fetched.fetchMissingValueskicks 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
 
- 
getValueAsFloatReturn the value tracked by this form item as a Float. If the value cannot be parsed to a valid float, null will be returned.- Returns:
- value of this element
- See Also:
 
- 
getValueAsIntegerReturn the value tracked by this form item as an Integer. If the value cannot be parsed to an int that matches the original value, null will be returned.- Returns:
- value of this element
- See Also:
 
- 
getValueFieldNameGetter method to retrieve thevalueFieldfor this item. For items with a specifiedoptionDataSource, this determines which field in that dataSource corresponds to the value for this item.If unset, if a foreignKey relationshipexists between this field and the optionDataSource, this will be used, otherwise default behavior will return thenameof this field.- Returns:
- fieldName to use a "value field" in records from this items               optionDataSource
 
- 
getVisibleTitleWidthReturns the visible width of this item's title in px. If that is not applicable (for example, the form item has no title) or cannot be determined (for example, the form is not drawn), returns 0.- Parameters:
- labelOnly- If true, returns the visible width of the title text only; if false (the default) returns the width of the title cell
- Returns:
- width of the form item's title in px
- See Also:
 
- 
hasAdvancedCriteriaDoes this form item produce anAdvancedCriteriasub criterion object? If this method returns true,DynamicForm.getValuesAsCriteria()on the form containing this item will always return anAdvancedCriteriaobject, callingFormItemCriterionGetter.getCriterion()on each item to retrieve the individual criteria.Default implementation will return trueifoperatoris explicitly specified.- Returns:
- true if this item will return an AdvancedCriteria sub-criterion.
- See Also:
 
- 
hasErrorspublic boolean hasErrors()Return whether this item currently has any validation errors as a result of a previous validation pass.- Returns:
- true == item currently has validation errors.
- See Also:
 
- 
hidepublic 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.
- 
hideIconThis method will hide some icon in this item'siconsarray, if it is currently visible. Note that once this method has been called, any previously specifiedFormItemIcon.showIf()will be discarded.- Parameters:
- icon-- nameof the icon to be hidden. See- Identifier
- See Also:
 
- 
addIconClickHandlerAdd 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 thepicker icon, theFormItem.pickerIconClick()method is called. Then, this method is called.This event may be cancelled to suppress the FormItem.click()handler from also firing in response to the user interaction.- Specified by:
- addIconClickHandlerin interface- HasIconClickHandlers
- Parameters:
- handler- the iconClick handler
- Returns:
- HandlerRegistrationused to remove this handler
 
- 
addIconKeyPressHandlerAdd 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 keyPresson the form item icon directly.- Specified by:
- addIconKeyPressHandlerin interface- HasIconKeyPressHandlers
- Parameters:
- handler- the iconKeyPress handler
- Returns:
- HandlerRegistrationused to remove this handler
 
- 
invalidateDisplayValueCachepublic void invalidateDisplayValueCache()If this item has a specifieddisplayField, 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 optionDataSourceiffetchMissingValuesis 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 viagetSelectedRecord()).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. 
- 
isCutEventpublic boolean isCutEvent()Is the user performing a native "cut" event to modify the value of a freeform text field? This method may be invoked during change notification flow methods includingFormItem.change(),FormItem.changed()andFormItem.transformInput(). SeesupportsCutPasteEvents.- Returns:
- true if this is a cut event.
 
- 
isDrawnReturns true if this item has been written out into the DOM.- Returns:
- whether this item is drawn
- See Also:
 
- 
isFocusedReturns true if this formItem has the keyboard focus. Note that in Internet Explorer focus notifications can be asynchronous (seesynchronousFocusNotifications). In this case, this method can correctly return false when, intuitively, you would expect it to return true:someItem.focusInItem(); if (someItem.isFocused()) { // In most browsers we would get here, but not in Internet Explorer with // EventHandler.synchronousFocusNotifications disabled }- Returns:
- whether this formItem has the keyboard focus
 
- 
isInGridReturns true if this item'scontainerWidgetis aGridRendereror GridRenderer subclass- Returns:
- whether the item's container is a GridRenderer (and thus ultimately a ListGrid)
 
- 
isPasteEventpublic boolean isPasteEvent()Is the user performing a native "paste" event to modify the value of a freeform text field? This method may be invoked during change notification flow methods includingFormItem.change(),FormItem.changed()andFormItem.transformInput(). SeesupportsCutPasteEvents.- Returns:
- true if this is a cut event.
 
- 
isVisibleReturn true if the form item is currently visible. Note that like the similarCanvas 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:
 
- 
addItemHoverHandlerAdd 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 withinItemHoverHandler.onItemHover(com.smartgwt.client.widgets.form.fields.events.ItemHoverEvent)to suppress default behavior of showing a hover canvas containing the HTML returned byformItem.itemHoverHTML()/form.itemHoverHTML().If FormItem.canHoveris set to false, this method is not called.- Specified by:
- addItemHoverHandlerin interface- HasItemHoverHandlers
- Parameters:
- handler- the itemHover handler
- Returns:
- HandlerRegistrationused to remove this handler
 
- 
addKeyDownHandlerAdd a keyDown handler.StringMethod fired in response to a keydown while focused in this form item. - Specified by:
- addKeyDownHandlerin interface- HasKeyDownHandlers
- Parameters:
- handler- the keyDown handler
- Returns:
- HandlerRegistrationused to remove this handler
 
- 
addKeyPressHandlerAdd a keyPress handler.StringMethod fired when the user presses a key while focused in this form item. - Specified by:
- addKeyPressHandlerin interface- HasKeyPressHandlers
- Parameters:
- handler- the keyPress handler
- Returns:
- HandlerRegistrationused to remove this handler
 
- 
addKeyUpHandlerAdd a keyUp handler.StringMethod fired in response to a keyup while focused in this form item. - Specified by:
- addKeyUpHandlerin interface- HasKeyUpHandlers
- Parameters:
- handler- the keyUp handler
- Returns:
- HandlerRegistrationused to remove this handler
 
- 
addPendingStatusChangedHandlerAdd a pendingStatusChanged handler.Notification method called when showPendingis enabled and this form item should either clear or show its "Pending" visual state.The default behavior is that the titleStyleandcellStyleare updated to include/exclude the "Pending" suffix. Standard form item types may implement additional default behavior (see any item-specific pendingStatusChanged() documentation). Returningfalsewill cancel the default behavior.The pendingStatusChanged() notification method is typically used by CanvasItem-derived form items, where a custom or supplemental pending visual state is desired.- Specified by:
- addPendingStatusChangedHandlerin interface- HasPendingStatusChangedHandlers
- Parameters:
- handler- the pendingStatusChanged handler
- Returns:
- HandlerRegistrationused to remove this handler
 
- 
addPickerIconClickHandlerAdd a pickerIconClick handler.Notification method called when the picker iconis clicked. This method will fire after theFormItemIcon.formItemClick()handler for thepickerIcon. If the event is not cancelled, the standardFormItem.iconClick()will also fire.The default implementation will call FormItem.showPicker().- Specified by:
- addPickerIconClickHandlerin interface- HasPickerIconClickHandlers
- Parameters:
- handler- the pickerIconClick handler
- Returns:
- HandlerRegistrationused to remove this handler
 
- 
redrawpublic void redraw()Redraw this form item.Depending on the item and the containerWidgetit's embedded in, this may redraw this particular item or require a redraw of all items in the form.Do not call this method unless the documentation directs you to do so. Calling redraw()unnecessarily has significant performance consequences.
- 
redrawRedraw this form item.Depending on the item and the containerWidgetit's embedded in, this may redraw this particular item or require a redraw of all items in the form.Do not call this method unless the documentation directs you to do so. Calling redraw()unnecessarily has significant performance consequences.- Parameters:
- reason- optional reason for performing the redraw, which may appear in diagnostic logs if enabled
 
- 
removeIconGiven an icon'sname, remove it from this item.- Parameters:
- icon- the name of the icon to remove. See- Identifier
- Returns:
- true if an icon was removed, false otherwise
- See Also:
 
- 
selectedRecordChangedNotification method fired fordata bound itemswithfetchMissingValuesenabled when theselected recordis updated as a result of the value changing or a fetch for a new record completing.
 Note that a formItem with an optionDataSource may avoid fetching an associated record altogether in some cases. SeefetchMissingValuesandalwaysFetchMissingValues. Developers should also be aware that if PickList.fetchDisplayedFieldsOnly is set (or some customfetch operationhas been specified), the data returned from the server may include only a subset of dataSource fields rather than complete records.- Parameters:
- record- new selected record. May be null if the item has been set to a value with no associated record.
 
- 
setIconDisabledSet an icon as enabled or disabled at runtime.- Parameters:
- icon-- nameof the icon to be disabled/enabled. See- Identifier
- disabled- true if icon should be disabled
- See Also:
 
- 
setIconShowOnFocusSetsFormItemIcon.showOnFocusfor the supplied icon, and causes that icon's visibility to be updated and the item redrawn as appropriate.- Parameters:
- icon-- nameof the icon to update. See- Identifier
- showOnFocus- new value of- FormItemIcon.showOnFocus
 
- 
shouldApplyHeightToTextBoxpublic boolean shouldApplyHeightToTextBox()Ifheightis 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 accommodate 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 makesvAlignbehave as expected with the text value of the item being vertically aligned within the cell.Default implementation will return applyHeightToTextBoxif explicitly set otherwisefalseifreadOnlyDisplayis set to"static"and the item isnot editable, otherwise true.- Returns:
- true if the height should be written into the items' text box.
 
- 
shouldFetchMissingValueIf this field has a specifiedoptionDataSource, 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 setValue(). If it returns true, a fetch will be dispatched against the optionDataSource to get the record matching the valueWhen 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.fetchMissingValuesis set to false. Otherwise it will return true ifthis.alwaysFetchMissingValuesis set to true, or if adisplayFieldis 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?
 
- 
shouldSaveOnEnterReturns 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 ofsaveOnEnteror false if that property is unset.- Returns:
- boolean indicating whether saving should be allowed to proceed
 
- 
shouldStopKeyPressBubblingShould some keypress event on this item be prevented from bubbling (such that the containing form and ancestors do not receive the event).This method is called after standard item keypress handlers when the user presses a key while focused in this item. Returning true will suppress bubbling of the event to the containing form. This is useful to avoid having the form react to key events which "have meaning" to the focused item. Default implementation varies by item type. In short character keys are suppressed for all editable fields, as are keys which will modify the current state of the field ("Arrow" keys for moving around free form text editors, etc). Note that when this method returns true, no keyPressevent will fire on the form for the key pressed. However developers will still receive the separateDynamicForm.itemKeyPress()event.- Parameters:
- keyName- name of the key pressed. See- KeyName
- characterValue- If this was a character key, this is the numeric value for the character
- Returns:
- return true to prevent bubbling of the pressed key.
 
- 
showpublic 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. 
- 
addShowContextMenuHandlerAdd a showContextMenu handler.Called when the mouse is right-clicked anywhere in this formItem. If the implementation returns false, default browser behavior is cancelled. Note that it can be bad practice to cancel this method if the mouse is over the data element for the item, because doing so would replace the builtin browser-default menus that users may expect. You can use DynamicForm.getEventItemInfo()to return an info object that can be used to determine which part of the item is under the mouse.- Specified by:
- addShowContextMenuHandlerin interface- HasShowContextMenuHandlers
- Parameters:
- handler- the showContextMenu handler
- Returns:
- HandlerRegistrationused to remove this handler
 
- 
showIconThis method will show some icon in this item'siconsarray, if it is not already visible. Note that once this method has been called, any previously specifiedFormItemIcon.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-- nameof the icon to be shown. See- Identifier
- See Also:
 
- 
showPickerpublic void showPicker()Method to show a picker for this item. By default this method is called if the user clicks on apickerIcon. May also be called programmatically.Default implementation lazily creates and shows the Picker Autochild.Developers wishing to show a custom picker widget can either implement a FormItem.pickerIconClick()handler with an entirely custom implementation (and bypass the call toshowPicker()altogether), or use theAutoChild patternto customize the automatically generatedpicker autoChild.
- 
stopHoverpublic 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.
- 
storeValueStore (and optionally show) a value for this form item.This method will fire standard FormItem.change()andDynamicForm.itemChanged()handlers, and store the value passed in such that subsequent calls togetValue()orDynamicForm.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 embeddedCanvasItem.canvas, or a pop-up dialog launched from anicon, etc. Developers should call this method when the user interacts with this custom interface in order to store the changed value.shouldSaveValuefor CanvasItems is false by default. Custom CanvasItems will need to override shouldSaveValue to true if the values stored via this API should be included in the form'sgetValues()and saved with the form whensaveData()is called.If you cannot easily detect interactions that should change the value as the user performs them, a workaround is to call storeValueright 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 asFormItem.transformInput()exist for this.- Parameters:
- value- value to save for this item
- See Also:
 
- 
storeValueStore (and optionally show) a value for this form item.This method will fire standard FormItem.change()andDynamicForm.itemChanged()handlers, and store the value passed in such that subsequent calls togetValue()orDynamicForm.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 embeddedCanvasItem.canvas, or a pop-up dialog launched from anicon, etc. Developers should call this method when the user interacts with this custom interface in order to store the changed value.shouldSaveValuefor CanvasItems is false by default. Custom CanvasItems will need to override shouldSaveValue to true if the values stored via this API should be included in the form'sgetValues()and saved with the form whensaveData()is called.If you cannot easily detect interactions that should change the value as the user performs them, a workaround is to call storeValueright 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 asFormItem.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:
 
- 
addTitleClickHandlerAdd a titleClick handler.Notification method fired when the user clicks the title for this item - Specified by:
- addTitleClickHandlerin interface- HasTitleClickHandlers
- Parameters:
- handler- the titleClick handler
- Returns:
- HandlerRegistrationused to remove this handler
 
- 
addTitleDoubleClickHandlerAdd a titleDoubleClick handler.Notification method fired when the user double-clicks the title for this item - Specified by:
- addTitleDoubleClickHandlerin interface- HasTitleDoubleClickHandlers
- Parameters:
- handler- the titleDoubleClick handler
- Returns:
- HandlerRegistrationused to remove this handler
 
- 
addTitleHoverHandlerAdd 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 withinTitleHoverHandler.onTitleHover(com.smartgwt.client.widgets.form.fields.events.TitleHoverEvent)to suppress default behavior of showing a hover canvas containing the HTML returned byformItem.titleHoverHTML()/form.titleHoverHTML().If FormItem.canHoveris set to false, this method is not called.- Specified by:
- addTitleHoverHandlerin interface- HasTitleHoverHandlers
- Parameters:
- handler- the titleHover handler
- Returns:
- HandlerRegistrationused to remove this handler
 
- 
updateStatepublic void updateState()Update the visual state of a FormItem to reflect any changes in state or any changes in style settings (e.g.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.
- 
validateValidate this item.- Returns:
- returns true if validation was successful (no errors encountered), false otherwise.
 
- 
valueClippedpublic 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.
 
- 
addValueHoverHandlerAdd 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 withinValueHoverHandler.onValueHover(com.smartgwt.client.widgets.form.fields.events.ValueHoverEvent)to suppress default behavior of showing a hover canvas containing the HTML returned byFormItem.valueHoverHTML()/DynamicForm.valueHoverHTML().If FormItem.canHoveris set to false, this method is not called.- Specified by:
- addValueHoverHandlerin interface- HasValueHoverHandlers
- Parameters:
- handler- the valueHover handler
- Returns:
- HandlerRegistrationused to remove this handler
 
- 
addValueIconClickHandlerAdd a valueIconClick handler.Notification method fires when the user clicks a value iconfor this item.- Specified by:
- addValueIconClickHandlerin interface- HasValueIconClickHandlers
- Parameters:
- handler- the valueIconClick handler
- Returns:
- HandlerRegistrationused to remove this handler
 
- 
getPickerIconReturns aFormItemIconfor a standard picker with skin-specific settings.- Parameters:
- pickerName- Name of picker icon
- Returns:
- the icon for picker
 
- 
getPickerIconReturns aFormItemIconfor a standard picker with skin-specific settings.- Parameters:
- pickerName- Name of picker icon
- properties- Properties to apply to new picker icon
- Returns:
- the icon for picker
 
- 
setDefaultPropertiesClass 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
- See Also:
 
- 
setUseObjectFactoryForTypeFallbackpublic static void setUseObjectFactoryForTypeFallback(boolean useFallback) Configures whether we useObjectFactoryas a fallback for resolving editorType class names forsetEditorType(java.lang.String)if Reflection is not available for the type.- Parameters:
- useFallback- whether to use ObjectFactory for fallback
 
- 
isAssignableFromWhether the supplied class is a subclass ofcom.smartgwt.client.form.fields.FormItem.- Parameters:
- scClass- the SmartClient Framework class to check
- Returns:
- whether the supplied class isa subclass of FormItem
 
- 
checkFormItemType
- 
getScClassNameGet the name of the underlying SmartClient class- Returns:
- the SmartClient class name
 
- 
setScClassNameSet the name of the underlying SmartClient class. This is an advanced setting.- Parameters:
- scClassName- the SmartClient class
 
- 
asSGWTComponentReturns the existing SGWT FormItem, or creates and returns one if none exist, associated with the suppliedJavaScriptObject. 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
 
- 
getClassNameReturns the JavaScript class name.- Returns:
 
- 
setInitHandlerSpecify 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-
 
- 
setAttributeDescription copied from class:DataClassSet attribute value to a String- Overrides:
- setAttributein class- DataClass
- Returns:
- DataClassinstance, for chaining setter calls
 
- 
setAttributeDescription copied from class:DataClassSet 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:
- setAttributein class- DataClass
- Returns:
- DataClassinstance, for chaining setter calls
 
- 
setAttributeDescription copied from class:DataClassSet attribute value to a BaseClass array. Value will be stored as a JavaScript Array of the underlying JavaScript objects for each entry.- Overrides:
- setAttributein class- DataClass
- Returns:
- DataClassinstance, for chaining setter calls
 
- 
setAttributeDescription copied from class:DataClassSet attribute value to a DataClass array. Value will be stored as a JavaScript Array of the underlying JavaScript objects for each entry.- Overrides:
- setAttributein class- DataClass
- Returns:
- DataClassinstance, for chaining setter calls
 
- 
setAttributeDescription copied from class:DataClassSet attribute value to a Date. Value will be stored as a JavaScript Date on the underlying data object- Overrides:
- setAttributein class- DataClass
- Returns:
- DataClassinstance, for chaining setter calls
 
- 
setAttributeDescription copied from class:DataClassSet attribute value to a ValueEnum array. Value will be stored as a JavaScript Array containing the each Enum value.- Overrides:
- setAttributein class- DataClass
- Returns:
- DataClassinstance, for chaining setter calls
 
- 
setAttributeDescription copied from class:DataClassSet attribute value to a DataClass. Value will be stored as the underlying JavaScript object for the DataClass instance passed in.- Overrides:
- setAttributein class- DataClass
- Returns:
- DataClassinstance, for chaining setter calls
 
- 
setAttributeDescription copied from class:DataClassSet attribute value to a BaseClass. Value will be stored as the underlying JavaScript object for the BaseClass instance passed in.- Overrides:
- setAttributein class- DataClass
- Returns:
- DataClassinstance, for chaining setter calls
 
- 
setAttributeDescription copied from class:DataClassSet attribute value to a JavaScriptObject.- Overrides:
- setAttributein class- DataClass
- Returns:
- DataClassinstance, for chaining setter calls
 
- 
setAttributeDescription copied from class:DataClassSet attribute value to a String array. Value will be stored as a JavaScript Array of Strings on the underlying data object.- Overrides:
- setAttributein class- DataClass
- Returns:
- DataClassinstance, for chaining setter calls
 
- 
setAttributeDescription copied from class:DataClassSet attribute value to a boolean.- Overrides:
- setAttributein class- DataClass
- Returns:
- DataClassinstance, for chaining setter calls
 
- 
setAttributeDescription copied from class:DataClassSet attribute value to a Boolean.- Overrides:
- setAttributein class- DataClass
- Returns:
- DataClassinstance, for chaining setter calls
 
- 
setAttributeDescription copied from class:DataClassSet attribute value to an int. Value will be stored as a JavaScript Number on the underlying data object- Overrides:
- setAttributein class- DataClass
- Returns:
- DataClassinstance, for chaining setter calls
 
- 
setAttributeDescription copied from class:DataClassSet attribute value to an Integer. Value will be stored as a JavaScript Number on the underlying data object- Overrides:
- setAttributein class- DataClass
- Returns:
- DataClassinstance, for chaining setter calls
 
- 
setAttributeDescription copied from class:DataClassSet attribute value to a long. Value will be stored as a JavaScript Number on the underlying data object.- Overrides:
- setAttributein class- DataClass
- Returns:
- DataClassinstance, for chaining setter calls
 
- 
setAttributeDescription copied from class:DataClassSet attribute value to a Float. Value will be stored as a JavaScript Number on the underlying data object- Overrides:
- setAttributein class- DataClass
- Returns:
- DataClassinstance, for chaining setter calls
 
- 
setAttributeDescription copied from class:DataClassSet attribute value to a double. Value will be stored as a JavaScript Number on the underlying data object- Overrides:
- setAttributein class- DataClass
- Returns:
- DataClassinstance, for chaining setter calls
 
- 
setAttributeDescription copied from class:DataClassSet attribute value to a Double. Value will be stored as a JavaScript Number on the underlying data object- Overrides:
- setAttributein class- DataClass
- Returns:
- DataClassinstance, for chaining setter calls
 
- 
setAttributeDescription copied from class:DataClassSet attribute value to an int array. Value will be stored as a JavaScript Array of Numbers on the underlying data object.- Overrides:
- setAttributein class- DataClass
- Returns:
- DataClassinstance, for chaining setter calls
 
- 
setAttributeDescription copied from class:DataClassSet attribute value to an Integer array. Value will be stored as a JavaScript Array of Numbers on the underlying data object.- Overrides:
- setAttributein class- DataClass
- Returns:
- DataClassinstance, for chaining setter calls
 
- 
setAttributeDescription copied from class:DataClassSet attribute value to a double array. Value will be stored as a JavaScript Array of Numbers on the underlying data object- Overrides:
- setAttributein class- DataClass
- Returns:
- DataClassinstance, for chaining setter calls
 
- 
getAttributeDescription copied from class:DataClassReturns attribute value as a String- Overrides:
- getAttributein class- DataClass
- Returns:
 
- 
getAttributeAsStringDescription copied from class:DataClassReturns attribute value as a String.- Overrides:
- getAttributeAsStringin class- DataClass
- Returns:
 
- 
getAttributeAsDateDescription copied from class:DataClassReturns attribute value as a Date. Applies to values stored as a JavaScript Date on the underlying data object.- Overrides:
- getAttributeAsDatein class- DataClass
- Returns:
 
- 
getAttributeAsDoubleDescription copied from class:DataClassReturns attribute as a Double. Applies to values stored as a JavaScript Number on the underlying data object.- Overrides:
- getAttributeAsDoublein class- DataClass
- Returns:
 
- 
getAttributeAsJavaScriptObjectDescription copied from class:DataClassReturns attribute value as a JavaScript Object.- Overrides:
- getAttributeAsJavaScriptObjectin class- DataClass
- Returns:
 
- 
getAttributeAsIntDescription copied from class:DataClassReturns attribute value as an Integer. Applies to values stored as a JavaScript number on the underlying data object.- Overrides:
- getAttributeAsIntin class- DataClass
- Returns:
 
- 
getAttributeAsFloatDescription copied from class:DataClassReturns attribute value as a Float. Applies to values stored as a JavaScript number on the underlying data object.- Overrides:
- getAttributeAsFloatin class- DataClass
- Returns:
 
- 
getAttributeAsBooleanDescription copied from class:DataClassReturns attribute value set as a Boolean. For convenience in checking boolean properties,getAttributeAsBooleanwill return Booleanfalseif the attribute value isnullor not a Boolean. Use the two parameter variant of this APIDataClass.getAttributeAsBoolean(String, boolean)if you wantnullreturned fornullattribute values.- Overrides:
- getAttributeAsBooleanin class- DataClass
- Parameters:
- property- the property name
- Returns:
- the property value
 
- 
getAttributeAsBooleanDescription copied from class:DataClassReturns attribute value set as a Boolean. If the attribute value isnullor not a Boolean, the return value depends uponallowNull. IfallowNullis true,nullwill be returned; otherwise Booleanfalsewill be returned. For a simpler approach that never returnsnull, use the one parameter variant of this APIDataClass.getAttributeAsBoolean(String).- Overrides:
- getAttributeAsBooleanin class- DataClass
- Parameters:
- property- the property name
- allowNull- whether to allow null
- Returns:
- the property value
 
- 
getAttributeAsObject
- 
setNullProperty
- 
setProperty
- 
setProperty
- 
setProperty
- 
setProperty
- 
setProperty
- 
setJavaScriptObject- Overrides:
- setJavaScriptObjectin class- JsObject
 
- 
isCreatedpublic final boolean isCreated()
- 
error- Throws:
- IllegalStateException
 
- 
errorIfNotCreated- Throws:
- IllegalStateException
 
- 
error- Throws:
- IllegalStateException
 
- 
setAutoChildConstructorSets the SmartClient constructor for the AutoChild namedautoChildName.- Parameters:
- autoChildName- the name of the AutoChild
- className- the SmartClient class name to use when constructing the AutoChild.
- See Also:
 
- 
setAutoChildPropertiespublic void setAutoChildProperties(String autoChildName, Canvas properties) throws IllegalStateException Sets the properties for creating aCanvasAutoChild namedautoChildName.propertiesmust not have already been created (properties.isCreated()must befalse).NOTE: Overrides at override points are not applied to AutoChildren created from properties; that is, if the JavaClassofpropertiesoverrides a Smart GWT override point, the custom method implementation will not be called.- Throws:
- IllegalStateException- if- propertieshas been created.
- See Also:
 
- 
setAutoChildPropertiespublic void setAutoChildProperties(String autoChildName, FormItem properties) throws IllegalStateException Sets the properties for creating aFormItemAutoChild namedautoChildName.propertiesmust not have already been created (properties.isCreated()must befalse).NOTE: Overrides at override points are not applied to AutoChildren created from properties; that is, if the JavaClassofpropertiesoverrides a Smart GWT override point, the custom method implementation will not be called.- Throws:
- IllegalStateException- if- propertieshas been created.
- See Also:
 
- 
setAutoChildPropertiespublic void setAutoChildProperties(String autoChildName, EditProxy properties) throws IllegalStateException Sets the properties for creating an AutoChild namedautoChildName.propertiesmust not have already been created (properties.isCreated()must befalse).- Throws:
- IllegalStateException- if- propertieshas been created.
- See Also:
 
- 
setAutoChildVisibilitySets whether to create and show the AutoChild namedautoChildName.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
 
- 
getCanvasAutoChildReturns theCanvasAutoChild namedautoChildNameif already created.- Parameters:
- autoChildName- name of an AutoChild to return.
- Throws:
- RuntimeException- if the AutoChild is not a SmartClient- Canvasobject.
 
- 
getFormItemAutoChildReturns theFormItemAutoChild namedautoChildNameif already created.- Parameters:
- autoChildName- name of an AutoChild to return.
- Throws:
- RuntimeException- if the AutoChild is not a SmartClient- FormItemobject.
 
- 
setNameName for this form field. Must be unique within the form as well as a valid JavaScript identifier - seeFieldNamefor details and how to check for validity.The FormItem's name determines the name of the property it edits within the form. Note that an item must have a valid name or dataPathin order for its value to be validated and/or saved.
- 
setErrorOrientationIfshowInlineErrorsis 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 fromerrorOrientation.- Parameters:
- errorOrientation- errorOrientation Default value is null
 
- 
setTypeThe 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"
 
- 
setColSpanNumber of columns that this item spans.The colSpansetting does not include the title shown for items withshowTitle:true, so the effectivecolSpanis one higher than this setting for items that are showing a title and whoseTitleOrientationis either "left" or "right".- Parameters:
- colSpan- colSpan Default value is 1
- Returns:
- FormIteminstance, for chaining setter calls
 
- 
setColSpanNumber of columns that this item spans.The colSpansetting does not include the title shown for items withshowTitleset to true, so the effectivecolSpanis one higher than this setting for items that are showing a title and whoseTitleOrientationis either "left" or "right".- Parameters:
- colSpan- colSpan Default value is 1
- Returns:
- FormIteminstance, for chaining setter calls
 
- 
getTypeThe DynamicForm picks a field renderer based on the type of the field (and sometimes other attributes of the field).- Returns:
- the type
 
- 
setDefaultValueValue used when no value is provided for this item. Note that whenever this item's value is cleared by the user or set tonullprogrammatically, it will be reverted to thedefaultValue. Developers should use thevaluesobject if their intention is to provide an initial value for a field in a form rather than a value to use in place ofnull.- Parameters:
- defaultValue- defaultValue Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
 
- 
setDefaultValueValue used when no value is provided for this item. Note that whenever this item's value is cleared by the user or set tonullprogrammatically, it will be reverted to thedefaultValue. Developers should use thevaluesobject if their intention is to provide an initial value for a field in a form rather than a value to use in place ofnull.- Parameters:
- defaultValue- defaultValue Default value is null
 
- 
setDefaultValueValue used when no value is provided for this item. Note that whenever this item's value is cleared by the user or set tonullprogrammatically, it will be reverted to thedefaultValue. Developers should use thevaluesobject if their intention is to provide an initial value for a field in a form rather than a value to use in place ofnull.- Parameters:
- defaultValue- defaultValue Default value is null
 
- 
setDefaultValueValue used when no value is provided for this item. Note that whenever this item's value is cleared by the user or set tonullprogrammatically, it will be reverted to thedefaultValue. Developers should use thevaluesobject if their intention is to provide an initial value for a field in a form rather than a value to use in place ofnull.- Parameters:
- defaultValue- defaultValue Default value is null
- Returns:
- FormIteminstance, for chaining setter calls
 
- 
setDefaultValueValue used when no value is provided for this item. Note that whenever this item's value is cleared by the user or set tonullprogrammatically, it will be reverted to thedefaultValue. Developers should use thevaluesobject if their intention is to provide an initial value for a field in a form rather than a value to use in place ofnull.- Parameters:
- defaultValue- defaultValue Default value is null
 
- 
setDefaultValueValue used when no value is provided for this item. Note that whenever this item's value is cleared by the user or set tonullprogrammatically, it will be reverted to thedefaultValue. Developers should use thevaluesobject if their intention is to provide an initial value for a field in a form rather than a value to use in place ofnull.- Parameters:
- defaultValue- defaultValue Default value is null
 
- 
setDefaultValue
- 
setValueMapSet the valueMap for this item.- Parameters:
- valueMap- the value map
- See Also:
 
- 
setValueMapSet the valueMap for this item.- Overrides:
- setValueMapin class- Field
- Parameters:
- valueMap- the value map
- Returns:
- Fieldinstance, for chaining setter calls
- See Also:
 
- 
setValueIconsSet the valueIcons for this item.- Parameters:
- valueIcons- mapping of logical values for this item to icon src URLs
 
- 
setEditorPropertiesSet the defaultFormItemproperties to be used whenever this field is edited.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 explainedhere.Note: The FormItem passed to setEditorProperties() is used as a "template" to create a FormItem whenever the form needs to show an interface for editing this field. For an overview of the template rules, reflection requirements when trying to assign an edit Formitem by type, and an understanding of how the various setEditorProperties()calls on different classes relate to each other in determining what configuration ultimately gets applied to the edit FormItem, seeDataSourceField.setEditorProperties(FormItem).- Parameters:
- editorProperties- FormItem with the properties you want to set as defaults.
- See Also:
 
- 
setEditorTypeDeprecated.Renamed tosetEditorProperties(FormItem). You can also consider usingsetEditorType(Class)orsetEditorType(String)instead.Synonym forsetEditorProperties(FormItem).- Parameters:
- editorType- FormItem with the properties you want to set as defaults
 
- 
setEditorTypeSet the FormItem subclass to use when editing.The type of FormItemto use for editing is normally derived automatically from thetype, which is the data type of the field, by the rules explainedhere.Note: The editorType must be registered for use with the reflection mechanism. By doing so, you avoid the limitations ofsetEditorProperties(FormItem). If the editorType cannot be resolved via reflection, this method will still work if editorType refers to a built-in SmartGWT framework class, such asSetFilterItem.- Parameters:
- editorType- the fully-qualified class name of a- FormItemsubclass.
- Throws:
- IllegalArgumentException- if the editorType class has not been registered for use with the- reflection mechanism, and it is not a built-in framework class, or if it does not inherit from- FormItem.
 
- 
setEditorTypeSet the FormItem subclass to use when editing.The type of FormItemto use for editing is normally derived automatically from thetype, which is the data type of the field, by the rules explainedhere.Note: The editorType must be registered for use with the reflection mechanism. By doing so, you avoid the limitations ofsetEditorProperties(FormItem). If the editorType cannot be resolved via reflection, this method will still work if editorType refers to a built-in SmartGWT framework class, such asSetFilterItem.- Parameters:
- editorType- a- FormItemsubclass.
- Throws:
- IllegalArgumentException- if the editorType class has not been registered for use with the- reflection mechanism, and it is not a built-in framework class, or if it does not inherit from- FormItem.
 
- 
setValuepublic void setValue(int value) Set the value of the form item.- Parameters:
- value- the form item value
 
- 
setValuepublic void setValue(double value) Set the value of the form item.- Parameters:
- value- the form item value
 
- 
setValueSet the value of the form item.- Parameters:
- value- the form item value
 
- 
setValueSet the value of the form item.- Parameters:
- value- the form item value
 
- 
setValuepublic void setValue(boolean value) Set the value of the form item.- Parameters:
- value- the form item value
 
- 
setValueSet the value of the form item as an object. GWT objects set as FormItem values are typically used withFormItemValueParserandFormItemValueFormatterAPI's for custom value parsing and formatting.- Parameters:
- value- the form item value
 
- 
getDisplayValueReturns this item's value with any valueMap applied to it - the value as currently displayed to the user.- Returns:
- value displayed to the user
 
- 
getDisplayValueReturns this item's value with any valueMap applied to it - the value as currently displayed to the user.- Returns:
- value displayed to the user
 
- 
getVisibleHeightpublic 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.
 
- 
getVisibleWidthpublic 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.
 
- 
getPageRectReturn the page-level coordinates of this object.- Returns:
- the page-level coordinates of this object
 
- 
getRectReturn the coordinates of this object.- Returns:
- the coordinates of this object
 
- 
getIconRect
- 
getIconPageRect
- 
getConfigReturns the FormItem's config object suitable for use in API's that set the editorType- Returns:
- the config object
 
- 
getEditorTypeConfig
- 
setTooltipThis text is shown as a tooltip prompt when the cursor hovers over this item. Alias forsetPrompt(java.lang.String).- Parameters:
- tooltip- tooltip Default value is null
 
- 
getTooltipThis text is shown as a tooltip prompt when the cursor hovers over this item. Alias forgetPrompt()- Returns:
- String
 
- 
setOptionFilterContextIf this item has a specifiedoptionDataSource, and this property is
 not null, this will be passed to the datasource asRPCRequestproperties when
 performing the fetch operation on the dataSource to obtain a data-value to display-value
 mappingNote : This is an advanced setting - Parameters:
- rpcRequestProperties- optionFilterContext Default value is null
 
- 
getOptionFilterContextIf this item has a specifiedoptionDataSource, and this property is
 not null, this will be passed to the datasource asRPCRequestproperties when
 performing the fetch operation on the dataSource to obtain a data-value to display-value
 mapping- Returns:
- RPCRequest Properties
 
- 
setOptionCriteriaIf this item has a specifiedoptionDataSource, 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
 mappingNote : This is an advanced setting - Parameters:
- optionCriteria- optionCriteria Default value is null
 
- 
getOptionCriteriaIf this item has a specifiedoptionDataSource, 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
 
- 
setShowIfConditionExpression 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)
 
 
- 
setErrorFormatterRegister a custom error formatter for this FormItem.- Parameters:
- errorFormatter- the error formatter.
 
- 
setInputTransformerThe 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 thechangeevent.- Parameters:
- inputTransformer- the input transformer
 
- 
setItemHoverFormatterThe 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
 
- 
setItemTitleHoverFormatterTheFormItemHoverFormattershould 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:
 
- 
setTitleHoverFormatterSynonym forsetItemTitleHoverFormatter(FormItemHoverFormatter).- Parameters:
- hoverFormatter- the hover formatter
 
- 
setItemValueHoverFormatterTheFormItemHoverFormattershould 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:
 
- 
setValueHoverFormatterSynonym forsetItemValueHoverFormatter(FormItemHoverFormatter).- Parameters:
- hoverFormatter- the hover formatter
 
- 
getFormA reference to the FormItem's DynamicForm.Note that you must treat this as a read-only reference to the from - Returns:
- the form
 
- 
getValueReturn the value tracked by this form item. If this item has multiple:true, then either null or aListorRecordListinstance is returned.Note that for FormItems that have a ValueMap or where a formatterhas been defined,getValue()returns the underlying value of the FormItem, not the displayed value.- Returns:
- value of this element
 
- 
_getValue
- 
getValueAsLongReturn the value tracked by this form item as a Long. If the value cannot be parsed to an int that matches the original value, null will be returned.This method may be preferred over getValueAsInteger()as an underlying JavaScript number has an integral range that is more that Java Integer but less than Java Long (see background).If you're actually using Long values where you might need the entire range, see DataSourceField.stringInBrowserfor suggested approaches.- Returns:
- value of this element
- See Also:
 
- 
getValueAsRecordList
- 
setValueFormatterOptionalFormItemValueFormatter, if provided, is evaluated to get the display value to show for this form items underlying data value. If you are considering using this method, you should first consider usingFormItem.setFormat, which provides for simple and flexible declarative formatting of dates, times and numbers, without the need to write formatting code.This provides a way to perform a more complex data to display value manipulation than a simple valueMap. Note that by default this formatter will only be applied to static displays such asStaticTextItemorSelectItem, and does not apply to values displayed in a freely editable text entry field (such as aTextItemorTextAreaItem), unlessTextItem.setFormatOnBlur(java.lang.Boolean)is set totrue, which causes this formatter to be applied while the item does not have focus, and then be cleared when the user moves focus to the text field.See also setEditorValueFormatter(com.smartgwt.client.widgets.form.FormItemValueFormatter)andsetEditorValueParser(com.smartgwt.client.widgets.form.FormItemValueParser).- Parameters:
- formatter- the FormItemValueFormatter
 
- 
setEditorValueFormatterAn optionalFormItemValueFormatterto 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 TextItemorTextAreaItem. For display values which will not be directly manipulated by the user, usesetValueFormatter(com.smartgwt.client.widgets.form.FormItemValueFormatter)instead.See also setEditorValueParser(com.smartgwt.client.widgets.form.FormItemValueParser).- Parameters:
- formatter- the FormItemValueFormatter
 
- 
setEditorValueParserAn optionalFormItemValueParserto 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 theTextItemorTextAreaItem.See also com.smartgwt.client.widgets.form.fields.FormItem#formatEditorValue- Parameters:
- valueParser- the FormItemValueParser
 
- 
setValueIconMapperSet 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 oversetValueIcons(java.util.Map).- Parameters:
- valueIconMapper- the valueIconMapper
 
- 
setDisplayFormatFields of type"date"or"time"will be edited using aDateItemorTimeItemby default.However this can be overridden - for canEdit:falsefields, aStaticTextItemis used by default, and the developer can always specify a customeditorTypeas well asdata type.For fields of type "date", set this property to a validDateDisplayFormatto specify how the date should be formatted.
 For fields of type"time", set this property to a validtimeFormatterto specify how the time should be formatted.
 Note that ifdateFormatterortimeFormatterare specified they will take precedence over this setting.If this field is of type "date"and is editable, theinputFormatmay 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
- Returns:
- FormIteminstance, for chaining setter calls
- See Also:
 
- 
setDisplayFormatFields of type"date"or"time"will be edited using aDateItemorTimeItemby default.However this can be overridden - for canEdit:falsefields, aStaticTextItemis used by default, and the developer can always specify a customeditorTypeas well asdata type.For fields of type "date", set this property to a validDateDisplayFormatto specify how the date should be formatted.
 For fields of type"time", set this property to a validtimeFormatterto specify how the time should be formatted.
 Note that ifdateFormatterortimeFormatterare specified they will take precedence over this setting.If this field is of type "date"and is editable, theinputFormatmay 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:
 
- 
setCanEditCriterionPredicateWhen a dynamic form is editing an advanced criteria object viaDynamicForm.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.setCriterionfrom the registeredFormItemCriterionSetterto actually apply the criterion to the form item, andDynamicForm.getValuesAsCriteriacan subsequently retrieve the edited criterion by callingFormItemCriterionGetter.getCriterionfrom the registeredFormItemCriterionGetter.Default implementation will return true if the criterion fieldNameandoperatormatch 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:
 
- 
canEditCriterionCalls thecanEditCriterion()method of theFormItemCanEditCriterionPredicatethat 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:
 
- 
setCriterionGetterProvides a specialized criterion from this formItem when creating an AdvancedCriteria viaDynamicForm.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.hasAdvancedCriteriato ensure this method is called by the form, and to support editing of existing advanced criteria you may also need to set theFormItemCanEditCriterionPredicateand theFormItemCriterionSetter.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:
 
- 
getCriterionCalls thegetCriterion()method of theFormItemCriterionGetterthat is registered with this field.- Returns:
- criterion object based on this fields current edited value(s).
- See Also:
 
- 
getCriterionCalls thegetCriterion()method of theFormItemCriterionGetterthat 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:
 
- 
setCriterionSetterSet the method to update this form item to reflect a criterion object from within an AdvancedCriteria. Called byDynamicForm.setValuesAsCriteriawhen the registeredFormItemCanEditCriterionPredicatereturns true for this item.Default implementation simply calls FormItem.setValuewith thevalueof the criterion passed in- Parameters:
- setter- provides a method to update this field with the edited criterion
 
- 
setCriterionCalls thesetCriterion()method of theFormItemCriterionSetterthat is registered with this field.- Parameters:
- criterion- criterion to edit
 
- 
setAriaStateSet a specific ARIA state mapping for this form item. Usually this does not need to be manually set. Seecom.smartgwt.docs.Accessibility.- Parameters:
- stateName-
- stateValue-
- Throws:
- IllegalStateException- ARIA state cannot be changed after the form item has been created.
 
- 
getErrorsReturns any validation errors for this field. If no errors are present, will return null.- Returns:
- error messages for the field.
 
- 
setErrorsSets a validation error message for this field.
- 
setErrorsSets multiple validation error messages for this field.
- 
isDisabledIs this item disabled?
- 
getDisabledDeprecated.Do not use this API. Instead, use {@link #isDisabled)}, which correctly inherits the disabled state from containersIs this item disabled?
- 
setCustomStateGetterDeprecated.Do not use CustomStateGetter; usecom.smartgwt.client.widgets.form.fields.FormItem.setStateCustomizerinsteadSpecify a CustomStateGetter to use for this formItem.If defined, the CustomStateGetter's getCustomState() method will be called whenever the framework needs to determine which style to use for the formItem in its state at that time - Parameters:
- getter- the CustomStateGetter object
 
- 
setStateCustomizerSpecify a StateCustomizer to use for this formItem. Note, StateCustomizer supersedes the deprecatedCustomStateGetter; the only difference between the two interfaces is that theStateCustomizer'sgetCustomState()method is passed the applicable FormItem, so application code does not need to track this information.The StateCustomizer's getCustomState() method will be called whenever the framework needs to determine which style to use for the formItem in its state at that time - Parameters:
- customizer- the StateCustomizer object
 
- 
setConfigOnlypublic void setConfigOnly(boolean configOnly) 
- 
isConfigOnlypublic boolean isConfigOnly()
- 
linkToInstanceUponCreatepublic void linkToInstanceUponCreate()
- 
mapDisplayToValueGiven a display value for this FormItem, return the underlying data value. This is done by reverse value-mapping, and/or parsing.This method is called by the framework to derive an underlying data value for a given display value (ie, the value the user sees and interacts with) in a FormItem. Your own code can call this method if you need to programmatically obtain the underlying data value for a given display value. However, this method is not an override point. If you have a field that requires the stored value to be different from the displayed value, and the requirement cannot be satisfied with a valueMapfor some reason, you can add custom parsing logic by setting aneditor value parserThis method is also not intended as a place where you can validate, sanitize, transform or canonicalize user input - To ensure
 you get well-formed input values, use input masksor a {@link com.smartgwt.client.widgets.form.fields.FormItem#addChangeHandler(com.smartgwt.client.widgets.form.fields.events.ChangeHandler change handler)}
- To transform or canonicalize input values, use a mask validatorwith "transformTo". See the link to "mask validator" for more details and an example of this
- To transform or canonicalize input character-by-character as the user types, use
 an input transformer
 Deriving the data valueThe process of deriving an underlying data display value from a display value involves the following steps:- If the formItem           has an editor value parser, it is called
- Otherwise, if the formItem is of a SimpleTypethat has had an edit parser applied with thesetEditParser()API, the edit parser is called
- If the
 formItem is of a SimpleTypethatinheritsFrom"date", "time" or "datetime", it will be parsed as a date, time or datetime. Note, this parsing step is applied on top of custom SimpleType- and FormItem-level parsing
- If the formItem declares a valueMap, a value is derived by looking up the display value (including the effects of any parsing we may have done so far) in the valueMap
 mapValueToDisplay(), there is no special built-in handling ofDataSourceField.multiple:true- Parameters:
- value- display value
- Returns:
- value re-mapped for storing
- See Also:
 
- To ensure
 you get well-formed input values, use 
- 
mapValueToDisplayGiven a value for this FormItem, return the value to be displayed.This method is called by the framework to derive a display value for a given data value in a FormItem. Your own code can call this method if you need to programmatically obtain the display value (for example, to display in a hover prompt or error message). However, this method is not an override point. There are several supported ways to apply custom formatting to your form values: - If you want to apply a consistent custom format to every instance of a given SimpleType, specify aformaton the SimpleType. This is the most general approach. Note, this is a static formatter: it will only affect the format of values the user can interact with ifTextItem.formatOnBluris set
- If you want to apply a consistent custom format to a  DataSource-described field, the best approach isDataSourceField.format. This overrides SimpleType-level formatting and, again, is static formatting
- For a FormItem that is not DataSource-described, or for special formats that 
 should only be used on a particular form, formatcan also be declared for individual FormItems. This overrides DataSource-level formatting
- For temporal values,
 you can declare dateFormatterandtimeFormatterat bothFormItemandDynamicFormlevels. Generally, however, we recommend the generic declarativeformatas the simpler approach
- If you want
 to apply a specialized format that cannot be expressed declaratively, use  setValueFormatter(com.smartgwt.client.widgets.form.FormItemValueFormatter)for static-valued items likeStaticTextItemorSelectItem, andsetEditorValueFormatter(com.smartgwt.client.widgets.form.FormItemValueFormatter)for other types of FormItem
 Deriving the display valueThe process of deriving a display value from a data value involves the following steps:- If the item declares a valueMap, the display value is derived by looking up the value in the valueMap
- If the item does not have a
 valueMap - or the value was not found in the item's  valueMap - and the item declares a displayFieldand anoptionDataSource, the display value is derived by looking up the "displayField" corresponding to the value in the optionDataSource's local cache
- Formatting is
 now applied to the derived display value.  Note, it is perfectly normal  at this point for no display value has to be
 derived - this will be the case for any   field with no valueMapand nooptionDataSource. In this case, the passed-in value is treated as the display value for all further purposes.- If the FormItem
 involves static display value(s), like StaticTextItemorSelectItem- If the FormItem                  has had a static
 value formatter applied with the                    setValueFormatter()API, the value formatter is called
- Otherwise, if the formItem declares a format, the formst is applied in line with the rules ofFormatString
- Otherwise, if the FormItem is of a SimpleTypethat declares aformat, the format is applied
 
- If the FormItem                  has had a static
 value formatter applied with the                    
- Otherwise, if the FormItem                   has had an
 editor value formatter applied with the                    setEditorValueFormatter()API, the editor value formatter is called
- Otherwise, if the FormItem is of a SimpleTypethat has had an edit formatter applied with thesetEditFormatter()API, the edit formatter is called
- Otherwise, if the value is a
 Date:- If the formItem declares a timeFormatterand nodateFormatter, the timeFormatter is called
- Otherwise, if the formItem is of a SimpleTypethatinheritsFrom"time", the value is formatted using thedefault time format
- Otherwise, the
 date or datetime is formatted using the rules described              for dateFormatter.
 
- If the formItem declares a 
- Otherwise,
 if the FormItem involves static display value(s) and is of a          SimpleTypethat declares anormalDisplayFormatter, this is used
- Otherwise, if the value is not null and is of a "simple" type (ie, it is not an         object or an array), a
 display value is derived by calling the Javascript          toLocaleString()method, if the value has one, or thetoString()method if it does not
- Otherwise, if the value is null or a
 zero-length string, the display value is          set to the formItem's emptyDisplayValue
- Otherwise, the "display value" is the simple, unformatted data value that was passed in
 
- If the FormItem
 involves static display value(s), like 
 Treatment of arraysOrdinarily, arrays are treated like any other value. This means you can, for example, create a {@link com.smartgwt.client..widgets.form.FormItemValueFormatter value formatter} that is capable of formatting an array-valued field in some way that makes sense for the particular application domain.However, for items that are marked to handle multiplevalues, array values are treated differently. In this case, the display value is built up by callingmapValueToDisplay()recursively for each array entry, and concatenating these partial display values together using themultipleValueSeparator.- Parameters:
- value- value to be mapped to a display value
- Returns:
- value to display. Note, for items with static value(s), such as                        SelectItemorStaticTextItem, the display value string will be interpreted as HTML by the browser. SeeSelectItem.escapeHTMLfor more details
- See Also:
 
- If you want to apply a consistent custom format to every instance of a given 
- 
mapValueToDisplay
- 
mapValueToDisplay
- 
getWarnOnEditorTypeConversionDefaultpublic static boolean getWarnOnEditorTypeConversionDefault()Gets whether, by default, a warning will be logged if the Framework replaces a SmartGWT FormItem (that wraps the SmartClient item instance) to more closely match the underlying item's type.- Returns:
- whether to warn if SmartGWT FormItem wrapping a SmartClient item is replaced
- See Also:
 
- 
setWarnOnEditorTypeConversionDefaultpublic static void setWarnOnEditorTypeConversionDefault(boolean warn) Sets whether, by default, a warning will be logged if the Framework replaces a SmartGWT FormItem (that wraps the SmartClient item instance) to more closely match the underlying item's type.- Parameters:
- warn- whether to warn if SmartGWT FormItem wrapping a SmartClient item is replaced
- See Also:
 
- 
getWarnOnEditorTypeConversionpublic boolean getWarnOnEditorTypeConversion()Gets whether a warning will be logged if the Framework replaces this SmartGWT FormItem (that wraps the SmartClient item instance) to more closely match the underlying item's type. The default value can be configured by callingsetWarnOnEditorTypeConversionDefault(boolean).- Returns:
- whether to warn if SmartGWT FormItem wrapping a SmartClient item is replaced
 
- 
setWarnOnEditorTypeConversionpublic void setWarnOnEditorTypeConversion(boolean warn) Sets whether a warning will be logged if the Framework replaces this SmartGwt FormItem (that wraps the SmartClient item instance) to more closely match the underlying item's type whengetOrCreateRef()is called. A SmartGWT FormItem created using the default or (String) name constructor will never be replaced unless it has the base class (i.e. FormItem) type, in which case it's always replaced as no SmartClient FormItem instance will ever have the FormItem class type. A SmartGWT FormItem created using theJavaScriptObjectconstructor (perhaps indirectly viaFormItemFactory) will be replaced by a call togetOrCreateRef()if the wrapping SmartGWT FormItem type ends up mismatching the underlying SmartClient instance. This may happen if:- the SmartGWT FormItem type wrapping the instance is the base class, FormItem,
- the JavaScriptObject content passed in is chosen inconsistently with the actual class of the SmartGWT FormItem constructor chosen to wrap it, or
- the DynamicForminstance doesn't exist, soFormItemFactory(if used) is unable to select the right SmartGWT FormItem class to wrap the underlying SmartClient item instance
 Note that when calling a SmartGWT FormItem constructor taking a JavaScriptObject, you can call setAttribute()on the "editorType" property and pass the desired FormItem subclass name to ensure that the ultimate SmartClient instance type matches the SmartGWT FormItem constructor you've chosen (except when creating the base class FormItem type - that will always be replaced). You can usesetEditorType()instead of setAttribute() if you've made the Java annotation to generate the appropriate BeanFactory, but that's really only needed if the type being set doesn't correspond to a native SmartGWT Framework FormItem class.The default value can be configured by calling setWarnOnEditorTypeConversionDefault(boolean).- Parameters:
- warn- whether to warn if SmartGWT FormItem wrapping a SmartClient item is replaced
 
- 
handleWarnOnEditorTypeConversion
- 
getValueMapIn a form, valueMaps are used for FormItem types that allow the user to pick from a limited set of values, such as aSelectItem. An item's valueMap can be either an Array of String values or a Map of stored String property names to Java Objects.To set the initial selection for a form item with a valueMap, use defaultValue.See also DataSourceField.valueMap.- Overrides:
- getValueMapin class- Field
- Returns:
- Map
- See Also:
 
- 
getValueMapAsArraySee alsogetValueMap()- Returns:
- String[]
 
 
-