The component parameter can be null.
e.g. if you look at getObject() in the ResourceModel class:
return
Application.get().getResourceSettings().getLocalizer().getString(resourceKey,(Component<String>)null,
defaultValue);
It calls Localizer#getString with the resource key and optionally a
component.
Sebastian
----- Original Message -----
From: "7zark7" <[email protected]>
To: "Wicket" <[email protected]>
Sent: Saturday, October 30, 2010 8:47 AM
Subject: get localized string from Model class?
Hi,
I am writing a IModel<String> implementation which formats Dates in a
particular way.
I would like the text to be in localized properties files, however I can't
seem to leverage anything in Wicket for this. Localizer expects a
component to be passed to its getString methods, which I do not have a
reference to.
Anyone have ideas or done similar?
Thanks
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]