|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.smartgwt.client.core.JsObject
com.smartgwt.client.core.DataClass
com.smartgwt.client.core.RefDataClass
com.smartgwt.client.widgets.form.fields.FormItem
public class FormItem
An Item that can participate in a DynamicForm, managing some value.
FormItems are never directly created, instead, FormItem descriptors are passed to a
DynamicForm. See the DynamicForm
documentation for details.
Field Summary |
---|
Fields inherited from class com.smartgwt.client.core.JsObject |
---|
jsObj |
Constructor Summary | |
---|---|
FormItem()
|
|
FormItem(com.google.gwt.core.client.JavaScriptObject jsObj)
|
Method Summary | |
---|---|
HandlerRegistration |
addBlurHandler(BlurHandler handler)
Add a blur handler. |
HandlerRegistration |
addChangedHandler(ChangedHandler handler)
Add a changed handler. |
HandlerRegistration |
addChangeHandler(ChangeHandler handler)
Add a change handler. |
HandlerRegistration |
addClickHandler(ClickHandler handler)
Add a click handler. |
HandlerRegistration |
addDoubleClickHandler(DoubleClickHandler handler)
Add a doubleClick handler. |
HandlerRegistration |
addFocusHandler(FocusHandler handler)
Add a focus handler. |
HandlerRegistration |
addIconClickHandler(IconClickHandler handler)
Add a iconClick handler. |
HandlerRegistration |
addIconKeyPressHandler(IconKeyPressHandler handler)
Add a iconKeyPress handler. |
HandlerRegistration |
addItemHoverHandler(ItemHoverHandler handler)
Add a itemHover handler. |
HandlerRegistration |
addKeyDownHandler(KeyDownHandler handler)
Add a keyDown handler. |
HandlerRegistration |
addKeyPressHandler(KeyPressHandler handler)
Add a keyPress handler. |
HandlerRegistration |
addKeyUpHandler(KeyUpHandler handler)
Add a keyUp handler. |
HandlerRegistration |
addTitleHoverHandler(TitleHoverHandler handler)
Add a titleHover handler. |
void |
blurItem()
Takes focus from this form item's focusable element. |
void |
disable()
Set this item to be disabled at runtime. |
void |
enable()
Set this item to be enabled at runtime. |
void |
focusInItem()
Move the keyboard focus into this item's focusable element |
java.lang.String |
getAccessKey()
AccessKey - a keyboard shortcut to trigger a form item's default behavior. Note: Alt+ (or in Moz Firefox 2.0 and above, Shift+Alt+) the specified key will trigger the form item's default behavior. |
Alignment |
getAlign()
Alignment of this item in its cell. |
java.lang.String |
getAttribute(java.lang.String attribute)
|
java.lang.Boolean |
getAttributeAsBoolean(java.lang.String attribute)
|
java.util.Date |
getAttributeAsDate(java.lang.String attribute)
|
java.lang.Double |
getAttributeAsDouble(java.lang.String attribute)
|
java.lang.Float |
getAttributeAsFloat(java.lang.String attribute)
|
java.lang.Integer |
getAttributeAsInt(java.lang.String attribute)
|
com.google.gwt.core.client.JavaScriptObject |
getAttributeAsJavaScriptObject(java.lang.String attribute)
|
java.lang.String |
getAttributeAsString(java.lang.String attribute)
|
java.lang.String |
getCellStyle()
CSS style applied to the form item as a whole, including the text element, any icons, and any hint text for the item. |
com.google.gwt.core.client.JavaScriptObject |
getConfig()
|
java.lang.String |
getCriteriaField()
When using operator , the name of the DataSource field for the
${isc.DocUtils.linkForRef('object:Criterion')} this FormItem generates. |
void |
getCriterion()
Override this method if you need to provide a specialized criterion from this formItem when creating an AdvancedCriteria via DynamicForm.getValuesAsCriteria() .
|
DateDisplayFormat |
getDateFormatter()
Display format to use for date type values within this formItem. |
java.lang.String |
getDefaultIconSrc()
Default icon image source. |
java.lang.Boolean |
getDisabled()
Whether this item is disabled. |
java.lang.String |
getDisplayField()
Specifies an alternative field from which display values should be retrieved for this item. |
java.lang.String |
getDisplayFieldName()
Returns the displayField for this form item.
If unset, and optionDataSource is explicitly specified, this method
will return the title field for the optionDataSource
|
java.lang.String |
getDisplayValue()
Returns this item's value with any valueMap applied to it - the value as currently displayed to the user. |
java.lang.String |
getDisplayValue(java.lang.String value)
Returns this item's value with any valueMap applied to it - the value as currently displayed to the user. |
java.lang.String |
getEmptyDisplayValue()
Text to display when this form item has a null or undefined value. |
java.lang.String |
getEmptyValueIcon()
This property allows the developer to specify an icon to display when this item has no value. |
java.lang.Boolean |
getEndRow()
Whether this item should end the row it's in in the form layout |
int |
getErrorIconHeight()
Height of the error icon, if we're showing icons when validation errors occur. |
java.lang.String |
getErrorIconSrc()
URL of the image to show as an error icon, if we're showing icons when validation errors occur. |
int |
getErrorIconWidth()
Height of the error icon, if we're showing icons when validation errors occur. |
int |
getErrorMessageWidth()
When showInlineErrors and showErrorText are both true and
errorOrientation is "left" or "right", errorMessageWidth is the amount to reduce
the width of the editor to accomodate the error message and icon. |
java.lang.Boolean |
getFetchMissingValues()
If displayField is specified for this item, should the item
perform a fetch on the optionDataSource to retrieve the display value
for the item when setValue(int) is called with a value for which we
do not already have a mapped display value?
|
java.lang.String |
getFieldName()
Return the name for the this formItem. |
java.lang.Boolean |
getFilterLocally()
If this form item is mapping data values to a display value by fetching them from a dataSource (see optionDataSource , displayField
and fetchMissingValues ), setting this property to true ensures that when
the form item value is set, entire data-set from the dataSource is loaded at once and
used as a valueMap, rather than just loading the display value for the current value.
This avoids the need to perform fetches each time setValue() is called with a new value.
|
java.lang.Integer |
getGlobalTabIndex()
TabIndex for the form item within the page. |
int |
getHeight()
Default height of this item. |
java.lang.String |
getHint()
Specifies "hint" string to show next to the form item to indicate something to the user. This string generally appears to the right of the form item. |
java.lang.String |
getHintStyle()
CSS class for the "hint" string. |
Alignment |
getHoverAlign()
Text alignment for text displayed in this item's hover canvas, if shown. |
java.lang.Integer |
getHoverDelay()
If specified, this is the number of miliseconds to wait between the user rolling over this form item, and triggering any hover action for it. If not specified this.form.itemHoverDelay will be used instead. |
java.lang.Integer |
getHoverHeight()
Option to specify a height for any hover shown for this item. |
java.lang.Integer |
getHoverOpacity()
Opacity for any hover shown for this item |
java.lang.String |
getHoverStyle()
Explict CSS Style for any hover shown for this item. |
java.lang.Integer |
getHoverVAlign()
Vertical text alignment for text displayed in this item's hover canvas, if shown. |
java.lang.Integer |
getHoverWidth()
Option to specify a width for any hover shown for this item. |
int |
getIconHeight()
Default height for form item icons |
Rectangle |
getIconPageRect(FormItemIcon icon)
|
java.lang.String |
getIconPrompt()
Default prompt (and tooltip-text) for icons. |
Rectangle |
getIconRect(FormItemIcon icon)
|
VerticalAlignment |
getIconVAlign()
How should icons be aligned vertically for this form item. |
int |
getIconWidth()
Default width for form item icons |
java.lang.String |
getImageURLPrefix()
Prefix to apply to the beginning of any valueIcons when determining the
URL for the image.
Will not be applied if the valueIcon URL is absolute. |
java.lang.String |
getImageURLSuffix()
Suffix to apply to the end of any valueIcons when determining the URL for
the image. |
int |
getLeft()
Left coordinate of this item in pixels. |
java.lang.String |
getName()
Name for this form field. The FormItem's name determines the name of the property it edits within the form. |
OperatorId |
getOperator()
OperatorId to be used when DynamicForm.getValuesAsCriteria() is called.
|
static FormItem |
getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)
|
java.lang.Integer |
getPickerIconHeight()
If showPickerIcon is true for this item, this property governs the
size of the picker icon. |
java.lang.String |
getPickerIconSrc()
If showPickerIcon is true for this item, this property governs the
src of the picker icon image to be displayed. |
java.lang.Integer |
getPickerIconWidth()
If showPickerIcon is true for this item, this property governs the
size of the picker icon. |
java.lang.String |
getPrompt()
This text is shown as a tooltip prompt when the cursor hovers over this item. |
java.lang.Boolean |
getRejectInvalidValueOnChange()
If validateOnChange is true, and validation fails for this item on change, with no suggested value, should we revert to the previous value, or continue to display the bad value entered by the user. |
java.lang.Boolean |
getRequired()
Whether a non-empty value is required for this field to pass validation. |
int |
getRowSpan()
Number of rows that this item spans |
java.lang.Boolean |
getSelectOnFocus()
Allows the selectOnFocus behavior to be configured on a
per-FormItem basis. |
java.lang.Boolean |
getShouldSaveValue()
Should this item's value be saved in the form's values and hence returned from DynamicForm.getValues() ?
|
java.lang.Boolean |
getShowDisabled()
When this item is disabled, should it be re-styled to indicate its disabled state? |
java.lang.Boolean |
getShowErrorIcon()
showErrorIcons ,
showErrorText , and
showErrorStyle control how validation errors are
displayed next to form items when showInlineErrors is true.
These properties are boolean values, and can be set on a DynamicForm to control the
behavior form-wide, or set on individual FormItems.
|
java.lang.Boolean |
getShowErrorStyle()
showErrorIcons ,
showErrorText , and
showErrorStyle control how validation errors are
displayed next to form items when showInlineErrors is true.
These properties are boolean values, and can be set on a DynamicForm to control the
behavior form-wide, or set on individual FormItems.
|
java.lang.Boolean |
getShowErrorText()
showErrorIcons ,
showErrorText , and
showErrorStyle control how validation errors are
displayed next to form items when showInlineErrors is true.
These properties are boolean values, and can be set on a DynamicForm to control the
behavior form-wide, or set on individual FormItems.
|
java.lang.Boolean |
getShowFocused()
When this item recieves focus, should it be re-styled to indicate it has focus? |
java.lang.Boolean |
getShowFocusedIcons()
If we're showing icons, should we change their image source to the appropriate focused source when this item has focus? Can be overridden on a per icon basis by the formItemIcon showFocused property. |
java.lang.Boolean |
getShowFocusedPickerIcon()
If showPickerIcon is true for this item, should the picker icon show
a focused image when the form item has focus? |
java.lang.Boolean |
getShowHint()
If a hint is defined for this form item, should it be shown? |
java.lang.Boolean |
getShowIcons()
Set to false to suppress writing out any icons for this item. |
java.lang.Boolean |
getShowOverIcons()
If we're showing icons, should we change their image source to the appropriate over source when the user rolls over (or puts focus onto) them? Can be overridden on a per icon basis by the formItemIcon showOver property. |
java.lang.Boolean |
getShowPickerIcon()
Should we show a special 'picker' icon for this form item. |
java.lang.Boolean |
getShowTitle()
Should we show a title cell for this formItem? |
java.lang.Boolean |
getShowValueIconOnly()
If valueIcons is set, this property may be set to show the valueIcon
only and prevent the standard form item element or text from displaying |
java.lang.Boolean |
getStartRow()
Whether this item should always start a new row in the form layout. |
java.lang.Boolean |
getSuppressValueIcon()
If valueIcons is set, this property may be set to prevent the value
icons from showing up next to the form items value |
java.lang.Integer |
getTabIndex()
tabIndex for the form item within the form. |
Alignment |
getTextAlign()
Alignment of the text / content within this form item. |
java.lang.String |
getTextBoxStyle()
Base CSS class name for a form item's text box element. |
TimeFormatter |
getTimeFormatter()
Time-format to apply to date type values within this formItem. |
java.lang.String |
getTitle()
User visible title for this form item. |
Alignment |
getTitleAlign()
Alignment of this item's title in its cell. |
TitleOrientation |
getTitleOrientation()
On which side of this item should the title be placed. |
java.lang.String |
getTitleStyle()
Base CSS class name for a form item's title. |
java.lang.String |
getTooltip()
This text is shown as a tooltip prompt when the cursor hovers over this item. |
int |
getTop()
Top coordinate of this item in pixels. |
java.lang.String |
getType()
The DynamicForm picks a field renderer based on the type of the field (and sometimes other attributes of the field). |
java.lang.Boolean |
getValidateOnChange()
If true, form items will be validated when each item's "change" handler is fired as well as when the entire form is submitted or validated. |
java.lang.Object |
getValue()
|
java.lang.String |
getValueField()
If this form item maps data values to display values by retrieving the displayField values from an
optionDataSource , this property
denotes the the field to use as the underlying data value in records from the
optionDataSource.If unset, assumed to be the name of this form item. |
java.lang.String |
getValueFieldName()
Getter method to retrieve the valueField for this item.
If unset, default behavior will return the name of this field.
|
java.lang.Integer |
getValueIconHeight()
If valueIcons is specified, use this property to specify a height for the
value icon written out. |
int |
getValueIconLeftPadding()
If we're showing a value icon, this attribute governs the amount of space between the icon and the left edge of the form item cell |
int |
getValueIconRightPadding()
If we're showing a value icon, this attribute governs the amount of space between the icon and the label of the form item |
int |
getValueIconSize()
If valueIcons is specified, this property may be used to specify both
the width and height of the icon written out.
Note that valueIconWidth and valueIconHeight take
presidence over this value, if specified. |
java.lang.Integer |
getValueIconWidth()
If valueIcons is specified, use this property to specify a width for
the value icon written out. |
java.lang.Boolean |
getVisible()
Whether this item is currently visible. |
int |
getWidth()
By default, items take up the entire width of their cell |
java.lang.Boolean |
getWrapTitle()
If specified determines whether this items title should wrap. Overrides wrapItemTitles at the DynamicForm level. |
void |
hide()
Hide this form item. This will cause the form to redraw. |
protected boolean |
isCreated()
|
java.lang.Boolean |
isDisabled()
Is this item disabled? |
void |
isDrawn()
Returns true if this item has been written out into the DOM. |
void |
redraw()
Causes the FormItem to be redrawn immediately with the new properties. |
void |
setAccessKey(java.lang.String accessKey)
AccessKey - a keyboard shortcut to trigger a form item's default behavior. Note: Alt+ (or in Moz Firefox 2.0 and above, Shift+Alt+) the specified key will trigger the form item's default behavior. |
void |
setAlign(Alignment align)
Alignment of this item in its cell. |
void |
setAttribute(java.lang.String attribute,
BaseClass[] value)
|
void |
setAttribute(java.lang.String attribute,
boolean value)
|
void |
setAttribute(java.lang.String attribute,
java.lang.Boolean value)
|
void |
setAttribute(java.lang.String attribute,
DataClass value)
|
void |
setAttribute(java.lang.String attribute,
DataClass[] value)
|
void |
setAttribute(java.lang.String attribute,
java.util.Date value)
|
void |
setAttribute(java.lang.String attribute,
double value)
|
void |
setAttribute(java.lang.String attribute,
int value)
|
void |
setAttribute(java.lang.String attribute,
int[] value)
|
void |
setAttribute(java.lang.String attribute,
com.google.gwt.core.client.JavaScriptObject value)
|
void |
setAttribute(java.lang.String attribute,
java.util.Map value)
|
void |
setAttribute(java.lang.String attribute,
java.lang.String value)
|
void |
setAttribute(java.lang.String attribute,
java.lang.String[] value)
|
void |
setAttribute(java.lang.String attribute,
ValueEnum[] value)
|
void |
setCellStyle(java.lang.String cellStyle)
CSS style applied to the form item as a whole, including the text element, any icons, and any hint text for the item. |
void |
setColSpan(int colSpan)
Number of columns that this item spans. |
void |
setColSpan(java.lang.String colSpan)
Number of columns that this item spans. |
void |
setCriteriaField(java.lang.String criteriaField)
When using operator , the name of the DataSource field for the
${isc.DocUtils.linkForRef('object:Criterion')} this FormItem generates. |
void |
setDateFormatter(DateDisplayFormat dateFormatter)
Display format to use for date type values within this formItem. |
void |
setDefaultIconSrc(java.lang.String defaultIconSrc)
Default icon image source. |
void |
setDefaultValue(java.lang.Boolean defaultValue)
Value used when no value is provided for this item. |
void |
setDefaultValue(java.util.Date defaultValue)
Value used when no value is provided for this item. |
void |
setDefaultValue(java.lang.Float defaultValue)
Value used when no value is provided for this item. |
void |
setDefaultValue(java.lang.Integer defaultValue)
Value used when no value is provided for this item. |
void |
setDefaultValue(java.lang.String defaultValue)
Value used when no value is provided for this item. |
void |
setDisabled(java.lang.Boolean disabled)
Whether this item is disabled. |
void |
setDisplayField(java.lang.String displayField)
Specifies an alternative field from which display values should be retrieved for this item. |
void |
setEditorType(FormItem editorType)
Name of the FormItem to use for editing, eg "TextItem" or "SelectItem". |
void |
setEmptyDisplayValue(java.lang.String emptyDisplayValue)
Text to display when this form item has a null or undefined value. |
void |
setEmptyValueIcon(java.lang.String emptyValueIcon)
This property allows the developer to specify an icon to display when this item has no value. |
void |
setEndRow(java.lang.Boolean endRow)
Whether this item should end the row it's in in the form layout |
void |
setErrorFormatter(FormItemErrorFormatter errorFormatter)
Register a custom error formatter for this FormItem. |
void |
setErrorIconHeight(int errorIconHeight)
Height of the error icon, if we're showing icons when validation errors occur. |
void |
setErrorIconSrc(java.lang.String errorIconSrc)
URL of the image to show as an error icon, if we're showing icons when validation errors occur. |
void |
setErrorIconWidth(int errorIconWidth)
Height of the error icon, if we're showing icons when validation errors occur. |
void |
setErrorMessageWidth(int errorMessageWidth)
When showInlineErrors and showErrorText are both true and
errorOrientation is "left" or "right", errorMessageWidth is the amount to reduce
the width of the editor to accomodate the error message and icon. |
void |
setErrorOrientation(FormErrorOrientation errorOrientation)
If showInlineErrors is true, where
should the error icon and text appear relative to the form item itself. |
void |
setFetchMissingValues(java.lang.Boolean fetchMissingValues)
If displayField is specified for this item, should the item
perform a fetch on the optionDataSource to retrieve the display value
for the item when setValue(int) is called with a value for which we
do not already have a mapped display value?
|
void |
setFilterLocally(java.lang.Boolean filterLocally)
If this form item is mapping data values to a display value by fetching them from a dataSource (see optionDataSource , displayField
and fetchMissingValues ), setting this property to true ensures that when
the form item value is set, entire data-set from the dataSource is loaded at once and
used as a valueMap, rather than just loading the display value for the current value.
This avoids the need to perform fetches each time setValue() is called with a new value.
|
void |
setGlobalTabIndex(java.lang.Integer globalTabIndex)
TabIndex for the form item within the page. |
void |
setHeight(int height)
Default height of this item. |
void |
setHeight(java.lang.String height)
|
void |
setHint(java.lang.String hint)
Specifies "hint" string to show next to the form item to indicate something to the user. This string generally appears to the right of the form item. |
void |
setHintStyle(java.lang.String hintStyle)
CSS class for the "hint" string. |
void |
setHoverAlign(Alignment hoverAlign)
Text alignment for text displayed in this item's hover canvas, if shown. |
void |
setHoverDelay(java.lang.Integer hoverDelay)
If specified, this is the number of miliseconds to wait between the user rolling over this form item, and triggering any hover action for it. If not specified this.form.itemHoverDelay will be used instead. |
void |
setHoverHeight(java.lang.Integer hoverHeight)
Option to specify a height for any hover shown for this item. |
void |
setHoverOpacity(java.lang.Integer hoverOpacity)
Opacity for any hover shown for this item |
void |
setHoverStyle(java.lang.String hoverStyle)
Explict CSS Style for any hover shown for this item. |
void |
setHoverVAlign(java.lang.Integer hoverVAlign)
Vertical text alignment for text displayed in this item's hover canvas, if shown. |
void |
setHoverWidth(java.lang.Integer hoverWidth)
Option to specify a width for any hover shown for this item. |
void |
setIconHeight(int iconHeight)
Default height for form item icons |
void |
setIconPrompt(java.lang.String iconPrompt)
Default prompt (and tooltip-text) for icons. |
void |
setIcons(FormItemIcon... icons)
An array of descriptor objects for icons to display in a line after this form item. |
void |
setIconVAlign(VerticalAlignment iconVAlign)
How should icons be aligned vertically for this form item. |
void |
setIconWidth(int iconWidth)
Default width for form item icons |
void |
setImageURLPrefix(java.lang.String imageURLPrefix)
Prefix to apply to the beginning of any valueIcons when determining the
URL for the image.
Will not be applied if the valueIcon URL is absolute. |
void |
setImageURLSuffix(java.lang.String imageURLSuffix)
Suffix to apply to the end of any valueIcons when determining the URL for
the image. |
void |
setInputTransformer(FormItemInputTransformer inputTransformer)
The transformer is called when a FormItem's value is about to change as the result of user interaction. |
void |
setItemHoverFormatter(FormItemHoverFormatter hoverFormatter)
The FormItemHoverFormatter should return the HTML to display in a hover canvas when the user holds the mousepointer over this item. |
void |
setItemTitleHoverFormatter(FormItemHoverFormatter hoverFormatter)
The FormItemHoverFormatter should return the HTML to display in a hover canvas when the user holds the mousepointer over the item's title. |
void |
setLeft(int left)
Left coordinate of this item in pixels. |
void |
setName(java.lang.String name)
Name for this form field. The FormItem's name determines the name of the property it edits within the form. |
void |
setOperator(OperatorId operator)
OperatorId to be used when DynamicForm.getValuesAsCriteria() is called.
|
void |
setOptionDataSource(DataSource dataSource)
|
void |
setPickerIconHeight(java.lang.Integer pickerIconHeight)
If showPickerIcon is true for this item, this property governs the
size of the picker icon. |
void |
setPickerIconSrc(java.lang.String pickerIconSrc)
If showPickerIcon is true for this item, this property governs the
src of the picker icon image to be displayed. |
void |
setPickerIconWidth(java.lang.Integer pickerIconWidth)
If showPickerIcon is true for this item, this property governs the
size of the picker icon. |
void |
setPrompt(java.lang.String prompt)
This text is shown as a tooltip prompt when the cursor hovers over this item. |
void |
setProperty(java.lang.String property,
boolean value)
|
void |
setProperty(java.lang.String property,
double value)
|
void |
setProperty(java.lang.String property,
com.google.gwt.core.client.JavaScriptObject value)
|
void |
setProperty(java.lang.String property,
java.lang.String value)
|
void |
setRedrawOnChange(boolean redrawOnChange)
Setting to true causes the FormItem to be immediately redrawn with the new properties when its value changes |
void |
setRejectInvalidValueOnChange(java.lang.Boolean rejectInvalidValueOnChange)
If validateOnChange is true, and validation fails for this item on change, with no suggested value, should we revert to the previous value, or continue to display the bad value entered by the user. |
void |
setRequired(java.lang.Boolean required)
Whether a non-empty value is required for this field to pass validation. |
void |
setRowSpan(int rowSpan)
Number of rows that this item spans |
void |
setSelectOnFocus(java.lang.Boolean selectOnFocus)
Allows the selectOnFocus behavior to be configured on a
per-FormItem basis. |
void |
setShouldSaveValue(java.lang.Boolean shouldSaveValue)
Should this item's value be saved in the form's values and hence returned from DynamicForm.getValues() ?
|
void |
setShowDisabled(java.lang.Boolean showDisabled)
When this item is disabled, should it be re-styled to indicate its disabled state? |
void |
setShowErrorIcon(java.lang.Boolean showErrorIcon)
showErrorIcons ,
showErrorText , and
showErrorStyle control how validation errors are
displayed next to form items when showInlineErrors is true.
These properties are boolean values, and can be set on a DynamicForm to control the
behavior form-wide, or set on individual FormItems.
|
void |
setShowErrorStyle(java.lang.Boolean showErrorStyle)
showErrorIcons ,
showErrorText , and
showErrorStyle control how validation errors are
displayed next to form items when showInlineErrors is true.
These properties are boolean values, and can be set on a DynamicForm to control the
behavior form-wide, or set on individual FormItems.
|
void |
setShowErrorText(java.lang.Boolean showErrorText)
showErrorIcons ,
showErrorText , and
showErrorStyle control how validation errors are
displayed next to form items when showInlineErrors is true.
These properties are boolean values, and can be set on a DynamicForm to control the
behavior form-wide, or set on individual FormItems.
|
void |
setShowFocused(java.lang.Boolean showFocused)
When this item recieves focus, should it be re-styled to indicate it has focus? |
void |
setShowFocusedIcons(java.lang.Boolean showFocusedIcons)
If we're showing icons, should we change their image source to the appropriate focused source when this item has focus? Can be overridden on a per icon basis by the formItemIcon showFocused property. |
void |
setShowFocusedPickerIcon(java.lang.Boolean showFocusedPickerIcon)
If showPickerIcon is true for this item, should the picker icon show
a focused image when the form item has focus? |
void |
setShowHint(java.lang.Boolean showHint)
If a hint is defined for this form item, should it be shown? |
void |
setShowIcons(java.lang.Boolean showIcons)
Set to false to suppress writing out any icons for this item. |
void |
setShowIfCondition(FormItemIfFunction showIf)
Expression that's evaluated to see if an item should be dynamically hidden. |
void |
setShowOverIcons(java.lang.Boolean showOverIcons)
If we're showing icons, should we change their image source to the appropriate over source when the user rolls over (or puts focus onto) them? Can be overridden on a per icon basis by the formItemIcon showOver property. |
void |
setShowPickerIcon(java.lang.Boolean showPickerIcon)
Should we show a special 'picker' icon for this form item. |
void |
setShowTitle(java.lang.Boolean showTitle)
Should we show a title cell for this formItem? |
void |
setShowValueIconOnly(java.lang.Boolean showValueIconOnly)
If valueIcons is set, this property may be set to show the valueIcon
only and prevent the standard form item element or text from displaying |
void |
setStartRow(java.lang.Boolean startRow)
Whether this item should always start a new row in the form layout. |
void |
setSuppressValueIcon(java.lang.Boolean suppressValueIcon)
If valueIcons is set, this property may be set to prevent the value
icons from showing up next to the form items value |
void |
setTabIndex(java.lang.Integer tabIndex)
tabIndex for the form item within the form. |
void |
setTextAlign(Alignment textAlign)
Alignment of the text / content within this form item. |
void |
setTextBoxStyle(java.lang.String textBoxStyle)
Base CSS class name for a form item's text box element. |
void |
setTimeFormatter(TimeFormatter timeFormatter)
Time-format to apply to date type values within this formItem. |
void |
setTitle(java.lang.String title)
User visible title for this form item. |
void |
setTitleAlign(Alignment titleAlign)
Alignment of this item's title in its cell. |
void |
setTitleOrientation(TitleOrientation titleOrientation)
On which side of this item should the title be placed. |
void |
setTitleStyle(java.lang.String titleStyle)
Base CSS class name for a form item's title. |
void |
setTooltip(java.lang.String tooltip)
This text is shown as a tooltip prompt when the cursor hovers over this item. |
void |
setTop(int top)
Top coordinate of this item in pixels. |
void |
setType(java.lang.String type)
The DynamicForm picks a field renderer based on the type of the field (and sometimes other attributes of the field). |
void |
setValidateOnChange(java.lang.Boolean validateOnChange)
If true, form items will be validated when each item's "change" handler is fired as well as when the entire form is submitted or validated. |
void |
setValidators(Validator... validators)
Validators for this form item. |
void |
setValue(boolean value)
|
void |
setValue(java.util.Date value)
|
void |
setValue(double value)
|
void |
setValue(float value)
|
void |
setValue(int value)
|
void |
setValue(java.lang.String value)
|
void |
setValueField(java.lang.String valueField)
If this form item maps data values to display values by retrieving the displayField values from an
optionDataSource , this property
denotes the the field to use as the underlying data value in records from the
optionDataSource.If unset, assumed to be the name of this form item. |
void |
setValueIconHeight(java.lang.Integer valueIconHeight)
If valueIcons is specified, use this property to specify a height for the
value icon written out. |
void |
setValueIconLeftPadding(int valueIconLeftPadding)
If we're showing a value icon, this attribute governs the amount of space between the icon and the left edge of the form item cell |
void |
setValueIconRightPadding(int valueIconRightPadding)
If we're showing a value icon, this attribute governs the amount of space between the icon and the label of the form item |
void |
setValueIcons(java.util.Map valueIcons)
Set the valueIcons for this item. |
void |
setValueIconSize(int valueIconSize)
If valueIcons is specified, this property may be used to specify both
the width and height of the icon written out.
Note that valueIconWidth and valueIconHeight take
presidence over this value, if specified. |
void |
setValueIconWidth(java.lang.Integer valueIconWidth)
If valueIcons is specified, use this property to specify a width for
the value icon written out. |
void |
setValueMap(java.util.LinkedHashMap valueMap)
Set the valueMap for this item. |
void |
setValueMap(java.lang.String... valueMap)
Set the valueMap for this item. |
void |
setVisible(java.lang.Boolean visible)
Whether this item is currently visible. |
void |
setWidth(int width)
By default, items take up the entire width of their cell |
void |
setWidth(java.lang.String width)
|
void |
setWrapTitle(java.lang.Boolean wrapTitle)
If specified determines whether this items title should wrap. Overrides wrapItemTitles at the DynamicForm level. |
void |
show()
Show this form item. This will cause the form to redraw. |
void |
stopHover()
This method is fired when the user rolls off this item (or the title for this item) and will clear any hover canvas shown by the item. |
void |
updateState()
Update the visual state of a FormItem to reflect any changes in state or any changes in style settings (eg textBoxStyle ). |
Methods inherited from class com.smartgwt.client.core.RefDataClass |
---|
getRef, getRef |
Methods inherited from class com.smartgwt.client.core.DataClass |
---|
doAddHandler, fireEvent, getAttributeAsIntArray, getAttributeAsMap, getAttributeAsObject, getAttributeAsStringArray, getAttributes, getHandlerCount, getJsObj, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute |
Methods inherited from class com.smartgwt.client.core.JsObject |
---|
setJsObj |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
---|
fireEvent |
Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
---|
fireEvent |
Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
---|
fireEvent |
Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
---|
fireEvent |
Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
---|
fireEvent |
Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
---|
fireEvent |
Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
---|
fireEvent |
Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
---|
fireEvent |
Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
---|
fireEvent |
Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
---|
fireEvent |
Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
---|
fireEvent |
Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
---|
fireEvent |
Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
---|
fireEvent |
Constructor Detail |
---|
public FormItem()
public FormItem(com.google.gwt.core.client.JavaScriptObject jsObj)
Method Detail |
---|
public static FormItem getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)
public void setName(java.lang.String name)
name
- name Default value is nullpublic java.lang.String getName()
public void setTitle(java.lang.String title)
title
- title Default value is nullpublic java.lang.String getTitle()
public void setEmptyDisplayValue(java.lang.String emptyDisplayValue)
emptyDisplayValue
- emptyDisplayValue Default value is ""public java.lang.String getEmptyDisplayValue()
public void setValueField(java.lang.String valueField)
displayField
values from an
optionDataSource
, this property
denotes the the field to use as the underlying data value in records from the
optionDataSource.name
of this form item.
valueField
- valueField Default value is nullpublic java.lang.String getValueField()
displayField
values from an
optionDataSource
, this property
denotes the the field to use as the underlying data value in records from the
optionDataSource.name
of this form item.
public void setDisplayField(java.lang.String displayField)
The display field can be either another field value in the same record or a field that
must be retrieved from a related optionDataSource
.
If this item is not databound (optionDataSource
is unset), or bound
to the same dataSource as the form as a whole, this item will call
DynamicForm.getValue(java.lang.String)
the form named after is implemented by picking up the
value of the specified field from the Form's values object.
Otherwise this item will attempt to map its underlying value to a display value
by retrieving a record from the optionDataSource
where the
valueField
matches this item's value, and displaying the
displayField
value from that record.
Note that if optionDataSource
is set and this value is not
set, getDisplayFieldName()
will return the dataSource title field by default.
This essentially enables the specified optionDataSource
to be used as
a server based valueMap.
displayField
- displayField Default value is nullpublic java.lang.String getDisplayField()
The display field can be either another field value in the same record or a field that
must be retrieved from a related optionDataSource
.
If this item is not databound (optionDataSource
is unset), or bound
to the same dataSource as the form as a whole, this item will call
DynamicForm.getValue(java.lang.String)
the form named after is implemented by picking up the
value of the specified field from the Form's values object.
Otherwise this item will attempt to map its underlying value to a display value
by retrieving a record from the optionDataSource
where the
valueField
matches this item's value, and displaying the
displayField
value from that record.
Note that if optionDataSource
is set and this value is not
set, getDisplayFieldName()
will return the dataSource title field by default.
This essentially enables the specified optionDataSource
to be used as
a server based valueMap.
public void setFetchMissingValues(java.lang.Boolean fetchMissingValues)
displayField
is specified for this item, should the item
perform a fetch on the optionDataSource
to retrieve the display value
for the item when setValue(int)
is called with a value for which we
do not already have a mapped display value?
As noted under optionDataSource
, you may also specify a com.smartgwt.client..ValueMap
and it will be consulted first before fetching from the optionDataSource
.
Note : This is an advanced setting
fetchMissingValues
- fetchMissingValues Default value is truepublic java.lang.Boolean getFetchMissingValues()
displayField
is specified for this item, should the item
perform a fetch on the optionDataSource
to retrieve the display value
for the item when setValue(int)
is called with a value for which we
do not already have a mapped display value?
As noted under optionDataSource
, you may also specify a com.smartgwt.client..ValueMap
and it will be consulted first before fetching from the optionDataSource
.
public void setFilterLocally(java.lang.Boolean filterLocally)
optionDataSource
, displayField
and fetchMissingValues
), setting this property to true ensures that when
the form item value is set, entire data-set from the dataSource is loaded at once and
used as a valueMap, rather than just loading the display value for the current value.
This avoids the need to perform fetches each time setValue() is called with a new value.
See also filterLocally
for behavior on form items such as SelectItems
that show pick-lists.
Note : This is an advanced setting
filterLocally
- filterLocally Default value is nullpublic java.lang.Boolean getFilterLocally()
optionDataSource
, displayField
and fetchMissingValues
), setting this property to true ensures that when
the form item value is set, entire data-set from the dataSource is loaded at once and
used as a valueMap, rather than just loading the display value for the current value.
This avoids the need to perform fetches each time setValue() is called with a new value.
See also filterLocally
for behavior on form items such as SelectItems
that show pick-lists.
public void setDateFormatter(DateDisplayFormat dateFormatter)
com.smartgwt.client..Date#setShortDisplayFormat
. Specify any valid DateDisplayFormat
to
change the format used by this item.dateFormatter
and timeFormatter
are specified on an item, Date type values will be formatted as dates using
dateFormatter
.displayFormat
for formatting dates displayed in DateItems.
Note : This is an advanced setting
dateFormatter
- dateFormatter Default value is nullpublic DateDisplayFormat getDateFormatter()
com.smartgwt.client..Date#setShortDisplayFormat
. Specify any valid DateDisplayFormat
to
change the format used by this item.dateFormatter
and timeFormatter
are specified on an item, Date type values will be formatted as dates using
dateFormatter
.displayFormat
for formatting dates displayed in DateItems.
public void setTimeFormatter(TimeFormatter timeFormatter)
displayFormat
for formatting values displayed in TimeItems.
Note : This is an advanced setting
timeFormatter
- timeFormatter Default value is nullpublic TimeFormatter getTimeFormatter()
displayFormat
for formatting values displayed in TimeItems.
public void setEmptyValueIcon(java.lang.String emptyValueIcon)
valueIcons
)
emptyValueIcon
- emptyValueIcon Default value is nullpublic java.lang.String getEmptyValueIcon()
valueIcons
)
public void setShowValueIconOnly(java.lang.Boolean showValueIconOnly)
valueIcons
is set, this property may be set to show the valueIcon
only and prevent the standard form item element or text from displaying
Note : This is an advanced setting
showValueIconOnly
- showValueIconOnly Default value is nullpublic java.lang.Boolean getShowValueIconOnly()
valueIcons
is set, this property may be set to show the valueIcon
only and prevent the standard form item element or text from displaying
public void setSuppressValueIcon(java.lang.Boolean suppressValueIcon)
valueIcons
is set, this property may be set to prevent the value
icons from showing up next to the form items value
Note : This is an advanced setting
suppressValueIcon
- suppressValueIcon Default value is nullpublic java.lang.Boolean getSuppressValueIcon()
valueIcons
is set, this property may be set to prevent the value
icons from showing up next to the form items value
public void setValueIconWidth(java.lang.Integer valueIconWidth)
valueIcons
is specified, use this property to specify a width for
the value icon written out.
valueIconWidth
- valueIconWidth Default value is nullpublic java.lang.Integer getValueIconWidth()
valueIcons
is specified, use this property to specify a width for
the value icon written out.
public void setValueIconHeight(java.lang.Integer valueIconHeight)
valueIcons
is specified, use this property to specify a height for the
value icon written out.
valueIconHeight
- valueIconHeight Default value is nullpublic java.lang.Integer getValueIconHeight()
valueIcons
is specified, use this property to specify a height for the
value icon written out.
public void setValueIconSize(int valueIconSize)
valueIcons
is specified, this property may be used to specify both
the width and height of the icon written out.
Note that valueIconWidth
and valueIconHeight
take
presidence over this value, if specified.
valueIconSize
- valueIconSize Default value is 16public int getValueIconSize()
valueIcons
is specified, this property may be used to specify both
the width and height of the icon written out.
Note that valueIconWidth
and valueIconHeight
take
presidence over this value, if specified.
public void setValueIconLeftPadding(int valueIconLeftPadding)
valueIconLeftPadding
- valueIconLeftPadding Default value is 0public int getValueIconLeftPadding()
public void setValueIconRightPadding(int valueIconRightPadding)
valueIconRightPadding
- valueIconRightPadding Default value is 3public int getValueIconRightPadding()
public void setImageURLPrefix(java.lang.String imageURLPrefix)
valueIcons
when determining the
URL for the image.
Will not be applied if the valueIcon
URL is absolute.
Note : This is an advanced setting
imageURLPrefix
- imageURLPrefix Default value is nullpublic java.lang.String getImageURLPrefix()
valueIcons
when determining the
URL for the image.
Will not be applied if the valueIcon
URL is absolute.
public void setImageURLSuffix(java.lang.String imageURLSuffix)
valueIcons
when determining the URL for
the image. A common usage would be to specify a suffix of ".gif"
in which
case the valueIcons
property would map values to the names of images without
the ".gif"
extension.
Note : This is an advanced setting
imageURLSuffix
- imageURLSuffix Default value is nullpublic java.lang.String getImageURLSuffix()
valueIcons
when determining the URL for
the image. A common usage would be to specify a suffix of ".gif"
in which
case the valueIcons
property would map values to the names of images without
the ".gif"
extension.
public void setShowPickerIcon(java.lang.Boolean showPickerIcon)
icon
for this form item. Picker
icons are customizeable via pickerIconProperties
. By default they will
be rendered inside the Form Item's "control box" area, and will call
com.smartgwt.client.widgets.form.fields.FormItem#showPicker
when clicked.
showPickerIcon
- showPickerIcon Default value is falsepublic java.lang.Boolean getShowPickerIcon()
icon
for this form item. Picker
icons are customizeable via pickerIconProperties
. By default they will
be rendered inside the Form Item's "control box" area, and will call
com.smartgwt.client.widgets.form.fields.FormItem#showPicker
when clicked.
public void setShowFocusedPickerIcon(java.lang.Boolean showFocusedPickerIcon)
showPickerIcon
is true for this item, should the picker icon show
a focused image when the form item has focus?
showFocusedPickerIcon
- showFocusedPickerIcon Default value is falsepublic java.lang.Boolean getShowFocusedPickerIcon()
showPickerIcon
is true for this item, should the picker icon show
a focused image when the form item has focus?
public void setPickerIconSrc(java.lang.String pickerIconSrc)
showPickerIcon
is true for this item, this property governs the
src of the picker icon image to be displayed.
Note : This is an advanced setting
pickerIconSrc
- pickerIconSrc Default value is ""public java.lang.String getPickerIconSrc()
showPickerIcon
is true for this item, this property governs the
src of the picker icon image to be displayed.
public void setPickerIconWidth(java.lang.Integer pickerIconWidth)
showPickerIcon
is true for this item, this property governs the
size of the picker icon. If unset picker icon will be sized as a square to fit in the
avaliable height for the icon.
Note : This is an advanced setting
pickerIconWidth
- pickerIconWidth Default value is nullpublic java.lang.Integer getPickerIconWidth()
showPickerIcon
is true for this item, this property governs the
size of the picker icon. If unset picker icon will be sized as a square to fit in the
avaliable height for the icon.
public void setPickerIconHeight(java.lang.Integer pickerIconHeight)
showPickerIcon
is true for this item, this property governs the
size of the picker icon. If unset picker icon will be sized as a square to fit in the
avaliable height for the icon.
Note : This is an advanced setting
pickerIconHeight
- pickerIconHeight Default value is nullpublic java.lang.Integer getPickerIconHeight()
showPickerIcon
is true for this item, this property governs the
size of the picker icon. If unset picker icon will be sized as a square to fit in the
avaliable height for the icon.
public void setRequired(java.lang.Boolean required)
If the user does not fill in the required field, the com.smartgwt.client.widgets.form.validator.Validator#requiredField
error message will be shown.
Note: if specified on a FormItem, required
is only enforced on the
client. required
should generally be specified on a
DataSourceField
.
required
- required Default value is nullpublic java.lang.Boolean getRequired()
If the user does not fill in the required field, the com.smartgwt.client.widgets.form.validator.Validator#requiredField
error message will be shown.
Note: if specified on a FormItem, required
is only enforced on the
client. required
should generally be specified on a
DataSourceField
.
public void setVisible(java.lang.Boolean visible)
visible
can only be set on creation. After creation, use
show()
and hide()
to manipulate visibility.
visible
- visible Default value is truepublic java.lang.Boolean getVisible()
visible
can only be set on creation. After creation, use
show()
and hide()
to manipulate visibility.
public void setDisabled(java.lang.Boolean disabled)
setDisabled()
method. Note that if the widget containing this formItem is disabled, the formItem will
behave in a disabled manner regardless of the setting of the item.disabled property.
Note that not all items can be disabled, and not all browsers show an obvious disabled style for native form elements. Set this item to be enabled or disabled at runtime.
disabled
- true if this item should be disabled. Default value is falsepublic java.lang.Boolean getDisabled()
setDisabled()
method. Note that if the widget containing this formItem is disabled, the formItem will
behave in a disabled manner regardless of the setting of the item.disabled property.
Note that not all items can be disabled, and not all browsers show an obvious disabled style for native form elements.
public void setAccessKey(java.lang.String accessKey)
accessKey
- accessKey Default value is nullpublic java.lang.String getAccessKey()
public void setTabIndex(java.lang.Integer tabIndex)
To specify the tabindex of an item within the page as a whole (not just this form), use globalTabIndex instead.
tabIndex
- tabIndex Default value is nullpublic java.lang.Integer getTabIndex()
To specify the tabindex of an item within the page as a whole (not just this form), use globalTabIndex instead.
public void setGlobalTabIndex(java.lang.Integer globalTabIndex)
tabIndex
.
Note : This is an advanced setting
globalTabIndex
- globalTabIndex Default value is nullpublic java.lang.Integer getGlobalTabIndex()
tabIndex
.
public void setSelectOnFocus(java.lang.Boolean selectOnFocus)
selectOnFocus
behavior to be configured on a
per-FormItem basis. Normally all items in a form default to the value of
selectOnFocus
.
selectOnFocus
- selectOnFocus Default value is nullpublic java.lang.Boolean getSelectOnFocus()
selectOnFocus
behavior to be configured on a
per-FormItem basis. Normally all items in a form default to the value of
selectOnFocus
.
public void setShowTitle(java.lang.Boolean showTitle)
Note: the default value of this attribute is overridden by some subclasses.
showTitle
- showTitle Default value is truepublic java.lang.Boolean getShowTitle()
Note: the default value of this attribute is overridden by some subclasses.
public void setTitleOrientation(TitleOrientation titleOrientation)
TitleOrientation
lists valid options.
Note that titles on the left or right take up a cell in tabular
'form layouts'
, but titles on top do not.
titleOrientation
- titleOrientation Default value is Canvas.LEFTpublic TitleOrientation getTitleOrientation()
TitleOrientation
lists valid options.
Note that titles on the left or right take up a cell in tabular
'form layouts'
, but titles on top do not.
public void setTitleAlign(Alignment titleAlign)
If null, dynamically set according to text direction.
titleAlign
- titleAlign Default value is nullpublic Alignment getTitleAlign()
If null, dynamically set according to text direction.
public void setWrapTitle(java.lang.Boolean wrapTitle)
wrapItemTitles
at the DynamicForm level.
wrapTitle
- wrapTitle Default value is nullpublic java.lang.Boolean getWrapTitle()
wrapItemTitles
at the DynamicForm level.
public void setValidateOnChange(java.lang.Boolean validateOnChange)
Note that this property can also be set at the form, level; If true at either level the valiator will be fired on change - displaying errors and rejecting the change on validation failure.
validateOnChange
- validateOnChange Default value is falsepublic java.lang.Boolean getValidateOnChange()
Note that this property can also be set at the form, level; If true at either level the valiator will be fired on change - displaying errors and rejecting the change on validation failure.
public void setRejectInvalidValueOnChange(java.lang.Boolean rejectInvalidValueOnChange)
Note : This is an advanced setting
rejectInvalidValueOnChange
- rejectInvalidValueOnChange Default value is falsepublic java.lang.Boolean getRejectInvalidValueOnChange()
public void setWidth(int width)
width
- width Default value is "*"public int getWidth()
public void setHeight(int height)
height
- height Default value is 20public int getHeight()
public void setRowSpan(int rowSpan)
rowSpan
- rowSpan Default value is 1public int getRowSpan()
public void setStartRow(java.lang.Boolean startRow)
startRow
- startRow Default value is falsepublic java.lang.Boolean getStartRow()
public void setEndRow(java.lang.Boolean endRow)
endRow
- endRow Default value is falsepublic java.lang.Boolean getEndRow()
public void setAlign(Alignment align)
textAlign
(typically only applies to items
showing a "textBox", such as TextItem
or SelectItem
).
align
- align Default value is Canvas.LEFTpublic Alignment getAlign()
textAlign
(typically only applies to items
showing a "textBox", such as TextItem
or SelectItem
).
public void setTextAlign(Alignment textAlign)
align
may
be used to control alignment of the entire form item within its cell. May not apply to all
form item types.
textAlign
- textAlign Default value is Canvas.LEFTpublic Alignment getTextAlign()
align
may
be used to control alignment of the entire form item within its cell. May not apply to all
form item types.
public void setLeft(int left)
itemLayout:"absolute"
.
For a form with itemLayout
:"absolute" only, set the left
coordinate of this form item.
Causes the form to redraw.
Note : This is an advanced setting
left
- left Default value is 0public int getLeft()
itemLayout:"absolute"
.
public void setTop(int top)
itemLayout:"absolute"
.
For a form with itemLayout
:"absolute" only, set the top
coordinate of this form item.
Causes the form to redraw.
Note : This is an advanced setting
top
- top Default value is 0public int getTop()
itemLayout:"absolute"
.
public void setDefaultIconSrc(java.lang.String defaultIconSrc)
icon.src
property.icon.showOver
is true, this url will be modified by adding "_Over" to get
an over state image for the icon.
Note : This is an advanced setting
defaultIconSrc
- defaultIconSrc Default value is "[SKIN]/DynamicForm/default_formItem_icon.gif"public java.lang.String getDefaultIconSrc()
icon.src
property.icon.showOver
is true, this url will be modified by adding "_Over" to get
an over state image for the icon.
public void setShowOverIcons(java.lang.Boolean showOverIcons)
showOver
property.
Note : This is an advanced setting
showOverIcons
- showOverIcons Default value is nullpublic java.lang.Boolean getShowOverIcons()
showOver
property.
public void setShowFocusedIcons(java.lang.Boolean showFocusedIcons)
showFocused
property.
Note : This is an advanced setting
showFocusedIcons
- showFocusedIcons Default value is nullpublic java.lang.Boolean getShowFocusedIcons()
showFocused
property.
public void setIconVAlign(VerticalAlignment iconVAlign)
Note : This is an advanced setting
iconVAlign
- iconVAlign Default value is "bottom"public VerticalAlignment getIconVAlign()
public void setIconHeight(int iconHeight)
Note : This is an advanced setting
iconHeight
- iconHeight Default value is 20public int getIconHeight()
public void setIconWidth(int iconWidth)
Note : This is an advanced setting
iconWidth
- iconWidth Default value is 20public int getIconWidth()
public void setPrompt(java.lang.String prompt)
prompt
- prompt Default value is nullpublic java.lang.String getPrompt()
public void setIconPrompt(java.lang.String iconPrompt)
Note : This is an advanced setting
iconPrompt
- iconPrompt Default value is ""public java.lang.String getIconPrompt()
public void setShowIcons(java.lang.Boolean showIcons)
icons
for this item.
Note : This is an advanced setting
showIcons
- showIcons Default value is truepublic java.lang.Boolean getShowIcons()
icons
for this item.
public void setErrorIconHeight(int errorIconHeight)
errorIconHeight
- errorIconHeight Default value is 16public int getErrorIconHeight()
public void setErrorIconWidth(int errorIconWidth)
errorIconWidth
- errorIconWidth Default value is 16public int getErrorIconWidth()
public void setErrorIconSrc(java.lang.String errorIconSrc)
errorIconSrc
- errorIconSrc Default value is "[SKIN]/DynamicForm/validation_error_icon.png"public java.lang.String getErrorIconSrc()
public void setShowErrorIcon(java.lang.Boolean showErrorIcon)
showErrorIcons
,
showErrorText
, and
showErrorStyle
control how validation errors are
displayed next to form items when showInlineErrors
is true.
These properties are boolean values, 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
com.smartgwt.client.widgets.form.fields.FormItem#getErrorHTML
.
The default implemenation of that method respects showErrorIcons
and
showErrorText
as follows:
showErrorIcons
, or showErrorIcon
at the FormItem level controls
whether an error icon should appear next to fields which have validation errors. The icon's
appearance is governed by errorIconSrc
, errorIconWidth
and
errorIconHeight
showErrorText
determines whether the text of the validation error should be
displayed next to fields which have validation errors. The attribute
showTitlesWithErrorMessages
may be set to prefix error messages with the
form item's title + ":"
(may be desired if the item has
showTitle
set to false).
errorOrientation
controls where the error HTML should appear relative
to form items. Therefore the combination of showErrorText
:false
and
errorOrientation
:"left"
creates a compact validation error display
consisting of just an icon, to the left of the item with the error message
available via a hover (similar appearance to ListGrid validation error display).
In addition to this, showErrorStyle
determines whether fields with validation
errors should have special styling applied to them. See com.smartgwt.client..FormItemBaseStyle
for a
discussion for how error styling is calculated.
showErrorIcon
- showErrorIcon Default value is nullpublic java.lang.Boolean getShowErrorIcon()
showErrorIcons
,
showErrorText
, and
showErrorStyle
control how validation errors are
displayed next to form items when showInlineErrors
is true.
These properties are boolean values, 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
com.smartgwt.client.widgets.form.fields.FormItem#getErrorHTML
.
The default implemenation of that method respects showErrorIcons
and
showErrorText
as follows:
showErrorIcons
, or showErrorIcon
at the FormItem level controls
whether an error icon should appear next to fields which have validation errors. The icon's
appearance is governed by errorIconSrc
, errorIconWidth
and
errorIconHeight
showErrorText
determines whether the text of the validation error should be
displayed next to fields which have validation errors. The attribute
showTitlesWithErrorMessages
may be set to prefix error messages with the
form item's title + ":"
(may be desired if the item has
showTitle
set to false).
errorOrientation
controls where the error HTML should appear relative
to form items. Therefore the combination of showErrorText
:false
and
errorOrientation
:"left"
creates a compact validation error display
consisting of just an icon, to the left of the item with the error message
available via a hover (similar appearance to ListGrid validation error display).
In addition to this, showErrorStyle
determines whether fields with validation
errors should have special styling applied to them. See com.smartgwt.client..FormItemBaseStyle
for a
discussion for how error styling is calculated.
public void setShowErrorText(java.lang.Boolean showErrorText)
showErrorIcons
,
showErrorText
, and
showErrorStyle
control how validation errors are
displayed next to form items when showInlineErrors
is true.
These properties are boolean values, 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
com.smartgwt.client.widgets.form.fields.FormItem#getErrorHTML
.
The default implemenation of that method respects showErrorIcons
and
showErrorText
as follows:
showErrorIcons
, or showErrorIcon
at the FormItem level controls
whether an error icon should appear next to fields which have validation errors. The icon's
appearance is governed by errorIconSrc
, errorIconWidth
and
errorIconHeight
showErrorText
determines whether the text of the validation error should be
displayed next to fields which have validation errors. The attribute
showTitlesWithErrorMessages
may be set to prefix error messages with the
form item's title + ":"
(may be desired if the item has
showTitle
set to false).
errorOrientation
controls where the error HTML should appear relative
to form items. Therefore the combination of showErrorText
:false
and
errorOrientation
:"left"
creates a compact validation error display
consisting of just an icon, to the left of the item with the error message
available via a hover (similar appearance to ListGrid validation error display).
In addition to this, showErrorStyle
determines whether fields with validation
errors should have special styling applied to them. See com.smartgwt.client..FormItemBaseStyle
for a
discussion for how error styling is calculated.
showErrorText
- showErrorText Default value is nullpublic java.lang.Boolean getShowErrorText()
showErrorIcons
,
showErrorText
, and
showErrorStyle
control how validation errors are
displayed next to form items when showInlineErrors
is true.
These properties are boolean values, 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
com.smartgwt.client.widgets.form.fields.FormItem#getErrorHTML
.
The default implemenation of that method respects showErrorIcons
and
showErrorText
as follows:
showErrorIcons
, or showErrorIcon
at the FormItem level controls
whether an error icon should appear next to fields which have validation errors. The icon's
appearance is governed by errorIconSrc
, errorIconWidth
and
errorIconHeight
showErrorText
determines whether the text of the validation error should be
displayed next to fields which have validation errors. The attribute
showTitlesWithErrorMessages
may be set to prefix error messages with the
form item's title + ":"
(may be desired if the item has
showTitle
set to false).
errorOrientation
controls where the error HTML should appear relative
to form items. Therefore the combination of showErrorText
:false
and
errorOrientation
:"left"
creates a compact validation error display
consisting of just an icon, to the left of the item with the error message
available via a hover (similar appearance to ListGrid validation error display).
In addition to this, showErrorStyle
determines whether fields with validation
errors should have special styling applied to them. See com.smartgwt.client..FormItemBaseStyle
for a
discussion for how error styling is calculated.
public void setShowErrorStyle(java.lang.Boolean showErrorStyle)
showErrorIcons
,
showErrorText
, and
showErrorStyle
control how validation errors are
displayed next to form items when showInlineErrors
is true.
These properties are boolean values, 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
com.smartgwt.client.widgets.form.fields.FormItem#getErrorHTML
.
The default implemenation of that method respects showErrorIcons
and
showErrorText
as follows:
showErrorIcons
, or showErrorIcon
at the FormItem level controls
whether an error icon should appear next to fields which have validation errors. The icon's
appearance is governed by errorIconSrc
, errorIconWidth
and
errorIconHeight
showErrorText
determines whether the text of the validation error should be
displayed next to fields which have validation errors. The attribute
showTitlesWithErrorMessages
may be set to prefix error messages with the
form item's title + ":"
(may be desired if the item has
showTitle
set to false).
errorOrientation
controls where the error HTML should appear relative
to form items. Therefore the combination of showErrorText
:false
and
errorOrientation
:"left"
creates a compact validation error display
consisting of just an icon, to the left of the item with the error message
available via a hover (similar appearance to ListGrid validation error display).
In addition to this, showErrorStyle
determines whether fields with validation
errors should have special styling applied to them. See com.smartgwt.client..FormItemBaseStyle
for a
discussion for how error styling is calculated.
showErrorStyle
- showErrorStyle Default value is nullpublic java.lang.Boolean getShowErrorStyle()
showErrorIcons
,
showErrorText
, and
showErrorStyle
control how validation errors are
displayed next to form items when showInlineErrors
is true.
These properties are boolean values, 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
com.smartgwt.client.widgets.form.fields.FormItem#getErrorHTML
.
The default implemenation of that method respects showErrorIcons
and
showErrorText
as follows:
showErrorIcons
, or showErrorIcon
at the FormItem level controls
whether an error icon should appear next to fields which have validation errors. The icon's
appearance is governed by errorIconSrc
, errorIconWidth
and
errorIconHeight
showErrorText
determines whether the text of the validation error should be
displayed next to fields which have validation errors. The attribute
showTitlesWithErrorMessages
may be set to prefix error messages with the
form item's title + ":"
(may be desired if the item has
showTitle
set to false).
errorOrientation
controls where the error HTML should appear relative
to form items. Therefore the combination of showErrorText
:false
and
errorOrientation
:"left"
creates a compact validation error display
consisting of just an icon, to the left of the item with the error message
available via a hover (similar appearance to ListGrid validation error display).
In addition to this, showErrorStyle
determines whether fields with validation
errors should have special styling applied to them. See com.smartgwt.client..FormItemBaseStyle
for a
discussion for how error styling is calculated.
public void setHint(java.lang.String hint)
hint
- new hint for the item. Default value is nullpublic java.lang.String getHint()
public void setShowHint(java.lang.Boolean showHint)
Note : This is an advanced setting
showHint
- showHint Default value is truepublic java.lang.Boolean getShowHint()
public void setShowFocused(java.lang.Boolean showFocused)
Note : This is an advanced setting
showFocused
- showFocused Default value is falsepublic java.lang.Boolean getShowFocused()
public void setShowDisabled(java.lang.Boolean showDisabled)
Note : This is an advanced setting
showDisabled
- showDisabled Default value is truepublic java.lang.Boolean getShowDisabled()
public void setCellStyle(java.lang.String cellStyle)
NOTE: See the CompoundFormItem_skinning discussion for special skinning considerations.
cellStyle
- cellStyle Default value is "formCell"public java.lang.String getCellStyle()
NOTE: See the CompoundFormItem_skinning discussion for special skinning considerations.
public void setHintStyle(java.lang.String hintStyle)
hintStyle
- new style for hint text. Default value is "formHint"public java.lang.String getHintStyle()
public void setTitleStyle(java.lang.String titleStyle)
titleStyle
- titleStyle Default value is "formTitle"public java.lang.String getTitleStyle()
public void setTextBoxStyle(java.lang.String textBoxStyle)
NOTE: See the CompoundFormItem_skinning discussion for special skinning considerations.
textBoxStyle
- textBoxStyle Default value is nullpublic java.lang.String getTextBoxStyle()
NOTE: See the CompoundFormItem_skinning discussion for special skinning considerations.
public void setHoverDelay(java.lang.Integer hoverDelay)
this.form.itemHoverDelay
will be used instead.
Note : This is an advanced setting
hoverDelay
- hoverDelay Default value is nullpublic java.lang.Integer getHoverDelay()
this.form.itemHoverDelay
will be used instead.
public void setHoverWidth(java.lang.Integer hoverWidth)
hoverWidth
- hoverWidth Default value is nullpublic java.lang.Integer getHoverWidth()
public void setHoverHeight(java.lang.Integer hoverHeight)
hoverHeight
- hoverHeight Default value is nullpublic java.lang.Integer getHoverHeight()
public void setHoverAlign(Alignment hoverAlign)
hoverAlign
- hoverAlign Default value is nullpublic Alignment getHoverAlign()
public void setHoverVAlign(java.lang.Integer hoverVAlign)
hoverVAlign
- hoverVAlign Default value is nullpublic java.lang.Integer getHoverVAlign()
public void setHoverStyle(java.lang.String hoverStyle)
hoverStyle
- hoverStyle Default value is nullpublic java.lang.String getHoverStyle()
public void setHoverOpacity(java.lang.Integer hoverOpacity)
hoverOpacity
- hoverOpacity Default value is nullpublic java.lang.Integer getHoverOpacity()
public void setOperator(OperatorId operator)
OperatorId
to be used when DynamicForm.getValuesAsCriteria()
is called.
item.operator
can be used to create a form that offers search functions such
as date range filtering, without the more advanced user interface of the FilterBuilder
.
When item.operator
is set for any FormItem in a form,
form.getValuesAsCriteria()
will return an ${isc.DocUtils.linkForRef('object:AdvancedCriteria')} object
instead of a normal Criteria
object. Each FormItem will produce one
${isc.DocUtils.linkForRef('object:Criterion')} affecting the DataSource field specified by criteriaField
.
The criteria produced by the FormItems will be grouped under the logical operator
provided by operator
.
if operator
is set for some fields but not others, the default operator is
"equals" for fields with a valueMap or an optionDataSource, and for fields of type "enum"
(or of a type that inherits from "enum"). The default operator for all other fields is
"iContains" (case-insensitive match)
Note: Advanced criteria will only be created for items in a Databound form. If this
item is part of a form with no dataSource
, the
operator
attribute will have no effect.
operator
- operator Default value is nullpublic OperatorId getOperator()
OperatorId
to be used when DynamicForm.getValuesAsCriteria()
is called.
item.operator
can be used to create a form that offers search functions such
as date range filtering, without the more advanced user interface of the FilterBuilder
.
When item.operator
is set for any FormItem in a form,
form.getValuesAsCriteria()
will return an ${isc.DocUtils.linkForRef('object:AdvancedCriteria')} object
instead of a normal Criteria
object. Each FormItem will produce one
${isc.DocUtils.linkForRef('object:Criterion')} affecting the DataSource field specified by criteriaField
.
The criteria produced by the FormItems will be grouped under the logical operator
provided by operator
.
if operator
is set for some fields but not others, the default operator is
"equals" for fields with a valueMap or an optionDataSource, and for fields of type "enum"
(or of a type that inherits from "enum"). The default operator for all other fields is
"iContains" (case-insensitive match)
Note: Advanced criteria will only be created for items in a Databound form. If this
item is part of a form with no dataSource
, the
operator
attribute will have no effect.
public void setCriteriaField(java.lang.String criteriaField)
operator
, the name of the DataSource field for the
${isc.DocUtils.linkForRef('object:Criterion')} this FormItem generates. If not specified, defaults to
name
.
Generally, because criteriaField
defaults to item.name
, you don't
need to specify it. However, if more than one FormItem specifies criteria for the same
DataSource field, they will need unique values for name
but should set
criteriaField
to the name of DataSource field they both target.
For example, if two DateItems are used to provide a min and max date for a single field called
"joinDate", set criteriaField
to "joinDate" on both fields but give the fields
distinct names (eg "minDate" and "maxDate") and use those names for any programmatic access,
such as DynamicForm.setValue(java.lang.String, java.lang.String)
.
criteriaField
- criteriaField Default value is nullpublic java.lang.String getCriteriaField()
operator
, the name of the DataSource field for the
${isc.DocUtils.linkForRef('object:Criterion')} this FormItem generates. If not specified, defaults to
name
.
Generally, because criteriaField
defaults to item.name
, you don't
need to specify it. However, if more than one FormItem specifies criteria for the same
DataSource field, they will need unique values for name
but should set
criteriaField
to the name of DataSource field they both target.
For example, if two DateItems are used to provide a min and max date for a single field called
"joinDate", set criteriaField
to "joinDate" on both fields but give the fields
distinct names (eg "minDate" and "maxDate") and use those names for any programmatic access,
such as DynamicForm.setValue(java.lang.String, java.lang.String)
.
public void setErrorMessageWidth(int errorMessageWidth)
showInlineErrors
and showErrorText
are both true and
errorOrientation
is "left" or "right", errorMessageWidth is the amount to reduce
the width of the editor to accomodate the error message and icon.
errorMessageWidth
- errorMessageWidth Default value is 80public int getErrorMessageWidth()
showInlineErrors
and showErrorText
are both true and
errorOrientation
is "left" or "right", errorMessageWidth is the amount to reduce
the width of the editor to accomodate the error message and icon.
public void setShouldSaveValue(java.lang.Boolean shouldSaveValue)
DynamicForm.getValues()
?
shouldSaveValue:false
is used to mark formItems which do not correspond to
the underlying data model and should not save a value into the form's
values
. Example includes visual separators, password re-type fields,
or checkboxes used to show/hide other form items.
A shouldSaveValue:false
item should be given a value either via
defaultValue
or by calling can use
DynamicForm.setValue(java.lang.String, java.lang.String)
or
setValue(int)
. Providing a value via
values
or DynamicForm.setValues(java.util.Map)
will automatically switch the item to shouldSaveValue:true
.
Note that
shouldSaveValue
- shouldSaveValue Default value is truepublic java.lang.Boolean getShouldSaveValue()
DynamicForm.getValues()
?
shouldSaveValue:false
is used to mark formItems which do not correspond to
the underlying data model and should not save a value into the form's
values
. Example includes visual separators, password re-type fields,
or checkboxes used to show/hide other form items.
A shouldSaveValue:false
item should be given a value either via
defaultValue
or by calling can use
DynamicForm.setValue(java.lang.String, java.lang.String)
or
setValue(int)
. Providing a value via
values
or DynamicForm.setValues(java.util.Map)
will automatically switch the item to shouldSaveValue:true
.
Note that
public java.lang.String getFieldName()
public void updateState()
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.
public void isDrawn()
public void show()
public void hide()
public java.lang.String getValueFieldName()
valueField
for this item.
If unset, default behavior will return the name
of this field.
optionDataSource
public java.lang.String getDisplayFieldName()
displayField
for this form item.
If unset, and optionDataSource
is explicitly specified, this method
will return the title field for the optionDataSource
public void getCriterion()
DynamicForm.getValuesAsCriteria()
.
This API is provided to allow you to specify a more complex criterion than the "field-operator-value" criterions that are built-in. Note that the built-in behavior is generally quite flexible and powerful enough for most requirements. An example of a case where you might want to override this method is if you wanted to implement a date range selection (ie, date > x AND date < y) on a form that was combining its other criteria fields with an OR.
public void stopHover()
public HandlerRegistration addItemHoverHandler(ItemHoverHandler handler)
Optional stringMethod to fire when the user hovers over this item.
Return false to suppress default behavior of showing a hover canvas containing the
HTML returned by formItem.itemHoverHTML()
/
form.itemHoverHTML()
.
addItemHoverHandler
in interface HasItemHoverHandlers
handler
- the itemHover handler
HandlerRegistration
used to remove this handlerpublic HandlerRegistration addTitleHoverHandler(TitleHoverHandler handler)
Optional stringMethod to fire when the user hovers over this item's title.
Return false to suppress default behavior of showing a hover canvas containing the
HTML returned by formItem.titleHoverHTML()
/
form.titleHoverHTML()
.
addTitleHoverHandler
in interface HasTitleHoverHandlers
handler
- the titleHover handler
HandlerRegistration
used to remove this handlerpublic java.lang.Boolean isDisabled()
public void enable()
public void disable()
public void focusInItem()
public void blurItem()
public HandlerRegistration addFocusHandler(FocusHandler handler)
Called when this FormItem receives focus.
addFocusHandler
in interface HasFocusHandlers
handler
- the focus handler
HandlerRegistration
used to remove this handlerpublic HandlerRegistration addBlurHandler(BlurHandler handler)
Called when this FormItem loses focus.
addBlurHandler
in interface HasBlurHandlers
handler
- the blur handler
HandlerRegistration
used to remove this handlerpublic HandlerRegistration addClickHandler(ClickHandler handler)
Called when this FormItem is clicked on.
Note: click()
is available on StaticTextItem, BlurbItems, ButtonItem, and
derivatives. Other form items (such as HiddenItem) do not support click()
.
addClickHandler
in interface HasClickHandlers
handler
- the click handler
HandlerRegistration
used to remove this handlerpublic HandlerRegistration addDoubleClickHandler(DoubleClickHandler handler)
Called when this FormItem is double-clicked.
addDoubleClickHandler
in interface HasDoubleClickHandlers
handler
- the doubleClick handler
HandlerRegistration
used to remove this handlerpublic HandlerRegistration addIconClickHandler(IconClickHandler handler)
StringMethod.
Default action to fire when the user clicks on a form item icon. May be overridden
by setting click
on the form item icon directly.
addIconClickHandler
in interface HasIconClickHandlers
handler
- the iconClick handler
HandlerRegistration
used to remove this handlerpublic HandlerRegistration addIconKeyPressHandler(IconKeyPressHandler handler)
StringMethod.
Default action to fire when an icon has keyboard focus and the user types a key.
May be overridden by setting keyPress
on the form item icon directly.
addIconKeyPressHandler
in interface HasIconKeyPressHandlers
handler
- the iconKeyPress handler
HandlerRegistration
used to remove this handlerpublic HandlerRegistration addChangeHandler(ChangeHandler 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
setInputTransformer(com.smartgwt.client.widgets.form.FormItemInputTransformer)
rather than using a combination of
change() and setValue() to accomplish the same thing. Returning false from
change
is intended for rejecting input entirely, such as typing invalid
characters.
Note that if you ask the form for the current value in this handler, you will get the old value because the change has not yet been commited. The new value is available as a parameter to this method.
addChangeHandler
in interface HasChangeHandlers
handler
- the change handler
HandlerRegistration
used to remove this handlerpublic HandlerRegistration addChangedHandler(ChangedHandler 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.
addChangedHandler
in interface HasChangedHandlers
handler
- the changed handler
HandlerRegistration
used to remove this handlerpublic HandlerRegistration addKeyPressHandler(KeyPressHandler handler)
StringMethod fired when the user presses a key while focused in this form item.
addKeyPressHandler
in interface HasKeyPressHandlers
handler
- the keyPress handler
HandlerRegistration
used to remove this handlerpublic HandlerRegistration addKeyDownHandler(KeyDownHandler handler)
StringMethod fired in response to a keydown while focused in this form item.
addKeyDownHandler
in interface HasKeyDownHandlers
handler
- the keyDown handler
HandlerRegistration
used to remove this handlerpublic HandlerRegistration addKeyUpHandler(KeyUpHandler handler)
StringMethod fired in response to a keyup while focused in this form item.
addKeyUpHandler
in interface HasKeyUpHandlers
handler
- the keyUp handler
HandlerRegistration
used to remove this handlerpublic void setAttribute(java.lang.String attribute, java.lang.String value)
setAttribute
in class DataClass
public void setAttribute(java.lang.String attribute, java.lang.Boolean value)
setAttribute
in class DataClass
public void setAttribute(java.lang.String attribute, java.util.Map value)
setAttribute
in class DataClass
public void setAttribute(java.lang.String attribute, int[] value)
setAttribute
in class DataClass
public void setAttribute(java.lang.String attribute, BaseClass[] value)
setAttribute
in class DataClass
public void setAttribute(java.lang.String attribute, DataClass[] value)
setAttribute
in class DataClass
public void setAttribute(java.lang.String attribute, double value)
setAttribute
in class DataClass
public void setAttribute(java.lang.String attribute, int value)
setAttribute
in class DataClass
public void setAttribute(java.lang.String attribute, java.util.Date value)
setAttribute
in class DataClass
public void setAttribute(java.lang.String attribute, ValueEnum[] value)
setAttribute
in class DataClass
public void setAttribute(java.lang.String attribute, DataClass value)
setAttribute
in class DataClass
public void setAttribute(java.lang.String attribute, com.google.gwt.core.client.JavaScriptObject value)
setAttribute
in class DataClass
public void setAttribute(java.lang.String attribute, java.lang.String[] value)
setAttribute
in class DataClass
public void setAttribute(java.lang.String attribute, boolean value)
setAttribute
in class DataClass
public java.lang.String getAttribute(java.lang.String attribute)
getAttribute
in class DataClass
public java.lang.String getAttributeAsString(java.lang.String attribute)
getAttributeAsString
in class DataClass
public java.util.Date getAttributeAsDate(java.lang.String attribute)
getAttributeAsDate
in class DataClass
public java.lang.Double getAttributeAsDouble(java.lang.String attribute)
getAttributeAsDouble
in class DataClass
public com.google.gwt.core.client.JavaScriptObject getAttributeAsJavaScriptObject(java.lang.String attribute)
getAttributeAsJavaScriptObject
in class DataClass
public java.lang.Integer getAttributeAsInt(java.lang.String attribute)
getAttributeAsInt
in class DataClass
public java.lang.Float getAttributeAsFloat(java.lang.String attribute)
getAttributeAsFloat
in class DataClass
public java.lang.Boolean getAttributeAsBoolean(java.lang.String attribute)
getAttributeAsBoolean
in class DataClass
public void setProperty(java.lang.String property, java.lang.String value)
public void setProperty(java.lang.String property, boolean value)
public void setProperty(java.lang.String property, double value)
public void setProperty(java.lang.String property, com.google.gwt.core.client.JavaScriptObject value)
protected boolean isCreated()
isCreated
in class JsObject
public void setOptionDataSource(DataSource dataSource)
public void setValidators(Validator... validators)
validators
- the validatorspublic void setIcons(FormItemIcon... icons)
icons
- icons Default value is nullpublic void setErrorOrientation(FormErrorOrientation errorOrientation)
showInlineErrors
is true, where
should the error icon and text appear relative to the form item itself. Valid options are "top"
,
"bottom"
, "left"
or "right"
.errorOrientation
.
errorOrientation
- errorOrientation Default value is nullpublic void setType(java.lang.String type)
type
- type Default value is "text"public void setColSpan(java.lang.String colSpan)
The colSpan
setting does not include the title shown
for items with showTitle
:true, so the
effective colSpan
is one higher than this setting for items that are showing a title and whose
TitleOrientation
is either "left" or "right".
colSpan
- colSpan Default value is 1public void setColSpan(int colSpan)
The colSpan
setting does not include the title shown
for items with showTitle
:true, so the
effective colSpan
is one higher than this setting for items that are showing a title and whose
TitleOrientation
is either "left" or "right".
colSpan
- colSpan Default value is 1public java.lang.String getType()
public void setDefaultValue(java.lang.String defaultValue)
null
programatically, it will be reverted to the defaultValue
. Developers
should use the values
object if their intention
is to provide an initial value for a field in a form rather than a value to use in place of null
.
defaultValue
- defaultValue Default value is nullpublic void setDefaultValue(java.lang.Integer defaultValue)
null
programatically, it will be reverted to the defaultValue
. Developers
should use the values
object if their intention
is to provide an initial value for a field in a form rather than a value to use in place of null
.
defaultValue
- defaultValue Default value is nullpublic void setDefaultValue(java.util.Date defaultValue)
null
programatically, it will be reverted to the defaultValue
. Developers
should use the values
object if their intention
is to provide an initial value for a field in a form rather than a value to use in place of null
.
defaultValue
- defaultValue Default value is nullpublic void setDefaultValue(java.lang.Boolean defaultValue)
null
programatically, it will be reverted to the defaultValue
. Developers
should use the values
object if their intention
is to provide an initial value for a field in a form rather than a value to use in place of null
.
defaultValue
- defaultValue Default value is nullpublic void setDefaultValue(java.lang.Float defaultValue)
null
programatically, it will be reverted to the defaultValue
. Developers
should use the values
object if their intention
is to provide an initial value for a field in a form rather than a value to use in place of null
.
defaultValue
- defaultValue Default value is nullpublic void setValueMap(java.lang.String... valueMap)
valueMap
- the value mappublic void setValueMap(java.util.LinkedHashMap valueMap)
valueMap
- the value mappublic void setValueIcons(java.util.Map valueIcons)
valueIcons
- mapping of logical values for this item to icon src URLspublic void setWidth(java.lang.String width)
public void setHeight(java.lang.String height)
public void setRedrawOnChange(boolean redrawOnChange)
redrawOnChange
- true to redraw on change. Default is falsepublic void setEditorType(FormItem editorType)
The type of FormItem to use for
editing is normally derived automatically from type
, which is the data type of the field, by the rules explained here
.
editorType
- editorType Default value is nullpublic java.lang.Object getValue()
public void setValue(int value)
public void setValue(float value)
public void setValue(double value)
public void setValue(java.util.Date value)
public void setValue(java.lang.String value)
public void setValue(boolean value)
public java.lang.String getDisplayValue()
public java.lang.String getDisplayValue(java.lang.String value)
public void redraw()
setRedrawOnChange(boolean)
public Rectangle getIconRect(FormItemIcon icon)
public Rectangle getIconPageRect(FormItemIcon icon)
public com.google.gwt.core.client.JavaScriptObject getConfig()
public void setTooltip(java.lang.String tooltip)
setPrompt(java.lang.String)
.
tooltip
- tooltip Default value is nullpublic java.lang.String getTooltip()
getPrompt()
public void setShowIfCondition(FormItemIfFunction showIf)
showIf
- the showIf handlersetRedrawOnChange(boolean)
public void setErrorFormatter(FormItemErrorFormatter errorFormatter)
errorFormatter
- the error formatter.public void setInputTransformer(FormItemInputTransformer inputTransformer)
change
event.
inputTransformer
- the input transformerpublic void setItemHoverFormatter(FormItemHoverFormatter hoverFormatter)
hoverFormatter
- the hover formatterpublic void setItemTitleHoverFormatter(FormItemHoverFormatter hoverFormatter)
hoverFormatter
- the hover formatter
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |