No, javadoc is ok. You are right. My mistake, sorry.

-----Original Message-----
From: Jeffrey Schneller [mailto:jeffrey.schnel...@envisa.com] 

Then is the javadoc wrong?

This was taken right from the javadoc?
http://wicket.apache.org/docs/wicket-1.3.2/wicket/apidocs/org/apache/wic
ket/model/StringResourceModel.html

===============

Example 2 

In this example, the resource key is selected based on the evaluation of
a property expression: 

 public MyPage extends WebPage
 {
     public MyPage(final PageParameters parameters)
     {
         WeatherStation ws = new WeatherStation();
         add(new Label("weatherMessage",
             new StringResourceModel("weather.${currentStatus}", this,
new Model(ws)));
     }
 }
 Which will call the WeatherStation.getCurrentStatus() method each time
the string resource model is used and where the resource bundle for the
page contains the entries: 
 weather.sunny=Don't forget sunscreen!
 weather.raining=You might need an umbrella  weather.snowing=Got your
skis?
 weather.overcast=Best take a coat to be safe

========================


-----Original Message-----
From: Bernhard Michal [mailto:michal.bernh...@tigra.cz]

It doesn't seem correct...
StringResourceModel expect string which is supposed to be resource key
to find localization in resource bundle.

I recommend you to read
http://cwiki.apache.org/WICKET/localization-and-skinning-of-applications
.html.

-----Original Message-----
From: Jeffrey Schneller [mailto:jeffrey.schnel...@envisa.com] 

I tried this and it seems to work.  Is this a correct way of doing it?

Label gender = new Label("gender", new StringResourceModel("${gender}",
this, model)); add(gender); Obviously the StringResourceModel uses the
property file for the page.

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

Reply via email to