Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » Check if tablePage content is valid
Check if tablePage content is valid [message #1854951] Tue, 20 September 2022 09:39 Go to next message
Edgar Mandefield is currently offline Edgar MandefieldFriend
Messages: 1
Registered: September 2022
Junior Member
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 11:52 Go to previous message
Beat Schwarzentrub is currently offline Beat SchwarzentrubFriend
Messages: 201
Registered: November 2010
Senior Member
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?

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

Current Time: Sun Mar 03 10:48:30 GMT 2024

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

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

Back to the top