my requirement create tree using dojo. of on-line tutorials created tree. have display folders(no files). suggestions how can filter in dojo folder can displayed not files inside folder.
root folder1 folder2 test.txt --this should not visible when users clicks on folder2. folder3 test2.log --this should not visible when users clicks on folder3. , on...
what can override buildmodel of tree you're using. create own widget extending dijit/tree following function in there:
_buildmodel: function() { var model = new objectstoremodel({ store: this._store, //this can changed whatever store need mayhavechildren: function(item) { return item.type !== "folder"; //you can use whatever identifiers need }, query: { id: 'root' } }); }
and in buildrendering stage, this:
buildrendering: function () { this.inherited(arguments); this.model = this._buildmodel(); }
Comments
Post a Comment