Custom Dojo Attribute Editor and Error Handling
G'day,
Following this guide http://docs.oracle.com/cd/E29542_01/doc.1111/e29634/cust_form.htm#WBCSD6312, I was able to create a custom Dojo widget.
First thing, the example doesn't work for me, the max characters never get enforced because the widget never receives it. Nevertheless, one could hardcode the value for testing purposes.
However, the example widget relies on preventing user input (which you can easily do with just an old school attribute editor). The _isValid method only gets invoked upon save and the bad thing is if you hadn't prevented the input, your value is lost (if it were invalid) when the form is saved. There is no way to provide feedback to the user like if you had typed a restricted character in the name field. Worse, changes to other fields are saved, so the save actually took place but without your value.