Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Possible bug in ListGrid._saveLocally

    Hi,

    I am having problems saving a record locally in a grid that uses a ResultSet to store its date, and I think the root cause is in the _saveLocally function of ListGrid.js, in this excerpt:

    Code:
            if (isc.ResultSet && isc.isA.ResultSet(data)) {
                if (data.allRows != null) {
                    data.allRows.add(data);
                    data.filterLocalData();
                } else {
                    this.logWarn("Unable to add data to resultSet - allRows is not set");
                }
            } else {
                data.add(newValues);
                data.dataChanged();
            }
    data (a ResultSet) is being added to data.allRows, and at no point newValues (an object containing all the new values declared earlier in the code) is added to data.allRows. I think the previous code should look like this:

    Code:
            if (isc.ResultSet && isc.isA.ResultSet(data)) {
                if (data.allRows != null) {
                    data.allRows.add(newValues);
                    data.filterLocalData();
                } else {
                    this.logWarn("Unable to add data to resultSet - allRows is not set");
                }
            } else {
                data.add(newValues);
                data.dataChanged();
            }
    This code solves my problem in my local instance. Currently I am working with the version v10.0d_2014-02-13/LGPL Development Only.

    With regards,

    Martin

    #2
    We agree with your analysis. This appears to be a straight oversight / bug and we're making the change you suggest to the framework.

    Thanks for the clear description

    Regards
    Isomorphic Software

    Comment

    Working...
    X