| Package | spark.utils |
| Class | public class LabelUtil |
| Inheritance | LabelUtil Object |
| Language Version: | ActionScript 3.0 |
| Product Version: | Flex 4 |
| Runtime Versions: | Flash Player 10, AIR 1.5 |
Public Properties
Public Methods
| Method | Defined By | ||
|---|---|---|---|
![]() |
Indicates whether an object has a specified property defined. | Object | |
![]() |
Indicates whether an instance of the Object class is in the prototype chain of the object specified
as the parameter. | Object | |
[static]
A function used by components that support item renderers
to determine the correct text an item renderer should display for a data item. | LabelUtil | ||
![]() |
Indicates whether the specified property exists and is enumerable. | Object | |
![]() |
Sets the availability of a dynamic property for loop operations. | Object | |
![]() |
Returns the string representation of this object, formatted according to locale-specific conventions. | Object | |
![]() |
Returns the string representation of the specified object. | Object | |
![]() |
Returns the primitive value of the specified object. | Object | |
Method Detail
itemToLabel | () | method |
public static function itemToLabel(item:Object, labelField:String = null, labelFunction:Function = null):String| Language Version: | ActionScript 3.0 |
| Product Version: | Flex 4 |
| Runtime Versions: | Flash Player 10, AIR 1.5 |
A function used by components that support item renderers
to determine the correct text an item renderer should display for a data item.
If no labelField or labelFunction parameter
is specified, the toString() method of the data item
is called to return a String representation of the data item.
The labelFunction property takes a reference to a function.
The function takes a single argument which is the item in
the data provider and returns a String:
myLabelFunction(item:Object):String
Parameters
item:Object — The data item. Null items return the empty string.
| |
labelField:String (default = null) — The field in the data item to return.
| |
labelFunction:Function (default = null) — A function that takes the data item
as a single parameter and returns a String.
|
String — A String representation for the data item
|
Thu May 20 2010, 02:19 AM -07:00

Hide Inherited Public Properties
Show Inherited Public Properties