Topic
  • 2 replies
  • Latest Post - ‏2012-07-21T00:25:41Z by KaranBal
SystemAdmin
SystemAdmin
648 Posts

Pinned topic How to show warnings against an Item object or an attribute Instance?

‏2012-07-10T09:21:24Z |
Hi All,

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());

Thanks,
Abhijeet
Updated on 2012-07-21T00:25:41Z at 2012-07-21T00:25:41Z by KaranBal
  • babinag
    babinag
    91 Posts

    Re: How to show warnings against an Item object or an attribute Instance?

    ‏2012-07-13T06:58:20Z  
    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
    KaranBal
    108 Posts

    Re: How to show warnings against an Item object or an attribute Instance?

    ‏2012-07-21T00:25:41Z  
    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.