on 01-18-2012 1:11 PM
Hi,
if I'm not mistaken the validation flag in the Actions tab of a View has the function of preventing the execution of an Event handler method (Action) if there are validation errors.
Is it true?
If it is true, does it work only with the automatic validation done with the type description as found in the dictionary (es. an integer InputField cannot contain characters) or does it work also with custom generated validation errors?
Let me explain:
I have a number of fields in a form that are linked to string attributes. Legitimate values for those fields of course are a subset of the set of possible strings of given length. In those InputFields I've put in the OnEnter or OnChange event handler some logic to validate the inputs and, if the check fails, raise a validation error linked to the attribute via msgManager.reportContextAttributeMessage(...).
For example, let's say that I have an InputField where the user writes the VAT number. When the user presses Enter or the focus on the InputField is lost, a method is called to perform a sanity check on the VAT number to see if it is valid. If it's not, then a Context Attribute Message is shown to the user.
Let's say that I have a button "Create invoice". What I'd like to have is that the "Create invoice" event handler does not execute if there is a problem on the VAT number, without having to duplicate or redo the checks. I could move the checks only in the method of the button Event handler but in that case the user gets all the errors at the end.
Is this possible?
Thank you,
Pietro
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
96 | |
11 | |
11 | |
10 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.