|
From: <jue...@we...> - 2004-12-09 12:16:08
|
I guess it would be sufficient to add such convenience methods with a =
List argument to the RequestContext class. Does Velocity automatically =
detect the correct overloaded version of the "getMessage" method, that =
is, the one with the List argument rather than the one with the array =
argument?
=20
Juergen
=20
________________________________
Von: spr...@li... im Auftrag =
von Darren Davison
Gesendet: Do 09.12.2004 12:35
An: spr...@li...
Betreff: [Springframework-developer] MessageSource - methods to take =
'args' as List
Is there any possibility to add methods to MessageSource types that =
accept a
List of args in place of the Object[] ? They could just defer to the =
existing
methods in default implementations..
public final String getMessage(String code, List args, String =
defaultMessage,
Locale locale) {
return getMessage(code, args.toArray(), defaultMessage, locale);
}
public final String getMessage(String code, List args, Locale locale) {
return getMessage(code, args.toArray(), locale);
}
The use case is that I can't create an Object[] from Velocity templates, =
but I
can create an ArrayList..
$rc.getMessage("msg.code", ["Param1", "Param2"], "default message")
^^^^^^^^^^^^^^^^^^^^
Velocity creates ArrayList here ..^
--
Darren Davison
Public Key: #DD356B0D
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
|