Hi,
The issue is that the first log entry displays the correct value for pk. However the second one displays a null value.
Doesn't the resultset maps the datasource records? I want to get the records stored in the datasource. I have the system working with RecordList but I want to move it to more generic Datasource.
Here is the code:
And the datasource looks like:
The issue is that the first log entry displays the correct value for pk. However the second one displays a null value.
Doesn't the resultset maps the datasource records? I want to get the records stored in the datasource. I have the system working with RecordList but I want to move it to more generic Datasource.
Here is the code:
Code:
DataSource datasource = IlsItemSupplyDS.getInstance();
datasource.fetchData();
DataClass[] data = datasource.getTestData();
GWT.log(data[1].getAttribute("pk"));
ResultSet resultset = new ResultSet(datasource);
IlsItem item = null;
Record b = resultset.get(1);
GWT.log(b.getAttribute("pk"));
Code:
DataSourceIntegerField pkField = new DataSourceIntegerField("pk");
pkField.setHidden(true);
pkField.setPrimaryKey(true);
DataSourceTextField friendlyNameField = new DataSourceTextField("friendlyName", "Name");
friendlyNameField.setRequired(true);
setFields(pkField, friendlyNameField, friendlyNameFiel);
setClientOnly(true);
setTestData(IlsItemDatabase.getRecords());