Are You Sure Message Box

0
Hi – I saw this thread on putting an “Are you sure” message box on a page with changes that aren’t saved yet, and my understanding is Javascript is the best option based on the end of the following thread? Is there a reason the app store widgets mentioned earlier in this thread wouldn’t do the same job? I will research further but thought to post the question here if others could explain  https://community.mendix.com/link/questions/94697
asked
5 answers
1

I would do this by making a hidden button on the page that you set to be the X button in the properties of the page. Have this button call a microflow, and go to the microflow settings. Here you can choose a lot of things, one of which is a confirmation window with whatever text you want. If you just want to close a page, then have the microflow only call a close page action. Here is a screenshot of the settings (you access right under where you specify the microflow):

Hope this helps

answered
0

Hi – how would the microflow look like? Would I use the objectHasChanged Java action from community commons, to tell it only to execute if there is an actual uncommitted change? I’ve found that Java action not returning the expected result if there was an uncommitted changed. Thanks for ANY tips :)

answered
0

Those widgets do exactly the same job and in Javascript, 21721 does it for Mx<7.0.0, 78474 does it for the recent Mx-versions. Those widgets are also written in javascript, so all answers lead to the same conclusion: Javascript. If you want to research further, then download the leave-action, unzip/extract it and have a look at LeaveAction.js. It is Dojo, like most widgets, not (yet) React.

answered
0

Are these widgets designed to detect “dirty”/uncommitted changes? I’m not finding that to be the case unless I’m doing something wrong

answered
0

Sorry not sure what you mean by the comment above. I apologize

answered