Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm trying to develop a simple widget for users to be able to reload an app through clicking a button.
The widget is really simple, just using the app.doReload() method.
It works when the app is not published however when the app is published, it appears to work (the data reloads) however once you refresh the page the new data is no longer there.
It appears the app isn't saving after reload, if I add a separate button which invokes the app.doSave() method, it all seems to work. Does anyone know how I can put this all into one button?
Hi Rachel,
Have you found the solution for this?
We are facing the same problem.
<lui-button ng-click="app.doReload();app.doSave()">Reload app</lui-button>
Use above it should work.
No, I had already tried that but the save does not work on a published app.
No, haven't found a solution.
Current thinking is we need to make an extension that will trigger the reload task for the app.
this wont work because app.doReload() returns a promise, You need to call a .then on it
app.doReload().then(function(){
app.doSave();
});
this will wait for the reload. then do the save once its reloaded.
Hello @peachman
where do I have to put your code into the widget HTML?
At the moment I have two buttons:
Could you give us an example how the HTML code in the widget should look like?
Thank you.
Best regards, Patrick