In my situation, I would implement the MinimumValidator anonymously and just override the resourceKey method. I don't think it is a good idea to have duplicated resource keys, even I would... it wouldn't solve the problem with legacy resource keys (when they should remain unchanged).
Alex. Jeremy Thomerson-5 wrote: > > Wouldn't it be simpler to duplicate your strings in the resource files > rather than having to create a subclass for each place in code and go > replace every occurence of MinimumValidator with MyMinimumValidator? > It seems that the first way is much less likely to create a bug. > > -- > Jeremy Thomerson > http://www.wickettraining.com > > > > > On Wed, May 20, 2009 at 11:50 AM, Alex Objelean <[email protected]> > wrote: >> >> I need to support some legacy resource keys... also, for some situations >> I >> need to reuse the same message for different type of errors (for instance >> year.Required == date.MinimumValidator) >> >> Thank you! >> Alex >> >> >> igor.vaynberg wrote: >>> >>> What is re usecase? >>> >>> -igor >>> >>> On Wednesday, May 20, 2009, Objelean Alex <[email protected]> >>> wrote: >>>> I've noticed that the following Jira issue: >>>> https://issues.apache.org/jira/browse/WICKET-2244 isn't assigned to >>>> anybody. I know that you all are quite busy, and don't want to bother >>>> wicket developers, but... it would be nice if the fix would be >>>> included in 1.4-rc5. It is a 10 minutes job, and still it is quite >>>> important. Thank you! >>>> >>>> Alex Objelean >>>> >>> >>> >> >> -- >> View this message in context: >> http://www.nabble.com/WICKET-2244-status-tp23634634p23639337.html >> Sent from the Wicket - Dev mailing list archive at Nabble.com. >> >> > > -- View this message in context: http://www.nabble.com/WICKET-2244-status-tp23634634p23639602.html Sent from the Wicket - Dev mailing list archive at Nabble.com.
