SmartClient Version: v9.0p_2013-08-20/EVAL Development Only
browser: Chrome
modify #filter sample like this:
then click 'Set Advanced Criteria'. Press 'Log criteria'.
Everything is working:
then, click 'Set empty Criteria'. Press 'Log criteria'.
Everything is working:
last, select a continent in the filter editor, say 'Asia'. Press 'filter' and then press 'Log criteria'.
This isn't right:
how did it resurrected former criteria:
?
browser: Chrome
modify #filter sample like this:
Code:
isc.ListGrid.create({ ID: "countryList", width:500, height:300, alternateRecordStyles:true, top:50, dataSource: worldDS, fields:[ {name:"countryCode", title:"Code", width:50}, {name:"countryName", title:"Country"}, {name:"capital", title:"Capital"}, {name:"continent", title:"Continent"}, {name:"population"} ], autoFetchData: true, showFilterEditor: true }) isc.IButton.create({ title:"Set Advanced Criteria", autoFit:true, click:function() { countryList.filterData({_constructor: "AdvancedCriteria", operator: "and", criteria: [ {fieldName: "population", operator: "greaterThan", value:10000000} ]}); } }) isc.IButton.create({ title:"Set empty Criteria", autoFit:true, left:150, click:function() { countryList.filterData(); } }) isc.IButton.create({ title:"Log Criteria", left:300, click:function () { isc.logEcho(isc.JSON.encode(countryList.getCriteria())) } })
Everything is working:
Code:
19:16:24.294:MUP8:WARN:Log:"{ "_constructor":"AdvancedCriteria", "operator":"and", "criteria":[ { "fieldName":"population", "operator":"greaterThan", "value":10000000, "_constructor":"AdvancedCriteria" } ] }"
Everything is working:
Code:
19:17:30.350:MUP4:WARN:Log:"{ }"
This isn't right:
Code:
19:19:19.871:MUP0:WARN:Log:"{ "_constructor":"AdvancedCriteria", "operator":"and", "criteria":[ { "fieldName":"population", "operator":"greaterThan", "value":10000000 }, { "fieldName":"continent", "operator":"equals", "value":"Asia" } ] }"
Code:
{ "fieldName":"population", "operator":"greaterThan", "value":10000000 }
Comment