Skip to main content



      Home
Home » Eclipse Projects » Eclipse Scout » Check if tablePage content is valid
Check if tablePage content is valid [message #1854951] Tue, 20 September 2022 05:39 Go to next message
Eclipse UserFriend
Hello everyone,

I have a form, that contains a tablePage with mandatory columns. Whenever the user clicks on the sendButton of the form every column is automatically validated by Scout and a MessageBox is displayed whenever a mandatory column is null. However when this error-message appears the action of the sendButton is still executed. So now I want to know if there's is any built-in methods that allows me to know if the tablePage is valid or not from my form class.

Scout version: 22
Java version: 11

Thanks for your support.

Cheers Edgar
Re: Check if tablePage content is valid [message #1856393 is a reply to message #1854951] Thu, 08 December 2022 06:52 Go to previous message
Eclipse UserFriend
Hi Edgar

On a normal form, when you click the "OkButton", every field is validated (execValidate is called). When a field detects an error, it throws a VetoException, which will then cancels the form store operation.

What kind of button is your "sendButton"? Did you implement the message box yourself or are you using the standard Scout validation mechanism? If you display the message box yourself, you might still need to throw a "hidden" VetoException to cancel the form store operation. This can be done like this:
VetoException ve = new VetoException("store cancelled");
ve.consume(); // don't display an additional message to the user
throw ve;


If it still does not work, can you post a (shortened) version of your code?

Regards,
Beat
Previous Topic:Enabling user authentication and authorization
Next Topic:Open PageWithTable several times
Goto Forum:
  


Current Time: Thu May 22 09:55:23 EDT 2025

Powered by FUDForum. Page generated in 0.05881 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top