Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.gwtext.client.data
Class RecordDef

    java.lang.Object
      com.gwtext.client.core.JsObject
          com.gwtext.client.data.RecordDef

    public class RecordDef

extends JsObject

A record definition where the fields in the source data of a `Reader` are declared.

     Object[][] states = new Object[][]{
                   new Object[]{"AL", "Alabama"},
                   new Object[]{"AK", "Alaska"},
                   new Object[]{"AZ", "Arizona"},
                   new Object[]{"AR", "Arkansas"},
                   new Object[]{"CA", "California"}};

     Reader reader = new ArrayReader(new RecordDef(
                    new FieldDef[]{
                           new StringFieldDef("abbr"),
                           new StringFieldDef("state")
                   }));

     Store store = new Store(proxy, reader);

See Also:
  `Store`, `MemoryProxy`

Field Summary

Fields inherited from class com.gwtext.client.core.JsObject
`jsObj`

Constructor Summary
`RecordDef(FieldDef[] fields)` Construct a new RecordDef using the passed field definitions.

Method Summary
`Record` | `createRecord(java.lang.Object[] rowData)` Create a new Record instance using the passed data.
`Record` | `createRecord(java.lang.String id, java.lang.Object[] rowData)` Create a new Record instance using the passed data.
`FieldDef[]` | `getFields()` Return the fields defined for this RecordDef.

Methods inherited from class com.gwtext.client.core.JsObject
`getJsObj, getProperties, isCreated, setJsObj`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### RecordDef

    public RecordDef(FieldDef[] fields)

  Construct a new RecordDef using the passed field definitions.

  Parameters:
    `fields` - the field defs

Method Detail

### createRecord

    public Record createRecord(java.lang.String id,
                               java.lang.Object[] rowData)

  Create a new Record instance using the passed data.

  Parameters:
    `id` - the Record ID
    `rowData` - the record data
  Returns:
    a Record instance

### createRecord

    public Record createRecord(java.lang.Object[] rowData)

  Create a new Record instance using the passed data.

  Parameters:
    `rowData` - the record data
  Returns:
    a Record instance

### getFields

    public FieldDef[] getFields()

  Return the fields defined for this RecordDef.

  Returns:
    the field defs

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD