How to force a refetch , for example in a tileGrid?
I need to refetch some data and get inside the DSCallback.
If I use invalidateCache(), I get indeed a refetch but I am not getting inside the DSCallback. This happens when an update on the same data occurs, so I guess it is related to cache.
So I have this:
The fetch is done (because of the update!!!) but I am not getting inside the method.
The only way to get inside is setting some criteria that are always different, e.g. a timestamp:
This works and now I am getting inside the method. But I am getting two refetches now:
the original
my fetchData
What is the correct way to deal this?
I remember that some time ago you explained me that some fetches are ignored if they have the same criteria, so if I send two equal requests (together) , only 1 of these is being executed.
So I guess this has to do with this behavior.
Is there any DSCallback for the automatic refetches? If yes, I could put my method there.
I need to refetch some data and get inside the DSCallback.
If I use invalidateCache(), I get indeed a refetch but I am not getting inside the DSCallback. This happens when an update on the same data occurs, so I guess it is related to cache.
So I have this:
Code:
tileGrid.fetchData(new AdvancedCriteria(OperatorId.AND, c), new DSCallback() { @Override public void execute(DSResponse dsResponse, Object data, DSRequest dsRequest) { // I am never getting here }
The only way to get inside is setting some criteria that are always different, e.g. a timestamp:
Code:
new Criterion("timestamp", OperatorId.EQUALS, new Date())
the original
my fetchData
What is the correct way to deal this?
I remember that some time ago you explained me that some fetches are ignored if they have the same criteria, so if I send two equal requests (together) , only 1 of these is being executed.
So I guess this has to do with this behavior.
Is there any DSCallback for the automatic refetches? If yes, I could put my method there.
Comment