|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Objectjava.lang.Enum<FieldType>
com.smartgwt.client.types.FieldType
public enum FieldType
The types listed below are built-in types that 'databound components'
understand and treat specially (using type-specific form controls, validators,
formatters, sorting
logic, etc).
You can declare custom types via SimpleType
,
with settings that
will influence DataBound components. You can also create your own subclasses of
databound
components to add further custom, reusable behaviors based on field.type.
field.type
can also be the ID of another DataSource
, which allows
you to
model nested structures such as XML documents (in fact, XMLTools.loadXMLSchema(String, com.smartgwt.client.data.XSDLoadCallback, com.smartgwt.client.rpc.RPCRequest)
;
models XML schema in this way). Nested DataSource declarations affect how XML and JSON data
is deserialized
into JavaScript objects in the
'client-side integration')
pipeline, so that you can load
complex XML documents and have them deserialized into a correctly
typed JavaScript object
model.
Note: to declared related but separate objects, as in an
"Account" object that can be
related to both a "Contact" object and "Order" objects, use
foreignKey
, not a nested structure declaration.
Enum Constant Summary | |
---|---|
BINARY
Arbitrary binary data. |
|
BOOLEAN
A boolean value, e.g. |
|
DATE
A date, including time of day. |
|
DATETIME
A date and time, accurate to the second. |
|
ENUM
A text value constrained to a set of legal values specified by the field's valueMap , as though an
IsOneOfValidator validator had been declared. |
|
FLOAT
A floating point (decimal) number, e.g. |
|
IMAGE
A string representing a well-formed URL that points to an image. |
|
IMAGEFILE
Binary data comprising an image. |
|
INTEGER
A whole number, e.g. |
|
INTENUM
An enum whose values are numeric. |
|
LINK
A string representing a well-formed URL. |
|
PASSWORD
Password field type |
|
SEQUENCE
If you are using the SmartGWT SQL datasource connector, a sequence is a
unique, increasing whole number, incremented
whenever a new record is added. |
|
TEXT
Generic text, e.g. |
|
TIME
A time of day, with no date. |
Method Summary | |
---|---|
String |
getValue()
|
static FieldType |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static FieldType[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final FieldType TEXT
"John Doe"
. This is the default field type. Use
field.length
to set length.
public static final FieldType BOOLEAN
true
public static final FieldType INTEGER
123
public static final FieldType FLOAT
1.23
public static final FieldType DATE
Date
object.
object.
public static final FieldType TIME
public static final FieldType DATETIME
public static final FieldType ENUM
valueMap
, as though an
IsOneOfValidator
validator had been declared.
public static final FieldType INTENUM
public static final FieldType SEQUENCE
sequence
is a
unique, increasing whole number, incremented
whenever a new record is added. Otherwise,
sequence
behaves
identically to integer
. This type is typically
used with
field.primaryKey
to auto-generate unique primary keys.
public static final FieldType LINK
public static final FieldType IMAGE
public static final FieldType BINARY
name
attribute of this field. These fields are marked
as
hidden
:true
to suppress their rendering
by default. You
can show one or more of these fields by specifying the field with a
hidden:false
override in the fields array of the databound component.
public static final FieldType IMAGEFILE
public static final FieldType PASSWORD
Method Detail |
---|
public static FieldType[] values()
for (FieldType c : FieldType.values()) System.out.println(c);
public static FieldType valueOf(String name)
name
- the name of the enum constant to be returned.
IllegalArgumentException
- if this enum type has no constant
with the specified name
NullPointerException
- if the argument is nullpublic String getValue()
getValue
in interface ValueEnum
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |