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

          接上面,繼續(xù)討論TreeRPCController。該類在TreeLoadingController上擴(kuò)充了以下方法:
          1:doMove的部分代碼:
          var params = {
          ???//?移動(dòng)的節(jié)點(diǎn)以及節(jié)點(diǎn)所在的樹
          ???child: this.getInfo(child),
          ???childTree: this.getInfo(child.tree),
          ???//?移動(dòng)目的樹,目的節(jié)點(diǎn),以及目的位置。
          ???newParent: this.getInfo(newParent),
          ???newParentTree: this.getInfo(newParent.tree),
          ???newIndex: index
          ??};

          ??var success;

          ??this.runRPC({??
          ???url: this.getRPCUrl('move'),
          ???
          ???load: function(response){
          ????success = this.doMoveProcessResponse(response, child, newParent, index) ;
          ???},
          ???//同步處理
          ???sync: true,
          ???//鎖定操作的兩個(gè)節(jié)點(diǎn)。
          ???lock: [child, newParent],
          ???params: params
          ??});
          2:doRemoveNode
          ???var params = {
          ???node: this.getInfo(node),
          ???tree: this.getInfo(node.tree)
          ??}

          ??this.runRPC({
          ????url: this.getRPCUrl('removeNode'),
          ????load: function(response){
          ?????this.doRemoveNodeProcessResponse(response, node, callObj, callFunc)
          ????},
          ????params: params,
          ????lock: [node]
          ??});

          3:doCreateChild
          var params = {
          ????tree: this.getInfo(parent.tree),
          ????parent: this.getInfo(parent),
          ????index: index,
          ????data: output
          ???}

          ???this.runRPC({
          ????url: this.getRPCUrl('createChild'),
          ????load: function(response) {
          ?????//?建議采用死數(shù)據(jù)?
          ?????this.doCreateChildProcessResponse( response, parent, index, callObj, callFunc)
          ????},
          ????params: params,
          ????lock: [parent]
          ???});

          posted on 2006-11-22 23:19 不做浮躁的人 閱讀(800) 評(píng)論(0)  編輯  收藏

          只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。


          網(wǎng)站導(dǎo)航:
           

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

          常用鏈接

          留言簿(9)

          隨筆分類(31)

          隨筆檔案(75)

          文章分類(1)

          文章檔案(3)

          搜索

          •  

          最新評(píng)論

          閱讀排行榜

          評(píng)論排行榜

          主站蜘蛛池模板: 黎平县| 江山市| 中方县| 康平县| 田阳县| 墨脱县| 临城县| 枣强县| 滦南县| 新河县| 和平区| 山阳县| 甘洛县| 绿春县| 重庆市| 溆浦县| 德清县| 长治市| 乡城县| 普陀区| 彭阳县| 井冈山市| 哈巴河县| 铜梁县| 密山市| 贞丰县| 交城县| 尤溪县| 博白县| 察隅县| 镇沅| 浦东新区| 兴宁市| 裕民县| 通渭县| 兴义市| 苍梧县| 卢氏县| 招远市| 仙居县| 滦南县|