ibm mobilefirst - How to sort items of EdgeToEdgeStoreList -


i built edgetoedgestorelist , works. want sort items or filter label. have setted parameter query :

var samplestore = new memory({data:listini_data, idproperty:"label"}); storeelencolistiniclienti = new edgetoedgestorelist({store:samplestore,query:{label:/1$/}}, "ulelencolistiniclienti"); storeelencolistiniclienti.startup(); 

but displays items , not label ending in '1'. why? how set correctly query parameter ordering items?

if use method:

storeordinicliente.setquery('label:/1$/'); 

this message displayed on browser's console:

error: no filter function label:/1$/ found in store 

this listini_data:

[object { label="1537 | imm | 14/07/2011", codice_ordine="16537", stato_ordine="imm", more...}, object { label="12790 | imm | 24/04/2012", codice_ordine="16790", stato_ordine="imm", more...}, object { ..... 

try this.filter label , order att. works me

var samplestore;         require([                  "dojo/store/memory",                  ], function(memory){             samplestore = new memory({data:ordini_cliente_data, idproperty:"label"});         });         var nl=samplestore.query({label:/1$/}, {sort: [{attribute: "att"}]});          storeordinicliente.generatelist(nl); 

Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

c# - must be a non-abstract type with a public parameterless constructor in redis -

ajax - PHP/JSON Login script (Twitter style) not setting sessions -