> Day
> Week
> Fortnight
> Month
> Year
If you really want to hardcode the options in the HTML like that, remember not
to use DropDownChoice which will replace the markup, but make your own
FormComponent subclass that preserves the entire markup. In this case, you
could try
Day
But the DropD
riod.1 = Day
>period.7 = Week
>period.14 = Fortnight
>period.30 = Month
>period.365 = Year
>
> Sven
>
>
--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/Internationalizing
You can do without the ChoiceRenderer if you put your terms in a
property file next to your panel/page:
A.java
new DropDownChoice("period", ...) {
protected boolean localizeDisplayValues() {
return true;
}
}
A.html
A.properties
insom wrote:
new DropDownChoice("period",
new PropertyModel(myObject, "period"),
periods,
new ChoiceRenderer() {
public String getDisplayValue(Object object) {
int period = ((Integer) object).intValue();
switch (period) {
case 1: return "Day";
...
default:
ow new RuntimeException();
}
}
}
);
My question is, how can I take advantage of Wicket's internationalization
capabilities to replace the return values with the proper values for the
locale?
--
View this message in context:
http://www.nabble.com/Internationalizing-a-DDC-tp