<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 | 日韩毛片免费在线观看| 国产亚洲真人做受在线观看| 成全影视免费观看大全二| 亚洲成人午夜电影| 人碰人碰人成人免费视频| 一个人免费视频观看在线www| 久久经典免费视频| 亚洲欧美日韩久久精品| 日本免费的一级v一片| 美女视频黄a视频全免费网站色 | 亚洲色成人网一二三区| 黄色毛片免费观看| 亚洲高清无码在线观看| 亚洲精品中文字幕| www国产亚洲精品久久久日本| 日韩中文字幕免费| 羞羞视频在线免费观看| 国产亚洲AV夜间福利香蕉149| 亚洲国产精品无码久久98| 37pao成人国产永久免费视频| 午夜亚洲av永久无码精品 | 中文字幕中韩乱码亚洲大片| 免费无码一区二区三区蜜桃| 亚洲国产精品人久久| 永久免费av无码不卡在线观看 | 亚洲区精品久久一区二区三区| 亚洲 欧洲 日韩 综合在线| 日本免费一区二区三区最新| 国产精品永久免费| 免费一看一级毛片全播放| 亚洲偷自精品三十六区| 国产综合免费精品久久久| 亚洲成人免费在线观看| 无码中文字幕av免费放dvd| 亚洲日韩精品无码专区加勒比☆| 国产成人免费高清激情明星| 欧美亚洲精品一区二区| 亚洲AV成人片色在线观看高潮|