Hi,
Is there any shorter way (shorter as in 'less characters to type') to do
this ?
feedback.info(MessageFormat.format(getString("feedback.info.reportDeleted"),
toDelete.getReportName()));
I know about StringResourceModel but
feedback.info(new
StringResourceModel("feedback.info.reportDeleted").setParameters(
toDelete.getReportName() ).getObject());
is not exactly shorter :/
It would be nice to have something like the following method on both
Component and Localizer:
/**
* Returns a localized string while applying <code>MessageFormat</code>
placeholder substitution.
*
* The placeholder syntax is the one supported by {@link
java.text.MessageFormat}.
*
* @param key Key of string resource in property file
* @param parameters Optional parameters for placeholder substitution
* @return The String
* @see java.text.MessageFormat
*/
public String getString(final String key,Object... parameters);
Cheers,
Tobias
P.S. We're on Wicket 8 btw