I've noticed a change of behaviour in com.isomorphic.datasource.DataSource in SmartClient Version: v13.0p_2025-07-23/PowerEdition Deployment (built 2025-07-23). Is it intentional or a bug and if a bug has it been fixed?
In a DMI class we have a DSRequest from the screen which contains data to be stored on two tables so we create a DSRequest for each table and copy values, but for some fields we want to set values instead of using the screen value e.g. a "last modified" timestamp needs to be updated instead of copying its current value. Our code uses getFieldNames() to return a List of field names for one table, then we use DSRequest's setFieldValue to set any special values (e.g. "last modified") and remove those field names from the List. Then we loop through the field names List to copy any remaining values. This worked in our previous SmartGWT version, 13.0-p20220609.
I noticed that values like "last modified" weren't being updated and traced the problem to getFieldNames() now returns a pointer to the Datasource's List of field names instead of being a separate Object, so that removing a field name from the List actually removes it from the Datasource. I confirmed this by calling getFieldNames() again and proving that the field name was no longer present, and checking whether getFieldNames().equals(fieldNames), where fieldNames is the List created by calling getFieldNames. In our current SmartGWT getFieldNames and fieldNames are the same object, but in the previous version they are distinct objects.
Thanks for looking into this.
In a DMI class we have a DSRequest from the screen which contains data to be stored on two tables so we create a DSRequest for each table and copy values, but for some fields we want to set values instead of using the screen value e.g. a "last modified" timestamp needs to be updated instead of copying its current value. Our code uses getFieldNames() to return a List of field names for one table, then we use DSRequest's setFieldValue to set any special values (e.g. "last modified") and remove those field names from the List. Then we loop through the field names List to copy any remaining values. This worked in our previous SmartGWT version, 13.0-p20220609.
I noticed that values like "last modified" weren't being updated and traced the problem to getFieldNames() now returns a pointer to the Datasource's List of field names instead of being a separate Object, so that removing a field name from the List actually removes it from the Datasource. I confirmed this by calling getFieldNames() again and proving that the field name was no longer present, and checking whether getFieldNames().equals(fieldNames), where fieldNames is the List created by calling getFieldNames. In our current SmartGWT getFieldNames and fieldNames are the same object, but in the previous version they are distinct objects.
Thanks for looking into this.