隨筆-9  評(píng)論-168  文章-266  trackbacks-0
          (一)PANEL面板加載JSP內(nèi)容

           var boardcenter = new Ext.Panel({
            id : 'boardcenter',
            autoLoad : {
             url : './informationbean/information.jsp'
            },

            title : '公告',
            region : 'north',
            html : '公告區(qū)測試內(nèi)容!'

           });




          (二)  直接用PANEL面板的LOAD方法更新內(nèi)容
          panelobject.load({
              url: "your-url.jsp", params: {param1: "foo", param2: "bar"}, // or a URL encoded string
              callback: yourFunction,
              scope: yourObject, // optional scope for the callback
              discardUrl: false,
              nocache: false,
              text: "Loading...",
              timeout: 30,
              scripts: false
          });


          (三)  以獲得其PANEL面板內(nèi)容對(duì)象,來更新面板內(nèi)容. 
          var detailcenter = new Ext.Panel({
            id:'detailcenter',
            height : 250,
            region : 'south',
            title : '內(nèi)容詳細(xì)區(qū)',
            html : '詳細(xì)內(nèi)容.'
           });


          //   fn : function() {// ----------------
          //
          //     var selNode = view.getSelectedNodes();
          //     // var detailEl = Ext.getCmp('img-detail-panel').body;
          //      if(selNode && selNode.length > 0){
          //     selNode = selNode[0];
          //     // Ext.getCmp('ok-btn').enable();
          //     // var data = this.lookup[selNode.id];
          //     // detailEl.hide();
          //     // this.detailsTemplate.overwrite(detailEl, data);
          //     // detailEl.slideIn('l', {stopFx:true,duration:.2});
          //     // }else{
          //     // Ext.getCmp('ok-btn').disable();
          //     // detailEl.update('');
          //     
          //
               var bd = Ext.getCmp('detailcenter').body; // 獲得panel主體內(nèi)容
               bd.update('').setStyle('background', '#fff'); // 清空panel內(nèi)容
               switch (nodetitle)
               {
               case '測試文章標(biāo)題1':bd.hide().update('測試文章標(biāo)題1').slideIn('0', {stopFx:true,duration:.2});break;
               default:bd.hide().update('測試文章標(biāo)題2').slideIn('l', {stopFx:true,duration:.2});break;
               }
          posted on 2008-08-21 12:24 紫蝶∏飛揚(yáng)↗ 閱讀(12773) 評(píng)論(3)  編輯  收藏 所屬分類: EXTJS

          評(píng)論:
          # re: EXT.PANEL面板加載和更新內(nèi)容[未登錄] 2009-04-22 11:29 | 1
          # re: EXT.PANEL面板加載和更新內(nèi)容 2011-06-07 14:35 | 紫蝶∏飛揚(yáng)↗
          自已回來復(fù)習(xí)哈...雖說現(xiàn)在EXTJS4了,但用起來還是沒EXTJS3順手.  回復(fù)  更多評(píng)論
            
          # re: EXT.PANEL面板加載和更新內(nèi)容 2011-09-07 15:50 | 路過
          nodetitle是指什么?我要更新的是同一面板的內(nèi)容。  回復(fù)  更多評(píng)論
            
          主站蜘蛛池模板: 延边| 新乐市| 云阳县| 喀喇沁旗| 万盛区| 会同县| 扶余县| 闸北区| 清水县| 监利县| 香港| 龙江县| 卢氏县| 高唐县| 嵊州市| 襄垣县| 满洲里市| 康保县| 北川| 宾川县| 樟树市| 察哈| 博爱县| 五大连池市| 犍为县| 吉林市| 昆明市| 吉安市| 大关县| 东台市| 永兴县| 福海县| 凤台县| 左贡县| 宜兰市| 霍林郭勒市| 滨州市| 海盐县| 上犹县| 象山县| 阜宁县|