0
votes

I need to display an alert on the xpages application. The condition is that if the entered value exceeds a percentage in relation to a value from the previous month the alert message is displayed. What would be the best way to implement this functionality? The component where the value is entered is a dojo number text box.

Should I treat the alert on the button where I submit to xpage? I thought that in the button code I could have two action groups, one that would remain as it currently stands, in which case the value would not exceed the percentage. In the other group of actions, for when the value exceeds the percentage, it would display a dialog stating that the percentage was exceeded and if the user would like to continue through an ok button, or correct the value through a cancel button. On the ok button, the same actions from the previous group would be inserted. Would these actions work in the context of the dialog box, correctly saving the datasource? Am I on the right track, or is there another simpler way to implement this alert, for example, when typing the value already display the alert?

It is important to point out that this is only an alert and not a validation that prevents the user from submitting to xpage.

Grateful!

Marcus.

1
It kind of depends... do you want the alert to show when the user enters the data? Or when they click the submit/save button? Do you want the alert to be modal or non-modal (the user has to close the alert)?Howard
I think it is more friendly that the message appears to the user to enter the data. In the case of doing it by submitting that would be the second alternative, I think the dialog box should be modal.Marcus Loza

1 Answers

1
votes

You could test the value in the onChange event of the input control. Your alert could use Boot Alerts to display an alert that the user would see in the browser.https://xpage.me/2015/02/10/boot-your-alerts-in-the-with-bootalert/ or Growl http://elstarit.nl/2015/02/20/my-taken-on-a-multi-growl-message-phaselistner-for-xpages/