Fwd: Calling a method with parameters (String, Object[])
Eirik Lygre <[email protected]> Mon, 20 Jan 2014 15:49:17 +0100
| Newsgroups | gmane.comp.web.freemarker.user |
|---|---|
| Message-ID | <CAHJmSV9tK3WuYODT1j=ECWa+W1VWCfYpbifdnWo7BpCNZ-MueA@mail.gmail.com> |
(Sorry about the double post; I accidentaly hit ctrl+enter before I was
finished)
We have a need for calling a method on the Spring MessageSourceAccessor,
with the following signature:
public String getMessage(String code, Object[] args)
I've tried the following, which fails:
${messageAccessor2.getMessage("my.parmeterizedMessage", [
"paramfromtemplate2", "PFT1" ] )}
FreeMarker template error:
No compatible overloaded variation was found for the signature deducated
from the actual parameter values:method getMessage(string (wrapper:
f.t.SimpleScalar), sequence (wrapper: f.t.SimpleSequence))The available
overloaded variations are:
org.springframework.context.support.MessageSourceAccessor.getMessage(org.springframework.context.MessageSourceResolvable,
Locale),
org.springframework.context.support.MessageSourceAccessor.getMessage(String,
Object[]),
org.springframework.context.support.MessageSourceAccessor.getMessage(String,
Object[], String, Locale),
org.springframework.context.support.MessageSourceAccessor.getMessage(String,
String),
org.springframework.context.support.MessageSourceAccessor.getMessage(org.springframework.context.MessageSourceResolvable),
org.springframework.context.support.MessageSourceAccessor.getMessage(String),
org.springframework.context.support.MessageSourceAccessor.getMessage(String,
Object[], String),
org.springframework.context.support.MessageSourceAccessor.getMessage(String,
String, Locale),
org.springframework.context.support.MessageSourceAccessor.getMessage(String,
Object[], Locale),
org.springframework.context.support.MessageSourceAccessor.getMessage(String,
Locale)
Is there a way, or do we need to create a wrapper object?
Eirik
There is no high like a tango high
There is no low like a tango low
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
FreeMarker-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freemarker-user