Hello,
(SmartGWT 3.0 release)
I am building a public webservice (in a servlet, to provide an API to my SmartGWT app for external apps to pull some data from my app), that makes use of the (offline) DSRequest/DSResponse to fetch the data from my MySQL Table, and return JSON in a certain way.
I want to be able to specify ordering programmatically. How to do this?
I tried:
But this doesn't seem to work, that is, in the generated query I don't see ORDER BY <field1>, ... etc.
My operationbinding does not have a <orderBy> clause set, so it should use these sorts, right?
Also, I could not find how I could specify the Sort Order (ASC or DESC)
(SmartGWT 3.0 release)
I am building a public webservice (in a servlet, to provide an API to my SmartGWT app for external apps to pull some data from my app), that makes use of the (offline) DSRequest/DSResponse to fetch the data from my MySQL Table, and return JSON in a certain way.
I want to be able to specify ordering programmatically. How to do this?
I tried:
Code:
List<String> sorts = new ArrayList<String>(); for (int i = 0; i < json.size(); i++) { JSONObject cur = (JSONObject) json.get(i); sorts.add(cur.getString("property")); } req.setSortBy(sorts);
My operationbinding does not have a <orderBy> clause set, so it should use these sorts, right?
Also, I could not find how I could specify the Sort Order (ASC or DESC)
Comment