I'm trying to modify the Finder demo to insert a "SearchAsyouType" textfield
to search through the full model. 
I don't want  to live-filter the List contents, but I would like a live
popup holding a list of all the node containing the string in the textfield.
The user would click on a row of the popup and finally the correct node (at
arbitrary level) would be selected in the lists.


I thought it would be necessary to linearize the model in a list of
"fullpath-element". So I tried to navigate the model from
json.Store.getModel(). 

Example of linearization: 

User/All/Adobe

User/All/Parallels

User/mw/Documents

...


I tried:

var files = model.getFiles();

console.log (model.getName(), files);


Firebug prints an array containing 5 undefined values: 

root [undefined, undefined, ... ]

The actual elements are contained in a private array property called 
__array__ 


var files = model.getFiles().__array__;

console.log (model.getName(), files);


Now the correct (I guess) elements are printed: 

root [qx.data.model.files"name[6371] { $$hash="6371",  more...}, ... ]


Is there something wrong about the Json store implementation?

Am I using a wrong approach?

-- 
View this message in context: 
http://qooxdoo.678.n2.nabble.com/Linearize-a-JsonStore-model-tp5174671p5174671.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