Hello,
I've created a DataSource, assigned it on a ListGrid and called grid.getDataSource().getFields() and grid.getDataSource().getField("fieldname")
When I examine the field[0] returned by getFields() it looks more like an object of the DataSource definition.
Is something wrong with the implementation of DataSource.getFields() ?
SmartGWT build 706
I've created a DataSource, assigned it on a ListGrid and called grid.getDataSource().getFields() and grid.getDataSource().getField("fieldname")
When I examine the field[0] returned by getFields() it looks more like an object of the DataSource definition.
Is something wrong with the implementation of DataSource.getFields() ?
SmartGWT build 706
Code:
DataSourceField dsField1 = new DataSourceField(); dsField1.setName("Show me"); DataSourceField dsField2 = new DataSourceField(); dsField2.setName("Don't show me 1"); dsField2.setHidden(true); DataSourceField dsField3 = new DataSourceField("Don't show me 2", FieldType.ENUM); dsField3.setAttribute("defaultValue", "bla"); dsField3.setValueMap("bla","ble"); ... DataSourceField [] fields = grid.getDataSource().getFields(); final DataSourceField field0 = fields[0]; final DataSourceField field1 = grid.getDataSource().getField("Show me"); ... debug output field0 and field1: com.smartgwt.client.data.DataSourceField.Show me = [object Object] com.google.gwt.core.client.JavaScriptObject$ com.smartgwt.client.data.DataSourceField.Don't show me 1 = [object Object] com.google.gwt.core.client.JavaScriptObject$ com.smartgwt.client.data.DataSourceField.Don't show me 2 = [object Object] com.google.gwt.core.client.JavaScriptObject$ com.smartgwt.client.data.DataSourceField.name = Show me java.lang.String com.smartgwt.client.data.DataSourceField._typeDefaultsAdded = true (not an Object) java.lang.String com.smartgwt.client.data.DataSourceField.title = Show me java.lang.String
Comment