I have a strange behavior while using Criteria:
Everything is normal if I use this:
The criteria is sent with the DSRequest:
So that is the normal behavior: the "schultyp" criteria are sent.
But if I use this:
the criteria are NOT sent:
Why? Shouldn't it have the same behavior as above?
I am using SmartGWT 2.5 EE, and my DS is this:
I am using the criteria on a class that extends ListGrid
Thank you
Everything is normal if I use this:
Code:
Criteria c = new Criteria(); c.addCriteria("schultyp",schultyp); fetchData(c);
Code:
DEBUG RPCManager - Request #1 (DSRequest) payload: { criteria:{ schultyp:2 }, operationConfig:{ dataSource:"schuelerSimpleView", operationType:"fetch", textMatchStyle:"exact" }, startRow:0, endRow:75, sortBy:[ "f_name", "f_vorname", "f_geb_datum" ], componentId:"isc_SchuelerListGrid_0", appID:"builtinApplication", operation:"schuelerSimpleView_fetch", oldValues:{ schultyp:2 } }
But if I use this:
Code:
Criteria c = new Criteria(); c.addCriteria("schultyp",schultyp); setCriteria( c ); fetchData();
Code:
Request #1 (DSRequest) payload: { criteria:{ }, operationConfig:{ dataSource:"schuelerSimpleView", operationType:"fetch", textMatchStyle:"exact" }, startRow:0, endRow:75, sortBy:[ "f_name", "f_vorname", "f_geb_datum" ], componentId:"isc_SchuelerListGrid_0", appID:"builtinApplication", operation:"schuelerSimpleView_fetch", oldValues:{ }
I am using SmartGWT 2.5 EE, and my DS is this:
Code:
<DataSource ID="schuelerSimpleView" serverType="sql" tableName="t_schueler" > <fields> <field name="f_schueler_id" type="integer" primaryKey="true" /> <field name="f_name" type="text" required="true" /> <field name="f_vorname" type="text"/> <field name="f_geb_datum" type="date" required="true"/> <field name="schultyp" type="integer" /> </fields> </operationBindings> </DataSource>
Thank you
Comment