In SmartGWT 2.4 I have simple ListGrid with JSON datasource and filterEditor. I have Text column and Date column in list. Strange behaviour:
a)
When I keep ListGrid.autoFetchTextMatchStyle to default value ('substring').
I filter in text column and correct AdvacedCriteria are created with iContains and value stay in filter row - expected
b)
When I set ListGrid.autoFetchTextMatchStyle to 'startsWith'.
Then I filter in textcolumn of ListGrid correct AdvacedCriteria are created with iStartsWith but value DISAPPEAR from filter row - why?
c)
When I hide DateField (just by right clicking listgrid header ...) correct simple criteria are created and value stay
I would like to make b) case running. I need to send 'startWith' to server and keep value showed in filterRow. Is it unsupported case?
Thank you
Pavel
a)
When I keep ListGrid.autoFetchTextMatchStyle to default value ('substring').
I filter in text column and correct AdvacedCriteria are created with iContains and value stay in filter row - expected
b)
When I set ListGrid.autoFetchTextMatchStyle to 'startsWith'.
Then I filter in textcolumn of ListGrid correct AdvacedCriteria are created with iStartsWith but value DISAPPEAR from filter row - why?
c)
When I hide DateField (just by right clicking listgrid header ...) correct simple criteria are created and value stay
I would like to make b) case running. I need to send 'startWith' to server and keep value showed in filterRow. Is it unsupported case?
Thank you
Pavel
Code:
===============
RPCRequest for case a)
{
"actionURL":"/service",
"showPrompt":true,
"prompt":"Vyberam data .... pockajte chvilku",
"transport":"xmlHttpRequest",
"useSimpleHttp":true,
"promptStyle":"cursor",
"params":{
"operator":"and",
"_constructor":"AdvancedCriteria",
"criteria":[
{
"fieldName":"ico",
"operator":"iContains",
"value":"789"
}
],
"_operationType":"fetch",
"_startRow":0,
"_endRow":50,
"_textMatchStyle":"substring",
"_componentId":"mainListGrid",
"_dataSource":"dPPO2010Service",
"isc_metaDataPrefix":"_",
"isc_dataFormat":"json"
},
"httpMethod":"GET",
"sendNoQueue":true,
"bypassCache":true,
"callback":{
"target":[RestDataSource ID:dPPO2010Service]
},
"willHandleError":true,
"serverOutputAsString":true,
"clientContext":{
"requestIndex":1,
"$69t":null
},
"data":null
}
===============
RPCRequest for case b)
{
"actionURL":"/service",
"showPrompt":true,
"prompt":"Vyberam data .... pockajte chvilku",
"transport":"xmlHttpRequest",
"useSimpleHttp":true,
"promptStyle":"cursor",
"params":{
"operator":"and",
"_constructor":"AdvancedCriteria",
"criteria":[
{
"fieldName":"ico",
"operator":"iStartsWith",
"value":"123"
}
],
"_operationType":"fetch",
"_startRow":0,
"_endRow":50,
"_textMatchStyle":"startsWith",
"_componentId":"mainListGrid",
"_dataSource":"dPPO2010Service",
"isc_metaDataPrefix":"_",
"isc_dataFormat":"json"
},
"httpMethod":"GET",
"sendNoQueue":true,
"bypassCache":true,
"callback":{
"target":[RestDataSource ID:dPPO2010Service]
},
"willHandleError":true,
"serverOutputAsString":true,
"clientContext":{
"requestIndex":1,
"$69t":null
},
"data":null
}
===============
RPCRequest for case c)
{
"actionURL":"/service",
"showPrompt":true,
"prompt":"Vyberam data .... pockajte chvilku",
"transport":"xmlHttpRequest",
"useSimpleHttp":true,
"promptStyle":"cursor",
"params":{
"ico":"456",
"_operationType":"fetch",
"_startRow":0,
"_endRow":50,
"_textMatchStyle":"startsWith",
"_componentId":"mainListGrid",
"_dataSource":"dPPO2010Service",
"isc_metaDataPrefix":"_",
"isc_dataFormat":"json"
},
"httpMethod":"GET",
"sendNoQueue":true,
"bypassCache":true,
"callback":{
"target":[RestDataSource ID:dPPO2010Service]
},
"willHandleError":true,
"serverOutputAsString":true,
"clientContext":{
"requestIndex":1,
"$69t":null
},
"data":null
}
Comment