Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
Retrieving ActionMessages inside Portlets
Hi,<br /><br />I'm using struts with liferay, and I can't manage to retrieve my ActionMessages stored in the request by an Action class. Actually, I use setAttribute on the request, but the forwarding to the jsp seems to reformat my request, and in the same time, lose my ActionMessages....<br /><br />My key in the ApplicationResources.properties file :<br /><br />test.arg = Club {0} exists<br /><br /><br />In my Action class :<br /><br />
messages.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("test.arg", club.getName()));
req.setAttribute(Globals.MESSAGE_KEY, messages);
setForward(req, "getClubsByNameSuccess");
<br /><br />In my JSP page :<br /><br /><logic:messagespresent message=""true"">
<html:messages id=""msg"" message=""true"">
<div class=""success"">
<bean:write name=""msg"/">
</bean:write></div><br>
</html:messages>
</logic:messagespresent>
No messages in the request
<br /><br /><br />Any help appreciated ! Thanks !<br />
Community
Company
Feedback