Hi,
I am developing a plugin and i am extending "JiraWebActionSupport" , But how i can send the objects(list/Map) from my Action class to the .vm files and display the content of these objects in .vm files.
Actually i want to display all the error messages(captured from my Action class ) in frontend .VM file.
Can any one please suggest solution or share some sample Examples.
Thanks & Regards,
Satya.
Community moderators have prevented the ability to post new answers.
Velocity pulls the data from the $action, which is always referenced in the Velocity context:
#if ($action.hasAnyErrors()) <h4>Errors</h4> <ul> #foreach ($error in $action.getErrorMessages()) <li>$error</li> #end #foreach ($error in $action.errors) <li>$error</li> #end </ul> #end
Shall I suggest the following, to use the AUI colors:
#if ($action.hasAnyErrors()) <div class="aui-message aui-message-error"> <p class="title">$i18n.getText('common.words.errors')</p> <ul> #foreach ($error in $action.getErrorMessages()) <li>$textutils.htmlEncode(${error})</li> #end #foreach ($error in $action.errors) <li>$textutils.htmlEncode(${error})</li> #end </ul> </div> #end
Example:
image2016-2-11 17:43:42.png
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.