This Is A FineDay

            BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
            93 隨筆 :: 0 文章 :: 69 評論 :: 0 Trackbacks
          <2009年1月>
          28293031123
          45678910
          11121314151617
          18192021222324
          25262728293031
          1234567

          常用鏈接

          留言簿(2)

          我參與的團隊

          隨筆分類

          隨筆檔案

          友情連接

          搜索

          最新隨筆

          最新評論

          閱讀排行榜

          評論排行榜

          Repeater remote object?嵌套似乎又是flex的一個Bug,郁悶了一天
          最終解決方法用Script初始化數據

          <mx:Label?text="{new2.currentItem.@label2}"?/> OK
          <mx:Label?text="{ppt.currentItem.typeName}"?/> NOK
          <mx:Label?text="{ppt.currentItem.typeName}"?creationComplete="accChildCreationComplete(event);"?width="100%"/>?? OK

          ?1<mx:XMLListCollection?id="xmlListColl">
          ?2????????<mx:source>
          ?3????????????<mx:XMLList>
          ?4????????????????<node?label="One">
          ?5????????????????????<node2?label2="One.1"?/>
          ?6????????????????????<node2?label2="One.2"?/>
          ?7????????????????????<node2?label2="One.3"?/>
          ?8????????????????</node>
          ?9????????????????<node?label="Two">
          10????????????????????<node2?label2="Two.1"?/>
          11????????????????????<node2?label2="Two.2"?/>
          12????????????????????<node2?label2="Two.3"?/>
          13????????????????</node>
          14????????????</mx:XMLList>
          15????????</mx:source>
          16????</mx:XMLListCollection>
          17????<mx:Accordion?id="accoridLeft"
          18??????????????????resizeToContent="true"
          19??????????????????width="100%">
          20???????????<mx:Repeater?id="news"?dataProvider="{xmlListColl}">
          21????????????<mx:VBox?label="{news.currentItem.@label}">
          22????????????????<mx:VDividedBox?horizontalAlign="left"?paddingLeft="15">
          23?????????????????????????<mx:Repeater?id="new2"?dataProvider="{news.currentItem.node2}">
          24????????????????????????<mx:VBox?label="{new2.currentItem.@label2}">
          25????????????????????????????<mx:Label?text="{new2.currentItem.@label2}"?click="onClick1(event);"/>
          26????????????????????????</mx:VBox>
          27?????????????????????</mx:Repeater>
          28????????????????</mx:VDividedBox>
          29????????????</mx:VBox>???????
          30????????</mx:Repeater>
          31????</mx:Accordion>

          ????<mx:Script>
          ????????
          <![CDATA[
          ????????import?mx.rpc.events.ResultEvent;
          ????????import?mx.events.FlexEvent;
          ????????import?mx.utils.ArrayUtil;
          ????????import?mx.collections.ArrayList;
          ????????import?mx.collections.ArrayCollection;
          ????????import?mx.controls.Alert;
          ????????import?mx.effects.easing.*;

          ????????public?function?init():void?{
          ????????????pts.getProductTypeMenu();
          ????????}

          ????????public?function?accChildCreationComplete(event:FlexEvent):void{
          ????????????event.target.text?=?String(event.currentTarget.getRepeaterItem().typeName);
          ????????}

          ????????
          ]]>
          ????
          </mx:Script>
          ????
          <mx:RemoteObject?id="pts"?destination="productTypeService">
          ????
          </mx:RemoteObject>
          ????
          <mx:Accordion?id="accoridLeft"
          ??????????????????resizeToContent
          ="true"
          ??????????????????width
          ="100%">
          ????????
          <mx:Repeater?dataProvider="{pts.getProductTypeMenu.lastResult}"?id="pt">
          ????????????
          <mx:VBox?label="{pt.currentItem.typeName}"?width="100%">
          ????????????????
          <mx:Repeater?dataProvider="{pt.currentItem.productTypes}"?id="ppt">
          ????????????????????
          <mx:Label?text="{ppt.currentItem.typeName}"?creationComplete="accChildCreationComplete(event);"?width="100%"/>
          ????????????????
          </mx:Repeater>
          ????????????
          </mx:VBox>
          ????????
          </mx:Repeater>
          ????
          </mx:Accordion>


          posted on 2009-01-15 11:20 Peter Pan 閱讀(409) 評論(0)  編輯  收藏 所屬分類: FLEX
          主站蜘蛛池模板: 长岛县| 涪陵区| 会理县| 景东| 陵川县| 宝鸡市| 保康县| 礼泉县| 洛扎县| 吉林省| 呼玛县| 海盐县| 修文县| 安阳市| 西昌市| 合山市| 嵊泗县| 新源县| 曲阳县| 武定县| 上饶县| 临海市| 平乡县| 榆林市| 高邮市| 开原市| 弥勒县| 阿拉善盟| 疏附县| 玉林市| 涿鹿县| 阜阳市| 金川县| 松桃| 兰考县| 南充市| 宽甸| 虹口区| 奈曼旗| 军事| 亳州市|