Hello,
We have recently changed to use the latest version of smartgwt:
SmartClient Version: SNAPSHOT_v10.1d_2014-11-14/LGPL Development Only (built 2014-11-14) and are developing with both firefox and chrome.
We have cleanly built the project and cleared the browser cache.
We have some comboboxitems in forms which use the valueField and the displayField, please see example below...
The problem is when an item is selected from the box, the following is sent to the server
With the fieldname being title (the displayField) rather than id (the valueField) and the value being the id value.
This all worked fine in version 4.1 and our code for these comboboxes hasn't changed. In the instance shown, this doesn't return any records from the database and the correct record is used when selected.
However,
we have another instance where the displayField is an amalgamation of two fields in the DTO when returned from the server and therefore doesn't exist in the database, which understandably returns the following from the server. Which is displayed on the client.
{"response":{"status":-1,"startRow":0,"endRow":0,"totalRows":0,"invalidateCache":false,"errors":["Unknown column 'fullName' in 'where clause'"],"data":[]}}
Many thanks
Jeni
We have recently changed to use the latest version of smartgwt:
SmartClient Version: SNAPSHOT_v10.1d_2014-11-14/LGPL Development Only (built 2014-11-14) and are developing with both firefox and chrome.
We have cleanly built the project and cleared the browser cache.
We have some comboboxitems in forms which use the valueField and the displayField, please see example below...
Code:
setOptionDataSource(ProductDS.getInstance(sortByFields)); setOptionCriteria(criteria); setValueField("id"); setDisplayField("title"); setTextMatchStyle(TextMatchStyle.SUBSTRING); setCompleteOnTab(true); setMinimumSearchLength(2);
Code:
{ "operator":"and", "_constructor":"AdvancedCriteria", "criteria":[ { "fieldName":"available", "operator":"equals", "value":1, "_constructor":"AdvancedCriteria" }, { "_constructor":"AdvancedCriteria", "operator":"and", "criteria":[ { "fieldName":"title", "operator":"equals", "value":7 } ] } ] }
This all worked fine in version 4.1 and our code for these comboboxes hasn't changed. In the instance shown, this doesn't return any records from the database and the correct record is used when selected.
However,
we have another instance where the displayField is an amalgamation of two fields in the DTO when returned from the server and therefore doesn't exist in the database, which understandably returns the following from the server. Which is displayed on the client.
{"response":{"status":-1,"startRow":0,"endRow":0,"totalRows":0,"invalidateCache":false,"errors":["Unknown column 'fullName' in 'where clause'"],"data":[]}}
Many thanks
Jeni
Comment