不做浮躁的人
          正在行走的人...
          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)

          搜索

          •  

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 安乡县| 博爱县| 青岛市| 都兰县| 四会市| 泰州市| 云龙县| 方城县| 长沙县| 彭山县| 大方县| 巴林左旗| 玉环县| 松阳县| 安泽县| 通道| 朝阳区| 清水县| 革吉县| 祁阳县| 鹤峰县| 临西县| 昌黎县| 蒲江县| 花垣县| 富锦市| 盐亭县| 彰武县| 三穗县| 武川县| 南乐县| 贡嘎县| 兴山县| 铜梁县| 东丽区| 永济市| 建阳市| 福贡县| 临沧市| 澄江县| 安顺市|