Force Refresh from client side

0
Is there a way to force a refresh from the client side without using a microflow to refresh the context entity?    EDIT: After looking through the mendix javascript files i found that mx.data.sendClassUpdate(entityType,callback) is the javascript equivalent version of the java version to update class and the mx.data.update() can be used to update a specific version. Because i already have the new information i think that this will work, but i will keep you updated   Edit2: I guess that using mx.data.update should suffice as well, but this does not trigger nested dataviews to retrieve their data again. Is there perhaps someone from Mendix who wants to share on how to achieve this?  I did find a workaround by using a micrfolow as datasource, somehow the refresh of the above entity does trigger an update of the microflow and all below items. But i'm also intrested in finding a way to update the nested dataviews as well.
asked
3 answers
1

I know you said you don't want to use a microflow, but you can use the java action in the community commons called "RefreshClass" or "RefreshClassByObject". If you don't want to manually trigger the microflow, you can set up a scheduled event to run the microflow in whatever intervals you want (not too sure how that would impact peformance).

answered
1

I also came across a Microflow Timer extension in the appstore, maybe you could take a look into that widget? Not really a push, but you'll be able to refresh a object/data view on a specified interval.

answered
0

You could try to use javascript :

window.location.reload()

But you still need some way to trigger the javascript. Whats the problem?

Regards,

Ronald

[EDIT]

You could try to use the window reload in combination with a Javascript timer function.

var myVar = setInterval(myTimer, 10000);

function myTimer() {
window.location.reload()
}

 

answered