I have an object with a property STATUS
which is of a type String, STATUS
holds 1,2
or 3
Now each value for STATUS
has its value to show so;
1 => 'Inactive'
2 => 'Active'
3 => 'Suspended'
Meaning that on a form I'd display those textual value instead of just 1,2 or 3. I hold the value in an ArrayCollection
What would be the best and most efficient way to show those values binded in a form, so that:
<s:Label text="Status: {object.status}"/>
For object.status = 1
, would show the following in the label: Status: Inactive
I need it to be bindable as well.
In a datagrid I'd use a labelFunction
to achieve this, but what to use in a Label?