Well, in the model you can still get to the locale by going through the RequestCycle:
RequestCycle.get().getRequest().getLocale() On Sun, Jun 1, 2008 at 9:36 AM, Doug Donohoe <[EMAIL PROTECTED]> wrote: > > I could probably do that. I used converters because the infrastructure was > there ... I needed to use localized NumberFormat and CurrencyFormat classes. > If need be, I'll look into your suggestion as an alternative. > > Thanks, > > -Doug > > > jwcarman wrote: >> >> On Sun, Jun 1, 2008 at 7:20 AM, Doug Donohoe <[EMAIL PROTECTED]> wrote: >>> >>> It's proper for my use case. I want to output an double as a percent >>> (e.g., >>> .15 gets displayed as 15%). I'm not sure why there is a type argument. >>> The >>> label is defined as having a Double model. What other conversions do I >>> need >>> to do besides Double <==> String? >>> >>> I need to override this. Making it final would not be helpful. Unless >>> I'm >>> using the converter improperly. I hope not - this is but one instance of >>> four or five where I'm using converters to format numbers/dates in a >>> locale >>> specific way. >>> >> >> Could you use a model to do the formatting? I created a >> MessageFormatModel one time which just applied a MessageFormat pattern >> to whatever it got from a model that it wrapped. That made it very >> easy to format things the way I wanted. Now, this only worked for >> stuff that I didn't need to be able to "set", but that wasn't a >> problem for me, since it was a Label (I believe). >> >> > > -- > View this message in context: > http://www.nabble.com/iconverterlocator%2Bgenerics-tp17462585p17585712.html > Sent from the Wicket - Dev mailing list archive at Nabble.com. > >
