Announcement

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

    AdvancedCriteria not applied to PUT response

    Hi,

    I suspect I have found a bug in SC 7.0 R2, but perhaps my understanding is incorrect.

    If I do this -

    Code:
    myTreeGrid.filterData({myField:"123"});
    ...
    myTreeGrid.updateData(myRecord);
    Then the record returned from the response to the update is checked against the filter - i.e. fieldMatchesFilter() is called on the DataSource sometime after transformResponse() is called, and if the value of myField is not equal to "123", then the record is not rendered by the TreeGrid. Great - expected behaviour.

    If I do the following, however (further details in this thread) -

    Code:
    myTreeGrid.filterData(getMyAdancedCriteria());
    ...
    myTreeGrid.updateData(myRecord);
    The record returned from the update is not checked against the criteria - i.e. neither 'fieldMatchesFilter()' nor 'evaluateCrierion()' is called on the datasource. Consequently, if the update causes the record to no longer match the filter, the record continues to be shown in the tree. Not expected behaviour.

    Note that 'evaluateCriterion()' is called on the datasource against the record returned from a POST in the second example - so if I create a record that doesn't match the filter, then it is not shown in the grid, as expected. I also did some looking at form.saveData(), and new records do get checked against the criteria, but edited records do not.

    Wondering if this expected behaviour, a bug, or my misunderstanding about situations where AdvancedCriteria are not applied vs simple criteria? Thanks,

    Colin

    #2
    Hi,

    Just wondering if you were able to confirm this as a bug? Thanks,

    Colin

    Comment

    Working...
    X