AnsweredAssumed Answered

Custom Action - Custom Failure/Success Message?

Question asked by mtw999 on May 21, 2014
Latest reply on May 22, 2014 by mtw999

I have a custom action that works fine, but upon failure/success I want to display a message with some additional information that results from the execution of the ActionExecuter class. For example, ActionExecuter checks to see if 3 document types are present in a folder. If they are not present, I'd like to have a message:

"Could not complete MyAction:
"Document Type A is not in MyFooFolder"
"Document Type C is not in MyFooFolder"

The failure/success message is being provided as value in a properties file, but I'd like it to be more dynamic.

<action id="closed-submission" type="javascript" icon="closed-submission" label="actions.check-mystuff">
            <param name="function">onCheckMyStuffAction</param>
            <param name="action">check-mystuff</param>
            <param name="successMessage">message.check-mystuff.success</param>
            <param name="failureMessage">message.check-mystuff.failure</param>
               <permission allow="true">Write</permission>

(How) can I pass/define messages so that it has info I want it to have? Can I somehow redefine message.check-mystuff.success in my Action class?