Hi all,
I'm trying to achieve a fairly simple thing within .properties files to
avoid a lot of duplicate words through different files.
For example there's is a HomePage.properties with:
lbl.foo=This is an example text, we love ${lbl.item}
And then in MyWebApplication.properties:
lbl.item=Wicket
Hi,
I dont know if there is a way to do it with Wicket default
ResourceModels, but I implemented a ReplacingResourceModel which is
seaching for the keys marked up with ${key} and replaces it with the
value of that key. I used Wicket 7.x - the API changed a little bit
since 6.x so if you are i
Hi again,
"I used Wicket 7.x - the API changed a little bit since 6.x so if you
are interested then let us know."
That was wrong - I copied the ReplacingResourceModel into my testproject
running with wicket 6.x and it is working without errors. Maybe it was
an error during the development of
Here is the link to the master - if something is going to be changed you
will see it.
https://github.com/klopfdreh/wicket-components-playground/blob/master/wicket-components-playground/src/main/java/org/apache/wicket/model/ReplacingResourceModel.java
kind regards
Tobias
Am 21.02.15 um 14:01 s
Tobias,
Somehow I'm missing your replies in gmail. But thanks for the suggestions.
Using custom models would be a last resort for me. Because I will have to
replace all occurences. I'm somehow hoping to hook into the localizer.
On Sat, Feb 21, 2015 at 2:01 PM, Rob Sonke wrote:
> Hi all,
>
> I'm
Rob,
we will see what others say and if there is a standard way for this in
wicket. I'm currently testing the implementation - it also replaces keys
found in hierarchy, because Wickets Localizer is going to be used for
each key which is going to be replaced. So the example of your first
mail
Hi,
such a feature was asked a few times, e.g.:
http://stackoverflow.com/questions/16684200/refer-to-one-property-from-another
But apparently it never gained much interest in the community. In my
experience you won't find many cases where this is useful anyway.
Have fun
Sven
On 21.02.2015
Hi,
if it gained not as much interest in the community, but there are still
some users asking for such an implementation - maybe we can put it into
wicketstuff-minis?
kind regards
Tobias
P.S.: I also answered the question in stackoverflow. :-)
Am 21.02.15 um 17:59 schrieb Sven Meier:
Hi,
Hi Sven,
Ah, that's the same kind of request. I can imagine that it's not a very hot
feature. But we use the variant/style settings to override properties with
kind of "theme" specific labels. But often such a theme only wants to use
different naming for specific elements. With this option, we can