I need to dynamically change the loaded keys through a parameter. Imagine there yould be 2 properties like
<entry key="property.to.load.somesuffix">value1</entry>
<entry key="property.to.load.anothersuffix">value2</entry>
loading these based on the values of the model of the pageclass could be accomblished, for example, with a stringresourcemodel like
new StringResourceModel( "property.to.load.${pageParam.suffix}", this, new Model(pageModel))));
and adding this resource model to a label and render the loaded value of the property in that label. but I need to render the properties value as usual html text as it is rendered by using the wicket:message tag for example like
<wicket:message key="property.to.load.${pageParam.suffix}" />
this, off course, does not work. Any Solutions for that? Maybe Override the internal functionality of the interpretation of the wicket:message tag ?!
Edit
Although the text rendering in the Label seems to be very well, as stated below, and you can set the escapemodelstring, it might be useful to have a possibility to this kind of parameterizing in wicket:message tag and not to add a label for every key.
This issue might be a big Problem from the perspective, that you wont want to have any java code specific stuff in your markup like model specific method names in the keyparameter. So there would be also a need for a generalization of this technique. any ideas to accomblish that?
. – Mar Cel Mar 31 '12 at 15:18