달력

112019  이전 다음

  •  
  •  
  •  
  •  
  •  
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30

Extjs 2.2.1 을 다운로드 받아서 트리메뉴와 layout 을 이용하려고 했다.

TreeMenu 를 구성하는 데이터는 XML 을 이용함.

그러나!!!! 의도된 동작이 일어나지 않음.

FireBug 를 동원하여 에러분석 돌입.

FireBug 에서는 405 Method Not Allowed  에러 메시지 출력.

그래서... Xml을 읽어오는 TreeLoader 에 옵션으로 아래와 같이 설정.

requestMethod:'GET'

동작 잘 한다...


아래는 ExtJS 에서 제공하는 XmlTreeLoader 샘플 Javascript 파일이다.

붉은 글씨를 유의하여 보면 됨.

 
/*
 * Ext JS Library 2.2.1
 * Copyright(c) 2006-2009, Ext JS, LLC.
 * licensing@extjs.com
 *
 * http://extjs.com/license
 */


//
// Extend the XmlTreeLoader to set some custom TreeNode attributes specific to our application:
//
Ext.app.BookLoader = Ext.extend(Ext.ux.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 = '<i>Select a book to see more information...</i>';
   
 var tpl = new Ext.Template(
        '<h2 class="title">{title}</h2>',
        '<p><b>Published</b>: {published}</p>',
        '<p><b>Synopsis</b>: {innerText}</p>',
        '<p><a href="{url}" target="_blank">Purchase from Amazon</a></p>'
 );
    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.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
        }]
    });
});




Posted by Tornado tornado

댓글을 달아 주세요

  1. 이전 댓글 더보기
  2. Favicon of http://www.rovinenergy.com/uploads/info.php? BlogIcon ugg brasil  댓글주소 수정/삭제 댓글쓰기 2014.08.23 19:23

    마에,abercrombie fitch
    it is understood, "daily inspection monthly review" is a supervision and inspection mechanism of urban and rural "clean project" the implementation,abercrombie brasil, by the city sanitation department inspection guidance, and solid waste management station together constitute the "daily inspection monthly review" inspection team,air max bw, check the contents include: street 부간

  3. Favicon of http://www.rovinenergy.com/uploads/info.php?bota-ugg/ BlogIcon bota ugg  댓글주소 수정/삭제 댓글쓰기 2014.08.24 01:10

    있를accelerated the process of comprehensive revitalization of Shenyang, Shenyang municipal Party committee, City Hall innovative development ideas,アグオーストラリア, and actively implement the Scientific Outlook on Development, from a strategic height of global development of Shenyang city made a major decision: to create a national ecological city, make the economic and social development and ecological env일조

  4. Favicon of http://www.equipostos.com/banner.php?polo-abercrombie/ BlogIcon polo abercrombie  댓글주소 수정/삭제 댓글쓰기 2014.08.25 00:28

    일이[complaint] at the "dual core" machine, fittings is out of date



    [survey] the low water high,ugg boots brasil, even two times






    and the reporter in accordance with Mr. Chen open quotation parts name, search the Internet price after each addition,ugg ブーツ, found the overall price is still lower than Mr. Chen the "lowest price". In addition, Dalian a home appliance store business 버립

  5. Favicon of http://www.equipostos.com/banner.php?holister/ BlogIcon holister  댓글주소 수정/삭제 댓글쓰기 2014.08.25 03:31

    메지,polo abercrombie
    57 year old jade spring from the beginning of 1997 to the "God" for the students,air max pas cher, more than ten years,air max 90, the "cattle" stayed with him through rain and wind.








    [


    [trainee editor: Li Wanran]
    ,abercrombie & fitch;







    reporter in the National Street Primary School in hospital Xihe District "Shenniu" centralized collecti조분

  6. Favicon of http://www.equipostos.com/banner.php? BlogIcon camisetas abercrombie  댓글주소 수정/삭제 댓글쓰기 2014.08.26 13:10

    간스eat, USA,air max one femme, stopped, although busy for at least half an hour, The village have a car," There is no collective economy Nan Tan Cun, name is called li.
    The right hand with a piece of table,abercrombie, Zhang did not feel what anomaly. mediation by the court, The doctor Banfu rushed to the hospital,air max 1 pas cher, from eighteen seventeen to twenty-two fifty-two overtime. bills리어

  7. Favicon of http://www.equipostos.com/banner.php?blusas-hollister-feminina/ BlogIcon blusas hollister feminina  댓글주소 수정/삭제 댓글쓰기 2014.08.26 16:56

    히로Harbin Dalian passenger dedicated line


    ,ugg メンズ










    Harbin Dalian passenger dedicated line with


    Harbin Dalian Passenger Dedicated Railway






    new part for double line to open, built in parallel with the side of highway to Shenyang direction. Through the old city of Jinzhou, Dalian (nine) District,アグ ブーツ, Wafangdian City City,air max pas cher femme, 350 km per hou스니

  8. Favicon of http://www.equipostos.com/banner.php?blusas-hollister-feminina/ BlogIcon blusas hollister feminina  댓글주소 수정/삭제 댓글쓰기 2014.08.27 23:04

    가뉴the economic and social development of Liaoning to give greater support,アグ スリッポン, and promote the steady and rapid growth of local economy. 18, synchronous operation. shelf-life,air max 1, [ pay close attention to supervision and long-term mechanism construction,アグ ブーツ, multi-level.
    the district security personnel management responsibilities. especially the wedding set "Hi guns". can enjoy the어선

  9. Favicon of http://www.memmusic.it/category/spaccio-woolrich/ BlogIcon spaccio woolrich  댓글주소 수정/삭제 댓글쓰기 2014.08.28 17:01

    상지If you are a fashion savvy mom to be,fitflop shoes, Becoming Mothers is worth the trip. This upscale maternity boutique is dedicated to customer service,moncler sito ufficiale, and the merchandise turns out what the clients want. By limiting the store brands,converse soldes, Becoming Mothers is able to ensure high quality maternity clothes that are stylish,piumini moncler prezzi, but still comfort단니

  10. Favicon of http://www.rosedeiventi.it/category/peuterey-on-line/ BlogIcon peuterey on line  댓글주소 수정/삭제 댓글쓰기 2014.08.28 17:24

    메를Personal shoppers and stylists aren just for celebrities. You too can experience the personalized one on one star style treatment right here in Pittsburgh. Whether your wardrobe needs a revival or you crave a runway look,piumini moncler spaccio, you can affordably and conveniently get the style you desire with a little help from a local personal stylist or shopper.

    So we have a bandeau top fro분던

  11. Favicon of http://www.memmusic.it/category/woolrich/ BlogIcon woolrich  댓글주소 수정/삭제 댓글쓰기 2014.08.28 19:36

    있조But when modern shopping malls began to pop up, most of the department stores closed or moved away,sac lancel, leading to the neighborhood decline. In 1970,nike tn 2014, to compete with the big malls,16-13-3208,air max pas cher pour homme,8-14-131869, officials elected to turn Saint Roch main promenade into a covered mall. Bad idea: The entire area became desolate and run down; the covered mall sh간에

  12. Favicon of http://www.memmusic.it/category/woolrich-shop-online/ BlogIcon woolrich shop online  댓글주소 수정/삭제 댓글쓰기 2014.08.28 21:12

    정이Dredge chops in flour mixture. Cook until golden brown,escarpins louboutins pas cher, 14 to 16 minutes,8-14-11643,fitflop shoes, turning halfway through. Transfer to a plate; set aside.. Surely Kunkle horoscope for this week was something along the lines of will be a center of attention. been unreal,bottes louboutin, he said Friday afternoon,moncler bambino, estimating that he has received more던이

  13. Favicon of http://www.rosedeiventi.it/ BlogIcon peuterey outlet  댓글주소 수정/삭제 댓글쓰기 2014.08.28 22:12

    를뉴He thought they were firecrackers, set off by teenagers celebrating the nice weather.not very familiar with guns or gunshots,jimmy choo uk, said the 42 year old,16-26-574962, who lives on Rennick Rd. In west Moncton with his wife,Sac Michael Kors Homme Pas Cher, four year old son and two year old twin boys.Then Njoku heard the sirens,9-14-982390, and five more shots.seemed like we were in danger,w지리

  14. Favicon of http://www.memmusic.it/category/woolrich-uomo/ BlogIcon woolrich uomo  댓글주소 수정/삭제 댓글쓰기 2014.08.28 22:38

    있니In the chapel of Giddens Reed Funeral Home, 270 US Hwy 301 North,chaussure pas cher femme, Baldwin,nike tn soldes, FL with Fr. Jose Kutathinal officiating. The family will receive friends 1 hour before service at the funeral home. They truly know what they are talking about, and they actually care about you. They really helped put my nerves at ease. Thank you so much!!!!Los Angeles, CAI couldn't b그데

  15. Favicon of http://www.ccbclab.it/category/moncler-bambino/ BlogIcon moncler bambino  댓글주소 수정/삭제 댓글쓰기 2014.08.29 01:55

    립단Because my weekly earnings as a personal support worker are not enough, I also work as a home maker for the same agency. This is work that is funded differently by the province. So I actually make more when I do that more for cleaning than for taking care of people.

    We are still in the early stages of setting up articles and pages so please do stay with us whilst we build up the blog so that i지있

  16. Favicon of http://www.matsuzawa-clinic.com/hogan.asp?hogan-online/ BlogIcon hogan online  댓글주소 수정/삭제 댓글쓰기 2014.08.29 02:00

    단메A hardy perennial, it grows to 6 feet. It's best in sun to keep the long stalks upright. It tolerates moisture.. Grill all your foods to perfection at the optimum temperature using the compact easy to read Taylor Grill Surface Thermometer ($9.95) which you place directly on the grill grates. Top off your burgers and dogs with your favorite fixins' served in the adorably kitschy BBQ Condiment Set (마가

  17. Favicon of http://www.memmusic.it/category/woolrich-sito-ufficiale/ BlogIcon woolrich sito ufficiale  댓글주소 수정/삭제 댓글쓰기 2014.08.29 02:51

    지단Between them,outlet peuterey, the two editors are rewriting the rules of weekly women's magazines. Goodbye weekly knitting patterns,louboutin uk outlet, scone recipes, and heartwarming tales of life's hurdles overcome plucky little Freddy beats cancer,pjs pas cher, handsome fireman Bruce marries girl he saves from burning house hello royal sex scandals and saucy celebrity snaps. Think Fergie 할부

  18. Favicon of http://www.memmusic.it/ BlogIcon woolrich  댓글주소 수정/삭제 댓글쓰기 2014.08.29 03:19

    던는Be honest and identify your true body type. Using Coulter's guide for the five body types,piumini woolrich, choose the figure that most closely matches your physique. Each body type has a goal to create balance and accentuate the best features. Their online store has some of the sexiest swimwear on the market. This year they are selling one of this summer's newest swimsuits called the monokini. Th스련

  19. Favicon of http://www.rosedeiventi.it/category/peuterey-torino/ BlogIcon peuterey torino  댓글주소 수정/삭제 댓글쓰기 2014.08.29 05:32

    지의My wife and I thought we'd give it a try over the weekend and were far from disappointed. The atmosphere was quiet but nice. I ordered the braised beef cheeks which were absolutely sensational. Is asking for its fourth rate increase in as many years,parajumpers jacka, one that would raise distribution charges to residents getting both gas and electric service by nearly $15 a month on average. The 한에

  20. Favicon of http://www.ccbclab.it/ BlogIcon piumini moncler  댓글주소 수정/삭제 댓글쓰기 2014.08.29 06:11

    버일First is Miss Oklahoma,parajumpers jacka, who believes Miley Cyrus was not really twerky and that it was not tasteful,9-1-586293,jimmy choo designer, but respects her creativity. Miss Minnesota believes that when you make a commitment to someone,escarpins louboutin, it's for life, and even though a husband cough Anthony Weiner cough is caught sexting,jimmy choo purse,9-6-759670, she should stand b로단

  21. Favicon of http://www.memmusic.it/category/woolrich-donna/ BlogIcon woolrich donna  댓글주소 수정/삭제 댓글쓰기 2014.08.29 06:47

    가지Fear is a great motor. It's the greatest motor. The greatest things are done through a sense of adrenaline fuelled fear,peuterey outlet, I think. Morning sickness remediesMorning sickness just isn't fair. Just when you need to eat smarter and better than ever before, food is about as appealing as a ride on a tilt a whirl. You feel sick, get sick and are sick.

    Improved treatment of Helicobacter메방