Friday, June 6, 2014
Liferay UI error message usage
<p>only key - nothing prints</p>
<liferay-ui:error key="delete-account.action.managment.error1" />
if key and message given ( SessionErrors.add(actionRequest, "delete-account.action.managment.error2" ,"error2message" );
)
load message from language.properties and display it. if no message found then display what ever given in message attribute
<liferay-ui:error key="delete-account.action.managment.error2" message="delete-account.action.managment.error2"/>
display formatted message with arguments
SessionErrors.add(actionRequest, "delete-account.action.managment.error3" ,ame.getMessage());
<liferay-ui:error key='delete-account.action.managment.error3' message='<%= LanguageUtil.format(pageContext, "delete-account.action.managment.error3", SessionErrors.get(renderRequest,"delete-account.action.managment.error3")) %>'/>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment