# Yahoo! UI Library

### recordset 3.3.0

Yahoo! UI Library > recordset > Record
Search:
Filters Show Private Show Protected Show Deprecated

## Class Record

Provides a wrapper around a standard javascript object. Can be inserted into a Recordset instance.

### Methods

#### getValue

`void getValue ( field )`
Retrieve a particular (or all) values from the object

Parameters:
  `field <string>` (optional) The key to retrieve the value from. If not supplied, the entire object is returned.

### Events

#### dataChange

`dataChange ( event )`
Fires when the value for the configuration attribute 'data' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.

Parameters:
  `event <Event.Facade>` An Event Facade object with the following attribute specific properties added:
  prevVal
    The value of the attribute, prior to it being set
  newVal
    The value the attribute is to be set to
  attrName
    The name of the attribute being set
  subAttrName
    If setting a property within the attribute's value, the name of the sub-attribute property being set

#### idChange

`idChange ( event )`
Fires when the value for the configuration attribute 'id' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.

Parameters:
  `event <Event.Facade>` An Event Facade object with the following attribute specific properties added:
  prevVal
    The value of the attribute, prior to it being set
  newVal
    The value the attribute is to be set to
  attrName
    The name of the attribute being set
  subAttrName
    If setting a property within the attribute's value, the name of the sub-attribute property being set

### Configuration Attributes

#### data `- object`

The object stored within the record instance

#### id `- string`

Unique ID of the record instance

Copyright © 2011 Yahoo! Inc. All rights reserved.