That is easy. Use getLocalizer.getString("key", City.class, new Model(obj)).

You can not do this in the constructor of your component though. There are 2 workaround: 1) create a model (for example by subclassing AbstractReadOnlyModel), 2) override the method onBeforeRender in your component.

Regards,
   Erik.


Ned Collyer wrote:
Was there any thoughts on this guys?


Ned Collyer wrote:
If I have something like

my.example.City.java
my.example.City.properties

And its a non wicket class, possibly coming from another library managing
its own internationalisation.

How can I use this in my panels, and have the same override behaviour as
with Panels and Pages.

I think I would want something like this
StringResourceModel(java.lang.String resourceKey, Component component,
Object myObj)
where it can use the lookup "my.example.City.properties" and if it cant
find anything there, then look in MyPanel.properties etc.

From reading the javadoc for StringResourceModels its non obvious if this
can be achieved with inbuilt wicket objects.

I can use the IStringResourceLoader and write something myself, or...
perhaps I'm overlooking something.

Can someone shed some light please?




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to