1. #1
    Ext User
    Join Date
    Jan 2008
    Posts
    4
    Vote Rating
    0
    TheLord is on a distinguished road

      0  

    Question Populating Tree with XML File

    Populating Tree with XML File


    Hi there,
    got some problems filling a Tree Store by xml using the XmlReader.

    Code:
    Tree tree = new Tree();
    
    RequestBuilder builder = new RequestBuilder(RequestBuilder.GET,"xml/readEPG.xml");
    final HttpProxy proxy = new HttpProxy(builder);
    
    ModelType type = new ModelType();
    type.root = "demo";
    type.recordName = "item";
    type.addField("title");
    type.addField("starttime");
    		
    // need a loader, proxy, and reader
    XmlReader reader = new XmlReader(type);
    final BaseTreeLoader loader = new BaseTreeLoader(proxy, reader);
    		
    final TreeStore<ModelData> store = new TreeStore<ModelData>(loader);
    
    TreeBinder binder = new TreeBinder(tree, store);
    binder.setAutoLoad(true);
    binder.setDisplayProperty("title");
    I tried this with a ListStore and a ListStoreLoader, it works: store.getCount() > 0
    But what do I have to change to fill the TreeStore? (store.getChildCount() = 0 )

  2. #2
    Ext User
    Join Date
    Jan 2008
    Posts
    4
    Vote Rating
    0
    TheLord is on a distinguished road

      0  

    Default


    I think I need just a little tip... should be easy, shoudln't it?

  3. #3
    Ext User
    Join Date
    Nov 2008
    Posts
    75
    Vote Rating
    0
    jmhwhite2001 is on a distinguished road

      0  

    Default


    Look at thread:

    http://extjs.com/forum/showthread.php?t=54722

    Instead of using the HTTPProxy, use the Request and put your code snippet in the "onRequestReceived" method. that might get you going...I'm working the same issues.

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar