struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Germuska <>
Subject RE: ActionMessage replacement "keys" ?
Date Tue, 21 Dec 2004 18:33:46 GMT
>  > but i also see your point.  just having one unique message for each
>>  unique situation is simple and does the job.  the only negative thing
>>  is that it takes up more memory when the message bundle is cached in
>>  application scope since there will be a lot of duplication in the
>>  bundle.
>>  i was hoping i could clean things up.  for example, instead of this:
>> first name
>> last name
>> middle name
>>  error.invalid.address=Invalid address
>> zip code
>>  i could get this:
>>  error.generic.invalid=Invalid {0}
>In this particular case, you're probabaly okay.  I was thinking you 
>meant something more complicated, such as an entire paragraph of 
>boilerplate etc.  Complex error mesaages though....

Also, for this specific case, it so happens that the 
commons-validator library DOES ultimately support looking up 
replacement values by key and using them in messages also looked up 
by key.  So, if the most common use case for this need is in 
validation error handling, anyone who uses Struts validator libraries 
is getting the behavior you seek and not feeling its lack in Struts.


Joe Germuska       
"Narrow minds are weapons made for mass destruction"  -The Ex

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

View raw message