mirror of
https://github.com/apache/struts.git
synced 2026-08-07 07:37:20 +00:00
Uses resource message key instead of passing message directly
This commit is contained in:
+2
-1
@@ -36,7 +36,8 @@ public class SaveGangsterAction extends Action {
|
||||
// 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
|
||||
Reference in New Issue
Block a user