Hi Thorsten,

I had a quick look at the source code for this:

For wicket:message attributes, wicket uses WicketMessageTagHandler; For
wicket:message tags it uses WicketMessageResolver.

In both classes I see that wicket uses the provided message key verbatim,
without doing any property replacement prior to using it to find a
localized message.
This means you’ll have to wire things up in java code to make your use-case
work.

Met vriendelijke groet,
Kind regards,

Bas Gooren

Op 14 augustus 2020 bij 09:56:50, Thorsten Schöning (tschoen...@am-soft.de)
schreef:

Hi all,

I know how to use StringResourceModel with Property Expression
Language to read keys and values from language files using some
dynamic parts. The point is that StringResourceModel needs to be
provided to some component, like a label, or that model needs to be
used manually to read some values.

But is the same available when Wicket does things automatically, like
handling localized messages?

> <a href="#"
> title="Show details of all [...] meters."
> wicket:message="title:caption.${kindOfDetail}.show.title">
> <wicket:message key="caption.${kindOfDetail}.show.msg">
> Details of all [...] meters.
> </wicket:message></a>

That link is part of some markup of some component, but is not used by
the component itself, only by some client-side JavaScript. Though, I
would like to make the "caption"-text be resolved by some dynamic key
provided by the component.

Is that posisble and if so, how do I need to provide that key? Do I
need to set a StringResourceModel with that key as default model of
that component?

Thanks!

Mit freundlichen Grüßen,

Thorsten Schöning

-- 
Thorsten Schöning E-Mail: thorsten.schoen...@am-soft.de
AM-SoFT IT-Systeme http://www.AM-SoFT.de/

Telefon...........05151- 9468- 55
Fax...............05151- 9468- 88
Mobil..............0178-8 9468- 04

AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln
AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to