shibby1011ph
Programmer
why does the html messages not recognize the property name assigned in the java class? i wanted the actionMessages titled "success" to appear green while the global messages should appear red.
Test.java contains :
ActionMessage actionError = new ActionMessage("success.prompt.actionNoticeAddition");
actionMessages.add("success", actionError);
Test.jsp contains :
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<logic:messagesPresent message="true">
<html:messages id="message" message="true" property="success">
<font color="green"><bean:write name="message"/><br><br></font>
</html:messages>
<html:messages id="message" message="true" property="<%= org.apache.struts.action.ActionMessages.GLOBAL_MESSAGE %>">
<font color="red"><bean:write name="message"/><br><br></font>
</html:messages>
</logic:messagesPresen
Test.java contains :
ActionMessage actionError = new ActionMessage("success.prompt.actionNoticeAddition");
actionMessages.add("success", actionError);
Test.jsp contains :
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<logic:messagesPresent message="true">
<html:messages id="message" message="true" property="success">
<font color="green"><bean:write name="message"/><br><br></font>
</html:messages>
<html:messages id="message" message="true" property="<%= org.apache.struts.action.ActionMessages.GLOBAL_MESSAGE %>">
<font color="red"><bean:write name="message"/><br><br></font>
</html:messages>
</logic:messagesPresen