FieldAccessor

Kind of class:class
Inherits from:none
Classpath:mx.data.binding.FieldAccessor
File last modified:Tuesday, 18 December 2007, 15:44:38
An object that gives access to a specific field of a data structure.

Summary


Constructor
  • FieldAccessor (component, property, parentObj, fieldName, type, index, parentField)
Class properties
Class methods
Instance methods

Constructor

FieldAccessor

function FieldAccessor (
component, property, parentObj, fieldName, type, index, parentField)

Class properties

xmlNodeFactory

static private xmlNodeFactory:XML = new XML()
(read)

Instance properties

component

private component
(read)

fieldName

private fieldName
(read)

index

private index
(read)

m_location

private m_location
(read)

parentObj

private parentObj
(read)

property

private property
(read)

type

private type
(read)

xpath

private xpath
(read)

Class methods

accessField

static private function accessField (
component, fieldName, desiredTypes)

createFieldAccessor

static function createFieldAccessor (
component:Object, property:String, location:Object, type:Object, mustExist:Boolean) : mx.data.binding.FieldAccessor

Creates a FieldAccessor object.
Parameters:
component:
which component contains the data field you want to access
property :
which property of the component contains the data
location :
[optional] the location within the data structure of the field.
If omitted, you get an accessor for the entire data of the
component property. If the component property contains XML data,
the location may be either an XPath (as a string), or a generic
path (as an Array of strings). If the component property contains
ActionScript data, the location can only be a generic path.
type :
[optional] a DataSchema object for the component property
mustExist:
[optional] if this boolean is true, then we generate warning messages to the log
if the field does not exist, or is null
Returns:
  • a FieldAccessor object

ExpandRecord

static function ExpandRecord (
obj, objectType, desiredTypes)

findElementType

static function findElementType (
type, name)

isActionScriptPath

static function isActionScriptPath (
str:String) : Boolean

setXMLData

static private function setXMLData (
obj, newValue)

toLocalName

static function toLocalName (
nodeName)

wrapArray

static function wrapArray (
theArray, itemType, desiredTypes)

Instance methods

dataIsXML

private function dataIsXML (
) : Boolean

evaluateSubPath

private function evaluateSubPath (
obj, type)

getChild

private function getChild (
childName:String, index, mustExist:Boolean)

getFieldAccessor

function getFieldAccessor (
)

getFieldData

private function getFieldData (
) : Object

getOrCreateFieldData

private function getOrCreateFieldData (
mustExist:Boolean) : Object

getValue

function getValue (
) : Object

Fetches the current data value of the field.

isXML

private function isXML (
obj)

setupComplexField

private function setupComplexField (
)

setValue

function setValue (
newValue:Object, newTypedValue:mx = .data.binding.TypedValue)

Sets the field to contain a new data value.