flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mark goldin <markzolo...@gmail.com>
Subject Custom itemrenderer doesn't show data
Date Wed, 16 Mar 2016 20:55:40 GMT
Here is my custom itemrenderer code:
import mx.controls.Text;
import mx.controls.listClasses.BaseListData;
import mx.controls.listClasses.IDropInListItemRenderer;
import mx.controls.listClasses.IListItemRenderer;
import mx.core.UIComponent;
public class AssetPathRenderer extends UIComponent implements
IDropInListItemRenderer, IListItemRenderer
{
private var _listData:BaseListData;
private var _data:Object;
private var assetPathText:Text;
public function AssetPathRenderer()
{
super();
assetPathText = new Text();
this.(assetPathText);
assetPathText.visible = true;
}
public function get listData():BaseListData
{
return _listData;
}
public function set listData(value:BaseListData):void
{
_listData = value;
}
public function get data() : Object
{
return _data;
}
public function set data(value:Object):void
{
if (value)
{
if (value.assetPath != "")
assetPathText.text = value.assetPath;
else
assetPathText.text =  value.path;
}
_data = value;
}
}

Implementation. Simplified:
<column itemRenderer="AssetPathRenderer"/>

No data is shown in the column. What am I doing wrong?

Thanks

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message