struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brendan Richards" <>
Subject RE: Dynamic Messages
Date Thu, 18 Mar 2004 17:51:38 GMT
>>You could have as many parameters as you want

I thought you could only use up to four (arg0 to arg3).

The dtd for validaton.xml only contains these elements.

Or can you use more when creating a message in code rather than through
validation.xml ?

-----Original Message-----
From: Wiebe de Jong [] 
Sent: 18 March 2004 17:37
To: 'Struts Users Mailing List'
Subject: RE: Dynamic Messages

Messages from your resource file can have parameters.

Resource file:
user.added={0} successfully added

  new ActionError("user.added",;

  new ActionMessage("user.added",;

You could have as many parameters as you want. For example:
detail.line={0} of {1} was added on {2}

-----Original Message-----
From: Ciaran Hanley [] 
Sent: Thursday, March 18, 2004 9:14 AM
To: Struts User Mailing List
Subject: Dynamic Messages



Can ActionMessages/ActionErrors be created dynamically or do they always
need to read from a resource file.


I would like a more meaningful message shown when something is added to
DB, like instead of "Client successfully added" I would like "Joe Bloggs
details have been added". Can this be done using these classes?




To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message