1. #1
    Ext User
    Join Date
    Aug 2008
    Posts
    5
    Vote Rating
    0
    swemaniac is on a distinguished road

      0  

    Default TreePanel + Xml Web Services On Demand (Example)

    TreePanel + Xml Web Services On Demand (Example)


    Look, this is something I've been trying to figure out for some time and I just found a way to make extjs treepanel to load nodes on-demand directly from an asp.net xml web service (that's xml, not json, json + web services ehh kinda iffy). I just thought I'd share it with anyone else who wants this to work. You need XmlTreeLoader.js from the examples.

    Web service:
    Code:
    [WebMethod]
    [ScriptMethod]
    public XmlNode GetNodes(int node)
    {
        //get nodes from db etc
        XmlDocument doc = new XmlDocument();
        doc.LoadXml("<nodes><node id=\"2\" text=\"the node\" expanded=\"false\"/><node id=\"3\" text=\"another node\" expanded=\"false\"/></nodes>");
        return doc.ChildNodes[0];
    }
    Script:
    Code:
    //....
    treeView = new Ext.tree.TreePanel({
                loader: new Ext.ux.XmlTreeLoader({dataUrl:'Service.asmx/GetNodes'})
            });
    // other attrs...
    Sorry if this isn't something new..
    Last edited by swemaniac; 11 Jan 2009 at 10:14 AM. Reason: moved to Examples from 2.x Help

  2. #2
    Ext User apimio's Avatar
    Join Date
    Sep 2008
    Posts
    13
    Vote Rating
    0
    apimio is on a distinguished road

      0  

    Default More Question

    More Question


    Nice example, but is no working to me.
    Can you send a extended example, because the treeview is not loading data.

    Thank's a lot for your help!

  3. #3
    Ext User apimio's Avatar
    Join Date
    Sep 2008
    Posts
    13
    Vote Rating
    0
    apimio is on a distinguished road

      0  

    Default It works!

    It works!


    Thank's anyway ..this is working now .. I had to work a litle, but is working .
    Nice example, but you must explain more thing to cover novices like me.

    byte!

  4. #4
    Ext User
    Join Date
    May 2009
    Posts
    19
    Vote Rating
    0
    maxdiable is on a distinguished road

      0  

    Default web service treepanle

    web service treepanle


    it's possibile to have an examples?

    my email is: maxdiable@hotmail.com

    help me

Thread Participants: 2

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi