class %ZEN.Auxiliary.dataBag
extends %ZEN.Component.object
This class provides a way to assemble data that can be
conveniently passed between the web client and the server.
A dataBag object contains a set of name-value pairs.
This is used internally by the MVC classes.
property %data
as %ZEN.Datatype.string(XMLPROJECTION="NONE") [ MultiDimensional ];
Array of data values within the dataBag, indexed by series and property name.
property %labels
as %ZEN.Datatype.string(XMLPROJECTION="NONE") [ MultiDimensional ];
Array of labels within the dataBag, indexed by property name.
property %types
as %ZEN.Datatype.string(XMLPROJECTION="NONE") [ MultiDimensional ];
Array of data types within the dataBag, indexed by property name.
property clientData
as %ZEN.Datatype.list(XMLPROJECTION="NONE",ZENSETTING=0);
Array of serialized data values going to and coming from the client.
property seriesCount
as %ZEN.Datatype.integer(MINVAL=1,XMLPROJECTION="NONE",ZENSETTING=0) [ InitialExpression = 1 ];
Number of data series held within the dataBag.
method %Clear()
Delete data currently in the dataBag.
method %CopyFromModel(pModel As %ZEN.DataModel.DataModel)
as %Status
Fill the contents of this dataBag from the given DataModel
method %CopyToModel(pModel As %ZEN.DataModel.DataModel)
as %Status
Copy the contents of this dataBag into the given DataModel.
method %GetArray(Output pArray)
Copy the contents of this dataBag into a local array.
method %GetLabel(pProperty As %String)
as %String
Get the label for a property within the dataBag.
method %GetType(pProperty As %String)
as %String
Get the type of a property within the dataBag.
method %GetValue(pProperty As %String, pSeries As %Integer = 1)
as %String
Get the value of a property within the dataBag.
Note that this can return a literal value,
an object value (oref), or $$$ZENMISSING if the given
property is not in the model.
method %OnDrawObjectProperties()
as %Status
Called just before we serve property values to the client.
method %OnObjectSynch()
as %Status
Make sure client data is prepared.
method %OnZENDeserialize()
as %Status
Deserialize additional values from the client.
method %SerializeData(pDelim As %String = $C(5))
as %Status
Convert internal arrays to a serialized strings for use on the client.
method %SetValue(pProperty As %String, pValue As %String)
Set the value of a property within the dataBag.
method clear()
[ Language = javascript ]
Clear contents of this dataBag.
method getDimSize(dim)
[ Language = javascript ]
dataSet API
Return the number of items in the specified dimension.
(dim is 1,2, or 3).
The size of the first dimension is defined by the number of properties in the dataBag.
The size of the second dimension is defined by number of data series in the dataBag.
The dataBag does not support a third dimension.
method getPropertyCount()
[ Language = javascript ]
Return the number of properties within this dataBag.
method getPropertyLabel(n)
[ Language = javascript ]
Return the label of a property within this dataBag given its ordinal
(0-based) position.
method getPropertyName(n)
[ Language = javascript ]
Return the name of a property within this dataBag given its ordinal
(0-based) position.
method getPropertyType(n)
[ Language = javascript ]
Return the type code of a property within this dataBag given its ordinal
(0-based) position.
method getSeriesCount()
[ Language = javascript ]
Return the number of data series within this dataBag.
method getSeriesLabel(n)
[ Language = javascript ]
Return the label of a dataSeries within this dataBag given its ordinal
(0-based) position.
method getValue(property, series)
[ Language = javascript ]
Return the data value associated with a given property name.
If there is no property with the name, property, return null.
method getValueByPosition(n, series)
[ Language = javascript ]
Return the data value at the given ordinal position.
If n is out of range, return null.
series is 0-based.
method getValuesAsArrays()
[ Language = javascript ]
This is a specialized variant of getValueByPosition that
return the data in this bag as an array of arrays (used
by charts).
method getValuesAsObject(series)
[ Language = javascript ]
Return the values in this dataBag as a zenProxy object.
If there is more than one data series, series
specifies which one to use.
Return null if there are no properties in the dataBag.
method setProperty(property, value, value2)
[ Language = javascript ]
Set the value of a named property.
method setValue(property, value, series)
[ Language = javascript ]
Set the data value for the given property.
series is 0-based.
method setValueByPosition(value, n, series)
[ Language = javascript ]
Set the data value at the given ordinal position.
series is 0-based.