Class DataClass
- All Implemented Interfaces:
HasHandlers
- Direct Known Subclasses:
AceCompletionResult
,AcePosition
,AIMessage
,AIProgressMessage
,AnimateShowEffect
,BrowserWindowSettings
,CreateScreenSettings
,Criteria
,CriteriaOutputSettings
,DataContext
,DataContextBinding
,DebugOverflowSettings
,DecisionBranch
,DiscoverTreeSettings
,DrawnValue
,DrawShapeCommand
,DSLoadSettings
,EventStreamData
,EventStreamEvent
,FacetValueMap
,FileSpec
,FormItemEventInfo
,FormItemIcon
,Gradient
,GroupSpecifier
,HeaderSpan
,ImgHTMLProperties
,KeyIdentifier
,ListProperties
,LoadProjectSettings
,LoadScreenSettings
,MetricSettings
,MockDSExportSettings
,MultiWindowSettings
,NavigationBarViewState
,NotifyAction
,NotifySettings
,OperationBinding
,PortalPosition
,PrintProperties
,PropertyValue
,QualityIndicatedLocator
,RefDataClass
,RelationPath
,RelativeDate
,SavedSearches
,SCStatefulImgConfig
,SeleneseSettings
,SeleniumCommand
,SerializationContext
,SerializationSettings
,Shadow
,SortSpecifier
,StretchItem
,StyleGroup
,StyleSetting
,SummarizeValueExample
,SystemDoneConfig
,UserFormula
,UserSummary
,Validator
,XmlNamespaces
-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
protected final <H extends EventHandler>
HandlerRegistrationdoAddHandler
(H handler, GwtEvent.Type<H> type) void
getAttribute
(String property) Returns attribute value as a StringgetAttributeAsBoolean
(String property) Returns attribute value set as a Boolean.getAttributeAsBoolean
(String property, boolean allowNull) Returns attribute value set as a Boolean.getAttributeAsDate
(String property) Returns attribute value as a Date.getAttributeAsDouble
(String property) Returns attribute as a Double.double[]
getAttributeAsDoubleArray
(String property) Returns attribute as a double array.getAttributeAsElement
(String property) Get the attribute value as an Element.getAttributeAsFloat
(String property) Returns attribute value as a Float.getAttributeAsInt
(String property) Returns attribute value as an Integer.int[]
getAttributeAsIntArray
(String property) Returns attribute as an int array.getAttributeAsJavaScriptObject
(String property) Returns attribute value as a JavaScript Object.getAttributeAsLong
(String property) Returns attribute as a Long.getAttributeAsMap
(String property) Returns attribute value as a Map.getAttributeAsObject
(String property) Returns attribute value as a Java Object.getAttributeAsRecord
(String property) Get the attribute value as a Record.getAttributeAsString
(String property) Returns attribute value as a String.String[]
getAttributeAsStringArray
(String property) Returns attribute as a String array.String[]
int
getHandlerCount
(GwtEvent.Type<?> type) boolean
setAttribute
(String property, boolean value) Set attribute value to a boolean.setAttribute
(String property, double value) Set attribute value to a double.setAttribute
(String property, double[] value) Set attribute value to a double array.setAttribute
(String property, int value) Set attribute value to an int.setAttribute
(String property, int[] value) Set attribute value to an int array.setAttribute
(String property, long value) Set attribute value to a long.setAttribute
(String property, JavaScriptObject value) Set attribute value to a JavaScriptObject.setAttribute
(String property, BaseClass value) Set attribute value to a BaseClass.setAttribute
(String property, BaseClass[] value) Set attribute value to a BaseClass array.setAttribute
(String property, DataClass value) Set attribute value to a DataClass.setAttribute
(String property, DataClass[] value) Set attribute value to a DataClass array.setAttribute
(String property, ValueEnum value) Set attribute value to a ValueEnum.setAttribute
(String property, ValueEnum[] value) Set attribute value to a ValueEnum array.setAttribute
(String property, BaseWidget[] value) Set attribute value to a BaseWidget array.setAttribute
(String property, Boolean value) Set attribute value to a Boolean.setAttribute
(String property, Double value) Set attribute value to a Double.setAttribute
(String property, Float value) Set attribute value to a Float.setAttribute
(String property, Integer value) Set attribute value to an Integer.setAttribute
(String property, Integer[] value) Set attribute value to an Integer array.setAttribute
(String property, Object value) Set the attribute value to an Object.setAttribute
(String property, String value) Set attribute value to a StringsetAttribute
(String property, String[] value) Set attribute value to a String array.setAttribute
(String property, Date value) Set attribute value to a Date.setAttribute
(String property, Map value) Set attribute value to a Map.setAttributeAsJavaObject
(String property, Object value) Set the attribute value to an Object.void
setFactoryCreated
(boolean createdByBeanFactory)
-
Field Details
-
factoryProperties
-
factoryCreated
protected boolean factoryCreated
-
-
Constructor Details
-
DataClass
public DataClass() -
DataClass
-
-
Method Details
-
applyFactoryProperties
public void applyFactoryProperties() -
setFactoryCreated
public void setFactoryCreated(boolean createdByBeanFactory) -
isFactoryCreated
public boolean isFactoryCreated() -
setAttribute
Set attribute value to a String- Parameters:
property
-value
-- Returns:
DataClass
instance, for chaining setter calls
-
getAttribute
Returns attribute value as a String- Parameters:
property
-- Returns:
-
getAttributeAsString
Returns attribute value as a String.- Parameters:
property
-- Returns:
-
getAttributeAsInt
Returns attribute value as an Integer. Applies to values stored as a JavaScript number on the underlying data object.- Parameters:
property
-- Returns:
-
getAttributeAsBoolean
Returns attribute value set as a Boolean. For convenience in checking boolean properties,getAttributeAsBoolean
will return Booleanfalse
if the attribute value isnull
or not a Boolean. Use the two parameter variant of this APIgetAttributeAsBoolean(String, boolean)
if you wantnull
returned fornull
attribute values.- Parameters:
property
- the property name- Returns:
- the property value
-
getAttributeAsBoolean
Returns attribute value set as a Boolean. If the attribute value isnull
or not a Boolean, the return value depends uponallowNull
. IfallowNull
is true,null
will be returned; otherwise Booleanfalse
will be returned. For a simpler approach that never returnsnull
, use the one parameter variant of this APIgetAttributeAsBoolean(String)
.- Parameters:
property
- the property nameallowNull
- whether to allow null- Returns:
- the property value
-
getAttributeAsDouble
Returns attribute as a Double. Applies to values stored as a JavaScript Number on the underlying data object.- Parameters:
property
-- Returns:
-
getAttributeAsLong
Returns attribute as a Long. Applies to values stored as a JavaScript Number on the underlying data object.- Parameters:
property
-- Returns:
-
getAttributeAsDoubleArray
Returns attribute as a double array. Applies to values stored as a JavaScript Array of Numbers on the underlying data object.- Parameters:
property
-- Returns:
-
setAttribute
Set attribute value to a DataClass array. Value will be stored as a JavaScript Array of the underlying JavaScript objects for each entry.- Parameters:
property
-value
-- Returns:
DataClass
instance, for chaining setter calls
-
setAttribute
Set attribute value to a BaseClass array. Value will be stored as a JavaScript Array of the underlying JavaScript objects for each entry.- Parameters:
property
-value
-- Returns:
DataClass
instance, for chaining setter calls
-
setAttribute
Set attribute value to a BaseWidget array. Value will be stored as a JavaScript Array of the underlying JavaScript objects for each entry.- Parameters:
property
-value
-- Returns:
DataClass
instance, for chaining setter calls
-
getAttributeAsIntArray
Returns attribute as an int array. Applies to values stored as a JavaScript Array of Numbers on the underlying data object.- Parameters:
property
-- Returns:
-
setAttribute
Set attribute value to a String array. Value will be stored as a JavaScript Array of Strings on the underlying data object.- Parameters:
property
-value
-- Returns:
DataClass
instance, for chaining setter calls
-
getAttributeAsStringArray
Returns attribute as a String array. Applies to values stored as a JavaScript Array of Strings on the underlying data object.- Parameters:
property
-- Returns:
-
setAttribute
Set attribute value to a DataClass. Value will be stored as the underlying JavaScript object for the DataClass instance passed in.- Parameters:
property
-value
-- Returns:
DataClass
instance, for chaining setter calls
-
setAttribute
Set attribute value to a BaseClass. Value will be stored as the underlying JavaScript object for the BaseClass instance passed in.- Parameters:
property
-value
-- Returns:
DataClass
instance, for chaining setter calls
-
setAttribute
Set attribute value to a JavaScriptObject.- Parameters:
property
-value
-- Returns:
DataClass
instance, for chaining setter calls
-
setAttribute
Set attribute value to a Date. Value will be stored as a JavaScript Date on the underlying data object- Parameters:
property
-value
-- Returns:
DataClass
instance, for chaining setter calls
-
setAttribute
Set attribute value to a Map. Value will be stored as a JavaScript Object on the underlying data object, with property/value pairs matching the keys/values specified on the Map. Note that this is a recursive conversion - each value will also be converted to the equivalent JavaScript type where appropriate.- Parameters:
property
-value
-- Returns:
DataClass
instance, for chaining setter calls
-
setAttribute
Set attribute value to a ValueEnum array. Value will be stored as a JavaScript Array containing the each Enum value.- Parameters:
property
-value
-- Returns:
DataClass
instance, for chaining setter calls
-
setAttribute
Set attribute value to a ValueEnum. The value of the ValueEnum will be stored on the underlying data object.- Parameters:
property
-value
-- Returns:
DataClass
instance, for chaining setter calls
-
setAttribute
Set the attribute value to an Object.The values provided as attributes are generally expected to contain valid values for a field of a DataBoundComponent. Therefore this method converts the value passed in to an equivalent object in JavaScript before storing on underlying data object.
Developers can usesetAttributeAsJavaObject(String, Object)
to store Java objects without converting to JavaScript.Conversions that occur include:
- Numeric data types will be represented as JavaScript Number
- Dates (and subclasses) will be stored as JavaScript Date
- Java Arrays will be stored as JavaScript Array, with members converted to the equivalent JavaScript type where appropriate
- Java Collections (including List, Set) will be stored as JavaScript Array, with members converted to the equivalent JavaScript object (recursively) where appropriate
- Maps are stored as JavaScript Objects with each key mapped to a property on the object. Property values are converted to the equivalent JavaScript object (recursively) where appropriate
getAttributeAsObject(String)
.- Parameters:
property
- the attribute namevalue
- the attribute value.- Returns:
DataClass
instance, for chaining setter calls
-
setAttributeAsJavaObject
Set the attribute value to an Object.Unlike
setAttribute(String, Object)
, this method will store the value passed in as-is rather than converting to an equivalent object in JavaScript.- Parameters:
property
-value
-- Returns:
DataClass
instance, for chaining setter calls
-
setAttribute
Set attribute value to a boolean.- Parameters:
property
-value
-- Returns:
DataClass
instance, for chaining setter calls
-
setAttribute
Set attribute value to a Boolean.- Parameters:
property
-value
-- Returns:
DataClass
instance, for chaining setter calls
-
setAttribute
Set attribute value to an int. Value will be stored as a JavaScript Number on the underlying data object- Parameters:
property
-value
-- Returns:
DataClass
instance, for chaining setter calls
-
setAttribute
Set attribute value to an Integer. Value will be stored as a JavaScript Number on the underlying data object- Parameters:
property
-value
-- Returns:
DataClass
instance, for chaining setter calls
-
setAttribute
Set attribute value to a long. Value will be stored as a JavaScript Number on the underlying data object.- Parameters:
property
-value
-- Returns:
DataClass
instance, for chaining setter calls
-
setAttribute
Set attribute value to a Float. Value will be stored as a JavaScript Number on the underlying data object- Parameters:
property
-value
-- Returns:
DataClass
instance, for chaining setter calls
-
setAttribute
Set attribute value to a double. Value will be stored as a JavaScript Number on the underlying data object- Parameters:
property
-value
-- Returns:
DataClass
instance, for chaining setter calls
-
setAttribute
Set attribute value to a Double. Value will be stored as a JavaScript Number on the underlying data object- Parameters:
property
-value
-- Returns:
DataClass
instance, for chaining setter calls
-
setAttribute
Set attribute value to an int array. Value will be stored as a JavaScript Array of Numbers on the underlying data object.- Parameters:
property
-value
-- Returns:
DataClass
instance, for chaining setter calls
-
setAttribute
Set attribute value to an Integer array. Value will be stored as a JavaScript Array of Numbers on the underlying data object.- Parameters:
property
-value
-- Returns:
DataClass
instance, for chaining setter calls
-
setAttribute
Set attribute value to a double array. Value will be stored as a JavaScript Array of Numbers on the underlying data object- Parameters:
property
-value
-- Returns:
DataClass
instance, for chaining setter calls
-
getAttributeAsFloat
Returns attribute value as a Float. Applies to values stored as a JavaScript number on the underlying data object.- Parameters:
property
-- Returns:
-
getAttributeAsDate
Returns attribute value as a Date. Applies to values stored as a JavaScript Date on the underlying data object.- Parameters:
property
-- Returns:
-
getAttributeAsObject
Returns attribute value as a Java Object.If the attribute has been set as a Java Object (typically via a call to
setAttributeAsJavaObject(String, Object)
) it will be returned as is.Values specified as JavaScript types will be converted to the equivalent Java type if possible.
- Parameters:
property
-- Returns:
-
getAttributeAsMap
Returns attribute value as a Map. Applies to values stored as a JavaScript Object on the underlying data object.- Parameters:
property
-- Returns:
-
getAttributeAsRecord
Get the attribute value as a Record.- Parameters:
property
- the property name- Returns:
- the record value
-
getAttributeAsElement
Get the attribute value as an Element.- Parameters:
property
- the property name- Returns:
- the element
-
getAttributeAsJavaScriptObject
Returns attribute value as a JavaScript Object.- Parameters:
property
-- Returns:
-
getAttributes
-