Just like we use the below snippet to bind the error message to a particular attribute instance of an item which gets rendered once the validation occurs on clicking the save button. Can we show any warning messages against the item object or individual attribute instance which a user can override and continue with the save operation unlike error messages?
inArgs.addValidationError(attribInstance, ValidationError.Type.VALIDATION_RULE, message.getRuleMessage());
Pinned topic How to show warnings against an Item object or an attribute Instance?
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2012-07-21T00:25:41Z at 2012-07-21T00:25:41Z by KaranBal
babinag 270004R93B91 Posts
Re: How to show warnings against an Item object or an attribute Instance?2012-07-13T06:58:20ZThis is the accepted answer. This is the accepted answer.Hi Abhijeet.M
What means "user can override and continue"?
If error message shown at attrInstance, item can not be saved until user or someone else fix value to pass validation.
KaranBal 270004GTF1108 Posts
Re: How to show warnings against an Item object or an attribute Instance?2012-07-21T00:25:41ZThis is the accepted answer. This is the accepted answer.I don't think we have that ability currently. You may be able to catch warnings in the logs by increasing the logging level in $TOP/etc/default/log.xml but can't enable a pop up for them. But you can submit an enhancement request for this.
Alternately, you should be able to implement a similar logic using a workflow. Use warning criteria for validations in a workflow step and send the data object to an additional step if one of the those aren't met. This will ensure someone has to review the change.