MartinWittemann wrote:
> 
> If you want to have just file icons for all leaves, something like [using
> a Delegate] could be a good idea. 
> 
I think it is the best solution that also lets taking advantage of the
theme. 


MartinWittemann wrote:
> 
> Another nice idea could be the icon binding depending on the length of the
> childrens array of your tree model. Bind the icon path the "kids.length"
> for example and write a converter for the icon binding which converts the
> number to the icon.
> 

Do you mean something like this?

// create the controller and connect it to the Tree view
var controller = new qx.data.controller.Tree (null, tree, "files", "name");
        
// set icon bindings to show file icon in leaves
controller.setIconPath ("files.length");
controller.setIconOptions ({converter: function (data, model) {
        return "icon/16/mimetypes/office-document.png";
}});

// create the data store and connect to controller
var url = "resource/qooxdogui/data/json/finder.json";
var store = this.__store = new qx.data.store.Json(url);
store.bind("model", controller, "model");


FireBug gives an error: 
- 011647 Assertion error! changeLength is not an data (qx.event.type.Data)
event 

I tried also with: controller.setIconPath ("files");
Error: Request qx.io.remote.Request[6278] handler _oncompleted threw an
error: No event could be found for the property: files

(files property is not defined for the model nodes with no children)
-- 
View this message in context: 
http://qooxdoo.678.n2.nabble.com/How-to-create-TreeFile-instead-of-TreeFolder-in-the-leaf-nodes-using-Tree-Controller-tp5181120p5185914.html
Sent from the qooxdoo mailing list archive at Nabble.com.

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to