views:

318

answers:

1

Hi,

I've created a custom ItemRenderer extending UIComponent and implementing IListItemRenderer. This renderer contains a Text-Object to display the value.

For editing I'm using the standard ItemEditor (TextInput).

Now, when I want to edit a value, I click on a cell and the editor is created. But instead of displaying the value which was displayed in the renderer, "[object Object]" is displayed.

Does someone know why and can help me out here? Would be awesome!

A: 

It sounds like the labelField of your itemRenderer is set to the data/object itself rather than the property of the object. Make sure you have specified a labelField and that your TextArea#text property is set to data.property rather than data. This is because

var data:Object = new Object();
data.label = "Hello";
trace(data); // "[object Object]"
trace(data.toString()); // "[object Object]" 
trace(data.label); // "Hello";

Hope that helps, Lance

viatropos