<span id="mktg5"></span>

<i id="mktg5"><meter id="mktg5"></meter></i>

        <label id="mktg5"><meter id="mktg5"></meter></label>
        最新文章專題視頻專題問答1問答10問答100問答1000問答2000關鍵字專題1關鍵字專題50關鍵字專題500關鍵字專題1500TAG最新視頻文章推薦1 推薦3 推薦5 推薦7 推薦9 推薦11 推薦13 推薦15 推薦17 推薦19 推薦21 推薦23 推薦25 推薦27 推薦29 推薦31 推薦33 推薦35 推薦37視頻文章20視頻文章30視頻文章40視頻文章50視頻文章60 視頻文章70視頻文章80視頻文章90視頻文章100視頻文章120視頻文章140 視頻2關鍵字專題關鍵字專題tag2tag3文章專題文章專題2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章專題3
        問答文章1 問答文章501 問答文章1001 問答文章1501 問答文章2001 問答文章2501 問答文章3001 問答文章3501 問答文章4001 問答文章4501 問答文章5001 問答文章5501 問答文章6001 問答文章6501 問答文章7001 問答文章7501 問答文章8001 問答文章8501 問答文章9001 問答文章9501
        當前位置: 首頁 - 科技 - 知識百科 - 正文

        ExtJs3.1XmlTreeLoaderExampleError_extjs

        來源:懂視網 責編:小采 時間:2020-11-27 20:47:13
        文檔

        ExtJs3.1XmlTreeLoaderExampleError_extjs

        ExtJs3.1XmlTreeLoaderExampleError_extjs:前言 關鍵字:ExtJs 3.1 XmlTreeLoader Example Error,XmlTreeLoader 錯誤,TreePanel Error ExtJs 3.1的XmlTreeLoader例子折騰了我近一個下午加晚上,官方的例子沒有問題,可以加載xml的數據,本地IIS死活不行,也不報錯,直接查看官方的代碼也是一模
        推薦度:
        導讀ExtJs3.1XmlTreeLoaderExampleError_extjs:前言 關鍵字:ExtJs 3.1 XmlTreeLoader Example Error,XmlTreeLoader 錯誤,TreePanel Error ExtJs 3.1的XmlTreeLoader例子折騰了我近一個下午加晚上,官方的例子沒有問題,可以加載xml的數據,本地IIS死活不行,也不報錯,直接查看官方的代碼也是一模

        前言
          關鍵字:ExtJs 3.1 XmlTreeLoader Example Error,XmlTreeLoader 錯誤,TreePanel Error

          ExtJs 3.1的XmlTreeLoader例子折騰了我近一個下午加晚上,官方的例子沒有問題,可以加載xml的數據,本地IIS死活不行,也不報錯,直接查看官方的代碼也是一模一樣的,今早意外給讓我搜到了,不是在官方,而是在貌似一個韓國的博客里面找到的,致敬一下,本文且做其簡單中文"譯"本。

        原文
          http://javarush.com/entry/ExtJS-XmlTreeLoader-Error

        正文

           1.  代碼位置:Ext3.1\examples\tree\xml-tree-loader.js

           2.  注意標紅新增代碼",requestMethod: 'GET'"!!
        代碼如下:
        /*!
        * Ext JS Library 3.1.0
        * Copyright(c) 2006-2009 Ext JS, LLC
        * licensing@extjs.com
        * http://www.extjs.com/license
        */

        //
        // Extend the XmlTreeLoader to set some custom TreeNode attributes specific to our application:
        //
        Ext.app.BookLoader = Ext.extend(Ext.ux.tree.XmlTreeLoader, {
        processAttributes : function(attr){
        if(attr.first){ // is it an author node?

        // Set the node text that will show in the tree since our raw data does not include a text attribute:
        attr.text = attr.first + ' ' + attr.last;

        // Author icon, using the gender flag to choose a specific icon:
        attr.iconCls = 'author-' + attr.gender;

        // Override these values for our folder nodes because we are loading all data at once. If we were
        // loading each node asynchronously (the default) we would not want to do this:
        attr.loaded = true;
        attr.expanded = true;
        }
        else if(attr.title){ // is it a book node?

        // Set the node text that will show in the tree since our raw data does not include a text attribute:
        attr.text = attr.title + ' (' + attr.published + ')';

        // Book icon:
        attr.iconCls = 'book';

        // Tell the tree this is a leaf node. This could also be passed as an attribute in the original XML,
        // but this example demonstrates that you can control this even when you cannot dictate the format of
        // the incoming source XML:
        attr.leaf = true;
        }
        }
        });

        Ext.onReady(function(){

        var detailsText = 'Select a book to see more information...';

        var tpl = new Ext.Template(
        '

        {title}

        ',
        '

        Published: {published}

        ',
        '

        Synopsis: {innerText}

        ',
        '

        Purchase from Amazon

        '
        );
        tpl.compile();

        new Ext.Panel({
        title: 'Reading List',
        renderTo: 'tree',
        layout: 'border',
        width: 500,
        height: 500,
        items: [{
        xtype: 'treepanel',
        id: 'tree-panel',
        region: 'center',
        margins: '2 2 0 2',
        autoScroll: true,
        rootVisible: false,
        root: new Ext.tree.AsyncTreeNode(),

        // Our custom TreeLoader:
        loader: new Ext.app.BookLoader({
        dataUrl:'xml-tree-data.xml'
        ,requestMethod: 'GET'
        }),

        listeners: {
        'render': function(tp){
        tp.getSelectionModel().on('selectionchange', function(tree, node){
        var el = Ext.getCmp('details-panel').body;
        if(node && node.leaf){
        tpl.overwrite(el, node.attributes);
        }else{
        el.update(detailsText);
        }
        })
        }
        }
        },{
        region: 'south',
        title: 'Book Details',
        id: 'details-panel',
        autoScroll: true,
        collapsible: true,
        split: true,
        margins: '0 2 2 2',
        cmargins: '2 2 2 2',
        height: 220,
        html: detailsText
        }]
        });
        });

        結束語

          不要放棄和接受一次失敗的搜索,不斷的嘗試改變搜索關鍵字,哪怕是用詞霸翻成英文也得努力去試試,看不懂不要緊,看懂代碼就行,代碼無國界: )

        聲明:本網頁內容旨在傳播知識,若有侵權等問題請及時與本網聯系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com

        文檔

        ExtJs3.1XmlTreeLoaderExampleError_extjs

        ExtJs3.1XmlTreeLoaderExampleError_extjs:前言 關鍵字:ExtJs 3.1 XmlTreeLoader Example Error,XmlTreeLoader 錯誤,TreePanel Error ExtJs 3.1的XmlTreeLoader例子折騰了我近一個下午加晚上,官方的例子沒有問題,可以加載xml的數據,本地IIS死活不行,也不報錯,直接查看官方的代碼也是一模
        推薦度:
        • 熱門焦點

        最新推薦

        猜你喜歡

        熱門推薦

        專題
        Top
        主站蜘蛛池模板: 中文字幕亚洲图片| 精品久久久久久久免费人妻| 国产成人高清亚洲| 一级成人生活片免费看| 啊灬啊灬别停啊灬用力啊免费看| 亚洲av片在线观看| 国产又大又粗又硬又长免费| 国产亚洲精品美女2020久久| 免费国产不卡午夜福在线 | 亚洲熟妇av一区| 91久久精品国产免费一区| 亚洲美女中文字幕| 免费不卡视频一卡二卡| 亚洲男同gay片| 亚洲国产成人影院播放| 国产在线播放线91免费 | 亚洲成A∨人片在线观看无码| 国产免费的野战视频| 国产成+人+综合+亚洲专| 日韩激情淫片免费看| 美女被免费网站视频在线| 亚洲午夜精品一级在线播放放| 久久久久女教师免费一区| 亚洲小视频在线观看| 2021免费日韩视频网| 日韩在线视精品在亚洲| 亚洲色成人网站WWW永久| 最近中文字幕mv免费高清视频8| 亚洲人成网网址在线看| 啊v在线免费观看| 免费一级不卡毛片| 亚洲中文字幕无码mv| 狠狠色婷婷狠狠狠亚洲综合| 5555在线播放免费播放| 爱情岛亚洲论坛在线观看| 亚洲成年轻人电影网站www| 免费无码黄动漫在线观看| 免费无码H肉动漫在线观看麻豆| 亚洲日本国产精华液| 内射无码专区久久亚洲| 91av免费观看|