Announcement

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

  • slick07
    replied
    Hi Isomorphic,

    After starting to use the setImplicitCriteria(Criteria) on TreeGrids we noticed that after a DSOperationType.UPDATE on a TreeNode that is outside of the implicit criteria (it is not visible) it appears within the TreeGrid although it still does not satisfy the implicit criteria and should not be visible.

    Using filterData(Criteria) instead of setImplicitCriteria(Criteria) does not present the above misbehaviour.

    Leave a comment:


  • Isomorphic
    replied
    We'll take a look at the doc and improve it where needed.

    It isn't clear what installing the same criteria as both hidden, immutable criteria, and visible, user-editable criteria would be expected to achieve - but it isn't supported behavior anyway. However, we've made a note to take a look at why it behaves that way when you try it.

    Leave a comment:


  • slick07
    replied
    Hi Isomorphic

    I was also calling fetchData(criteria) because the ListGrid on which I tested had autoFetch on false and because the documentation of setImplicitCriteria() does not mention that it invalidates cache. So I assumed that I have to call fetch...

    It seems to work correctly for ListGrids with autoFetch on true. For list grids with autoFetch on false:
    - it works correctly if I just call fetchData()
    - but it displays an empty ListGrid if I call fetchData(criteria) where criteria is the same as the one used for setImplicitCriteria() (I do not understand why this happens but I take your words for it and just use the above fetchData() without any criteria)

    Anyway the problem is solved. Thank you very much for your hint regarding cache invalidation!

    Leave a comment:


  • Isomorphic
    replied
    hi slick07

    No, this is not how it should behave - implicitCriteria can be updated at any time, and we have a bunch of autotests showing this working correctly.

    setImplicitCriteria() replaces the existing implicitCriteria on the component and, if it's different, automatically invalidates the cache.

    This means that no subsequent fetch should be necessary. But if you *do* issue a fetch, don't pass the same criteria as you pass to setImplicitCriteria(), as your code above seems to do.

    Calling setImplicitCriteria() replaces *only* the implicitCriteria - it does not affect any other criteria - so there is no need to reapply other criteria at the same time. But again, if you do, you shouldn't be applying the same crit as both implicit criteria, which is hidden from the user, and regular, explicit criteria that the user can edit.

    If these details don't help to solve your problem, please post a standalone test-case that shows it and we can take a look.
    Last edited by Isomorphic; 12 Feb 2022, 23:07.

    Leave a comment:


  • slick07
    started a topic setImplicitCriteria() update?

    setImplicitCriteria() update?

    Hello,

    I am trying to change the implicit criteria for a ListGrid in order to focus on different subsets of a data source with a code like this:
    setImplicitCriteria(criteria);
    fetchData(criteria);
    and at the same time to be able to use the row filter for further compound filtering with the initial criteria...

    However only the first call to setImplicitCriteria is taken into consideration and any subsequent call of the above code with another criteria just displays an empty ListGrid. But setting back the first criteria again displays correctly.

    Is this a bug or this is how setImplicitCriteria() should behave? Meaning once it gets set you can never update it?

    Using SmartClient Version: v13.0p_2022-01-09/LGPL Development Only (built 2022-01-09)

    Thank you
Working...
X