com.smartgwt.client.data
Class Record

java.lang.Object
  extended by com.smartgwt.client.core.JsObject
      extended by com.smartgwt.client.core.DataClass
          extended by com.smartgwt.client.core.RefDataClass
              extended by com.smartgwt.client.data.Record
Direct Known Subclasses:
CalendarEvent, DetailViewerRecord, ListGridRecord

public class Record
extends RefDataClass

A Record is an ordinary Java class with properties that are treated as data to be displayed and edited by a DataBoundComponent.

DataBoundComponents have a concept of named fields, where values for each field are found under the same-named property in a Record.

A Record is always an ordinary Java object regardless of how the record is loaded (static data, java server, XML web service, etc).

The concept of working with Records is common to all DataBoundComponents, although individual DataBoundComponents may work with singular records (DynamicForm) or may work with lists (ListGrid), trees (TreeGrid), or cubes (CubeGrid) of records.

Individual DataComponents may also look for special properties on Records which control styling or behavior for those records, such as ListGrid.setRecordEditProperty(String)


Field Summary
 
Fields inherited from class com.smartgwt.client.core.JsObject
jsObj
 
Constructor Summary
Record()
           
Record(JavaScriptObject jsObj)
           
 
Method Summary
static Record[] convertToRecordArray(JavaScriptObject nativeArray)
           
 Record[] getAttributeAsRecordArray(String property)
          Returns the nested structure as Record array.
 RecordList getAttributeAsRecordList(String property)
          Returns the nested structure as a RecordList.
static Record getOrCreateRef(JavaScriptObject jsObj)
           
 
Methods inherited from class com.smartgwt.client.core.RefDataClass
getRef, getRef
 
Methods inherited from class com.smartgwt.client.core.DataClass
doAddHandler, fireEvent, getAttribute, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsFloat, getAttributeAsInt, getAttributeAsIntArray, getAttributeAsJavaScriptObject, getAttributeAsMap, getAttributeAsObject, getAttributeAsString, getAttributeAsStringArray, getAttributes, getHandlerCount, getJsObj, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute
 
Methods inherited from class com.smartgwt.client.core.JsObject
isCreated, setJsObj
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Record

public Record()

Record

public Record(JavaScriptObject jsObj)
Method Detail

getOrCreateRef

public static Record getOrCreateRef(JavaScriptObject jsObj)

getAttributeAsRecordArray

public Record[] getAttributeAsRecordArray(String property)
Returns the nested structure as Record array.

Parameters:
property - the record property
Returns:
array of records

getAttributeAsRecordList

public RecordList getAttributeAsRecordList(String property)
Returns the nested structure as a RecordList.

Parameters:
property - the record property
Returns:
the RecordList

convertToRecordArray

public static Record[] convertToRecordArray(JavaScriptObject nativeArray)