2011-06-30 35 views
0

是否可以在mx:Tree組件中顯示多個屬性? 的XML看起來是這樣的:在mx中顯示多個屬性:樹

<item comment="blabla" author="user1" date="21.05.2011"> 
    <item comment="blabla" author="user2" date="21.05.2011"/> 
    <item comment="blabla" author="user3" date="21.05.2011"/> 
</item> 

我希望每個節點顯示評論,作者和日期,在不同的行。

我打算使用它來顯示類似於facebook牆的內容:有人寫信息,其他用戶可以發表評論。

任何想法?

回答

4

您可以爲此使用自定義的ItemRenderer。

結帳了的Adobe LiveDocs中: http://livedocs.adobe.com/flex/3/html/help.html?content=cellrenderer_8.html

乾杯

+0

我知道自定義ItemRenderer,但我不知道ho w訪問除標籤之外的其他屬性... –

+0

您不知道如何訪問XML屬性或您的意思到底是什麼?你能詳細說明一下嗎? –

+0

是的,問題是我無法訪問我的ItemRenderer中的XML屬性。我試圖像這樣訪問它:treeListData.comment。愚蠢的錯誤:|正確的方法是treeListData.item。@屬性。謝謝 –