Hi,

I have made the data integration with QxTree by the way of QxTreeFolder.
It seems to be easy and lets you load tree nodes only when the user
clicks on a tree folder.

I follow the suggestions made by Stefano Marocco at:
http://www.mail-archive.com/[email protected]/msg01311.html

Additionally, with this structure, you can load data from different XML
sources in the same tree :)


El mié, 25-01-2006 a las 13:44 -0800, Michael Wilson escribió:
> I'm trying to integrate the XML dataset that creates a treeview widget.
> I've gotten the code to "run" and it is getting data I just can't seem
> to get my subclassed treeview widget to actually show the folders that
> I'm adding.  Probably something obvious to the JS experts out there but
> it's not throwing any errors and I'm a bit of a newbie with it comes to
> the oo-esque model of JS.  
> 
> 
> <snip file="myTree.js">
> function myTree(vLable)
> {
>   QxTree.call(this, vLable);
>   
>   this.setBackgroundColor("white");
>   this.setBorder(QxBorderObject.presets.inset);
>   this.setOverflow("scrollY");
>   
>   this._ajax = new QxXmlHttpLoader();
>   
>   this._ajax.addEventListener('complete', function(e) {
>       // get result value
>       var xml = e.getNewValue();
>       
>       var n_pk_search = xml.selectNodes("//pk_search");
>       var n_str_name = xml.selectNodes("//str_name");
>       var n_str_description = xml.selectNodes("//str_description");
>       var n_str_where = xml.selectNodes("//str_where");
>       var n_str_notes = xml.selectNodes("//str_notes");
>       var n_n_last_count = xml.selectNodes("//n_last_count");
>       
>       for (var i=0; i < n_str_name.length; i++) {
>         alert(n_str_name[i].text);  // I can see that I get data back
>         var folder = new QxTreeFolder(n_str_name[i].text);  
>         QxTree.prototype.add.call(this.folder);  // folders never show
> up
>       }
>       QxWidget.flushGlobalQueues();
>     });
>     
>   this.debug("myTree retrieving parent search folders...");
>   this._ajax.load('http://webservice:8080/foo');
> 
>   
> }
> 
> myTree.extend(QxTree, "myTree");
> 
> </snip>
> 
> Thanks.
> 
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642
> _______________________________________________
> Qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
-- 
Salut,
====================================
Ricardo Borillo Domenech
Analista/Programador - Servei d'Informàtica
Universitat Jaume I
http://xml-utils.com

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to