Skip to content
Permalink
Browse files
Uses resource message key instead of passing message directly
  • Loading branch information
lukaszlenart committed Jun 23, 2017
1 parent 9e8627c commit 73da12e723c2737bd515946588ddcd898acf584a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
@@ -36,7 +36,8 @@ public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServlet
// Some code to save the gangster to the db as necessary
GangsterForm gform = (GangsterForm) form;
ActionMessages messages = new ActionMessages();
messages.add("msg", new ActionMessage("Gangster " + gform.getName() + " added successfully"));
System.out.println(gform.getName());
messages.add("msg", new ActionMessage("struts1.gangsterAdded", gform.getName()));
addMessages(request, messages);

return mapping.findForward("success");
@@ -7,3 +7,5 @@ item.create=Create {0}
item.list={0} List

token.transfer.time=The bank transfer was executed at {0,date,HH:mm:ss MM-dd-yyyy}

struts1.gangsterAdded=Gangster {0} added successfully
@@ -5,3 +5,5 @@ item.create={0} neu anlegen
item.list={0}-Liste

token.transfer.time=Die \u00dcberweisung wurde am {0,date,HH:mm:ss MM-dd-yyyy} durchgef\u00fchrt

struts1.gangsterAdded=Gangster {0} wurde erfolgreich hinzugefugt
@@ -0,0 +1 @@
struts1.gangsterAdded=Gangster {0} anadido con exito

0 comments on commit 73da12e

Please sign in to comment.