不做浮躁的人
          正在行走的人...
          posts - 171,  comments - 51,  trackbacks - 0

          TreeSelector繼承于HtmlWidget,其作用主要是處理Tree的Select的功能。
          1:具有selectedNode的屬性
          2:默認的事件名有:
          eventNamesDefault: {
          ??select : "select",
          ??destroy : "destroy",
          ??deselect : "deselect",
          ??dblselect: "dblselect" // select already selected node.. Edit or whatever
          ?},
          3:注意這段代碼:eventNames的值。
          initialize: function() {

          ??for(name in this.eventNamesDefault) {
          ???if (dojo.lang.isUndefined(this.eventNames[name])) {
          ????this.eventNames[name] = this.widgetId+"/"+this.eventNamesDefault[name];
          ???}
          ??}

          ?},
          4:監聽樹的事件:
          listenTree: function(tree) {
          ??//標題和圖標的click都綁定到Selector的select事件。
          ??dojo.event.topic.subscribe(tree.eventNames.titleClick, this, "select");
          ??dojo.event.topic.subscribe(tree.eventNames.iconClick, this, "select");

          ??dojo.event.topic.subscribe(tree.eventNames.collapse, this, "onCollapse");
          ??dojo.event.topic.subscribe(tree.eventNames.moveFrom, this, "onMoveFrom");
          ??dojo.event.topic.subscribe(tree.eventNames.removeNode, this, "onRemoveNode");
          ??dojo.event.topic.subscribe(tree.eventNames.treeDestroy, this, "onTreeDestroy");

          ??/* remember all my trees to deselect when element is movedFrom them */
          ??this.listenedTrees.push(tree);
          ?},

          5:

          posted on 2006-11-22 23:47 不做浮躁的人 閱讀(1618) 評論(0)  編輯  收藏

          只有注冊用戶登錄后才能發表評論。


          網站導航:
           

          <2006年11月>
          2930311234
          567891011
          12131415161718
          19202122232425
          262728293012
          3456789

          常用鏈接

          留言簿(9)

          隨筆分類(31)

          隨筆檔案(75)

          文章分類(1)

          文章檔案(3)

          搜索

          •  

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 长阳| 连山| 鸡东县| 许昌市| 宕昌县| 舞阳县| 盐津县| 崇仁县| 南丹县| 固安县| 化德县| 微山县| 丹江口市| 太白县| 南岸区| 余庆县| 永福县| 贵阳市| 万源市| 田东县| 东阿县| 土默特左旗| 湘潭市| 灌南县| 兴城市| 安塞县| 南陵县| 搜索| 慈利县| 石柱| 长宁区| 留坝县| 垣曲县| 米林县| 永济市| 崇明县| 凌云县| 汉源县| 当雄县| 疏勒县| 福海县|