Main Page | Packages | Class Tree | Index | Help

xp.data

class LookupFormatter

Object
  |
  +--xp.data.LookupFormatter


class LookupFormatter
extends Object

A data formatter that lookups a value in a list (TwoWay - formats and parses)

TwoWay - formats and parses, use the LookupListFormatter unless you need to parse as well as format.


Author:
ProWin Computers Ltd. - Rob Edgar

Version:
3.0.0.000

See also:


Field Summary

public
isInitialized: Boolean


public
keyField: String
The function to callback

public
lookupSource: Object
The instance to callback

public
valueField: String
The function to callback

Constructor

public
LookupFormatter ( lookupSource: Object, keyField: String, valueField: String)
Constructor

Method Summary

public
format ( value: Object, data: Object ): Object
Converts from a raw data type to a new object

public
parse ( value: Object, data: Object ): Object
Converts from a string, or other data type, to the raw data type



Field Documentation

isInitialized

public var isInitialized: Boolean

keyField

public var keyField: String
The function to callback

lookupSource

public var lookupSource: Object
The instance to callback

valueField

public var valueField: String
The function to callback


Constructor Documentation

LookupFormatter

public function LookupFormatter(lookupSource: Object,
 keyField: String,
 valueField: String)
Constructor

Parameters:
lookupSource
listener The target object to call
keyField
functionName The
valueField

Method Documentation

format

public function format(value: Object,
 data: Object): Object
Converts from a raw data type to a new object

Converts from a raw data type to a new object.

Usage:
This method is called automatically; you don’t invoke it directly.

Parameters:
value
The raw data value to be formatted
data
If being used for DataBinding this will be the row data otherwise it will be null
Returns:
A formatted value

parse

public function parse(value: Object,
 data: Object): Object
Converts from a string, or other data type, to the raw data type

Converts from a string, or other data type, to the raw data type. This transformation should be the exact inverse transformation of IDataFormatter.format().

Usage:
This method is called automatically; you don’t invoke it directly.

Parameters:
value
The formatted value
data
If being used for DataBinding this will be the row data otherwise it will be null
Returns:
An unformatted value


The documentation was generated from the following file:


Generated on 10/30/2005 9:34:02 PM by AS2Doc