Package com.smartgwt.client.data
Class Field
java.lang.Object
com.smartgwt.client.core.JsObject
com.smartgwt.client.core.DataClass
com.smartgwt.client.core.RefDataClass
com.smartgwt.client.data.Field
- All Implemented Interfaces:
HasHandlers
- Direct Known Subclasses:
DataSourceField
,DBCField
,FormItem
Base type representing a field.
Field container implementations may extend this type with additional attributes
and/or methods. For example, DataSource
uses DataSourceField
, DataBoundComponent
uses DBCField
, and ListGrid
uses ListGridField
(itself an extension of DBCField
).
In general,
Field
instances should not be shared with multiple field containers.
-
Field Summary
Fields inherited from class com.smartgwt.client.core.RefDataClass
id
Fields inherited from class com.smartgwt.client.core.DataClass
factoryCreated, factoryProperties
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionIf set totrue
, then values for the field are considered editable.If set totrue
, then values for the field are considered exportable.If set totrue
, then values for the field will be HTML-escaped.Optional title HTML to use for the field in exports.If set totrue
, then the field is array-valued.getName()
Name of the field.static Field
getOrCreateRef
(JavaScriptObject jsObj) If set to a field name, causes the field to be sorted by the values in the specified field, for both client- and server-side sorting.getTitle()
AnHTMLString
to use as the displayable title for this field outside the context of a field container.If set, specifies the set of legal values for the field.setCanEdit
(Boolean canEdit) If set totrue
, then values for the field are considered editable.setCanExport
(Boolean canExport) If set totrue
, then values for the field are considered exportable.setEscapeHTML
(Boolean escapeHTML) If set totrue
, then values for the field will be HTML-escaped.setExportTitle
(String exportTitle) Optional title HTML to use for the field in exports.setMultiple
(Boolean multiple) If set totrue
, then the field is array-valued.Name of the field.setRequired
(Boolean required) If set totrue
, then a value for this field is required to pass validation.setSortByField
(String sortByField) If set to a field name, causes the field to be sorted by the values in the specified field, for both client- and server-side sorting.AnHTMLString
to use as the displayable title for this field outside the context of a field container.setValueMap
(Map valueMap) If set, specifies the set of legal values for the field.Methods inherited from class com.smartgwt.client.core.RefDataClass
getRef, getRef, internalSetID
Methods inherited from class com.smartgwt.client.core.DataClass
applyFactoryProperties, doAddHandler, fireEvent, getAttribute, getAttributeAsBoolean, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsDoubleArray, getAttributeAsElement, getAttributeAsFloat, getAttributeAsInt, getAttributeAsIntArray, getAttributeAsJavaScriptObject, getAttributeAsLong, getAttributeAsMap, getAttributeAsObject, getAttributeAsRecord, getAttributeAsString, getAttributeAsStringArray, getAttributes, getHandlerCount, isFactoryCreated, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttributeAsJavaObject, setFactoryCreated
-
Constructor Details
-
Field
public Field() -
Field
-
-
Method Details
-
getOrCreateRef
-
setCanEdit
If set totrue
, then values for the field are considered editable. If set tofalse
, then values for the field cannot be edited. Ifnull
, then the determination is left to the field container.- Parameters:
canEdit
- New canEdit value. Default value is null- Returns:
Field
instance, for chaining setter calls
-
getCanEdit
If set totrue
, then values for the field are considered editable. If set tofalse
, then values for the field cannot be edited. Ifnull
, then the determination is left to the field container.- Returns:
- Current canEdit value. Default value is null
-
setCanExport
If set totrue
, then values for the field are considered exportable. If set tofalse
, then values for the field will not be exported. Ifnull
, then the determination is left to the field container.- Parameters:
canExport
- New canExport value. Default value is null- Returns:
Field
instance, for chaining setter calls
-
getCanExport
If set totrue
, then values for the field are considered exportable. If set tofalse
, then values for the field will not be exported. Ifnull
, then the determination is left to the field container.- Returns:
- Current canExport value. Default value is null
-
setEscapeHTML
If set totrue
, then values for the field will be HTML-escaped.- Parameters:
escapeHTML
- New escapeHTML value. Default value is null- Returns:
Field
instance, for chaining setter calls
-
getEscapeHTML
If set totrue
, then values for the field will be HTML-escaped.- Returns:
- Current escapeHTML value. Default value is null
-
setExportTitle
Optional title HTML to use for the field in exports.- Parameters:
exportTitle
- New exportTitle value. Default value is null- Returns:
Field
instance, for chaining setter calls- See Also:
-
getExportTitle
Optional title HTML to use for the field in exports.- Returns:
- Current exportTitle value. Default value is null
- See Also:
-
setMultiple
If set totrue
, then the field is array-valued.- Parameters:
multiple
- New multiple value. Default value is null- Returns:
Field
instance, for chaining setter calls
-
getMultiple
If set totrue
, then the field is array-valued.- Returns:
- Current multiple value. Default value is null
-
setName
Name of the field. -
getName
Name of the field.- Returns:
- Current name value. Default value is null
- See Also:
-
setRequired
If set totrue
, then a value for this field is required to pass validation.- Parameters:
required
- New required value. Default value is null- Returns:
Field
instance, for chaining setter calls
-
setSortByField
If set to a field name, causes the field to be sorted by the values in the specified field, for both client- and server-side sorting. -
getSortByField
If set to a field name, causes the field to be sorted by the values in the specified field, for both client- and server-side sorting.- Returns:
- Current sortByField value. Default value is null
- See Also:
-
setTitle
AnHTMLString
to use as the displayable title for this field outside the context of a field container.Within a
DataBoundComponent
:- A field's title may be
set with
DataBoundComponent.setFieldTitle()
. - Always call the
DataBoundComponent.getFieldTitle()
method to obtain the field's title.
- Parameters:
title
- New title value. Default value is null- Returns:
Field
instance, for chaining setter calls- See Also:
- A field's title may be
set with
-
getTitle
AnHTMLString
to use as the displayable title for this field outside the context of a field container.Within a
DataBoundComponent
:- A field's title may be
set with
DataBoundComponent.setFieldTitle()
. - Always call the
DataBoundComponent.getFieldTitle()
method to obtain the field's title.
- Returns:
- Current title value. Default value is null
- See Also:
- A field's title may be
set with
-
setValueMap
If set, specifies the set of legal values for the field.- Parameters:
valueMap
- New valueMap value. Default value is null- Returns:
Field
instance, for chaining setter calls
-
getValueMap
If set, specifies the set of legal values for the field.- Returns:
- Current valueMap value. Default value is null
-