Quantcast
Channel: Mendix Forum Questions
Viewing all articles
Browse latest Browse all 82538

Customwidget form validation

$
0
0

I'm trying to use Mendix's built-in validation as efficiently as possible for a custom widget, however, even though I subscribed to the context objects validation update I still get an error popup also showing the same error message. Similar to when you trigger a validation message for an attribute/association that doesn't have a form element on the page.

In my example, the Status field is my custom widget, as you can see the validation message is rendered due to my validation subscription logic. However, the error is also shown in a dialog. Which I would like to prevent. Any suggestions?

My code in a nutshell is as follows:

this.validationHandler = mx.data.subscribe({
                            guid: this.object.getGuid(), 
                            val: true, 
                            callback: function(validations){
                                self.validationUpdate(validations)
                            }
                        });

Of course self.validationUpdate(validations); handles the actual rendering but shouldn't this be enough to tell Mendix not to render the error dialog because the validations taken care off?

example


Viewing all articles
Browse latest Browse all 82538

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>