2011-11-09 67 views
0

我面臨一個基本問題,我無法處理。 我想在Spark List中顯示數據。它的工作原理是直到我想從xml中顯示圖像。我知道我必須使用某種itemRenderer,但我不知道如何。我讀了幾篇關於它的文章,但沒有發現任何溶劑化。從XML的Flash Builder 4.5中的Spark列表中顯示圖像

This one is allmost good, but i want to display the pictures in the list

我的代碼如下所示:

<?xml version="1.0" encoding="utf-8"?><s:View xmlns:fx="http://ns.adobe.com/mxml/2009"xmlns:s="library://ns.adobe.com/flex/spark" 
    xmlns:employees="services.employees.*" 
    title="HomeView"> 
<fx:Script> 
    <![CDATA[ 
     import mx.events.FlexEvent; 

     protected function list_creationCompleteHandler(event:FlexEvent):void 
     { 
      getDataResult.token = employees.getData(); 
     } 

    ]]> 
</fx:Script> 
<fx:Declarations> 
    <!-- Place non-visual elements (e.g., services, value objects) here --> 
    <s:HTTPService id="srv" url="employees.xml"/> 
    <s:CallResponder id="getDataResult"/> 
    <employees:Employees id="employees"/> 
</fx:Declarations> 
<s:List id="list" left="0" right="0" top="0" bottom="0" 
     creationComplete="list_creationCompleteHandler(event)" labelField="picture"> 
    <s:AsyncListView list="{getDataResult.lastResult}"/> 
</s:List></s:View> 

我將是任何幫助,所以greatfull。

謝謝大家!

回答