Can anyone help me set up my properties file correctly? Thanks in advance!
Shelli -----Original Message----- From: Shelli D. Orton [mailto:[EMAIL PROTECTED] Sent: Thursday, December 13, 2007 9:13 AM To: users@wicket.apache.org Subject: RE: Trouble Localizing Validator Messages Hi, I'm using 1.2.5 Shelli -----Original Message----- From: Martijn Dashorst [mailto:[EMAIL PROTECTED] Sent: Thursday, December 13, 2007 1:38 AM To: users@wicket.apache.org Subject: Re: Trouble Localizing Validator Messages Which version of Wicket are you using? Martijn On Dec 13, 2007 1:06 AM, Shelli D. Orton <[EMAIL PROTECTED]> wrote: > Hi, > > I'm working on my first Wicket app and am hoping someone can tell me what > I'm doing wrong. I have a wizard component and on one of the steps I've > added a custom pattern validator (MyPatternValidator extends > PatternValidator) to one of the text fields. > > When the validation fails, I get the default wicket Application.propertiesmessage: > > PatternValidator='${input}' does not match pattern '${pattern}' > > I created a resource bundle to override the message with a single entry: > > MyPatternValidator=${input} contains invalid characters. > > Originally I created this in a MyApplication.properties resource bundle > (MyApplication being the Application class name) so that it was available > application wide. However, the app always returned the default message and > the logs only indicated that Wizard.properties file was loaded: > > Dec 12, 2007 4:50:30 PM wicket.resource.PropertiesFactoryloadPropertiesFileAndWatchForChanges > INFO: Loading properties files from file:/C:/tomcat-5.0.28 > /work/Catalina/localhost/myApp/loader/wicket/extensions/wizard/Wizard.proper ties > > I renamed the properties file to match my base page class and redeployed ( > MyBasePage.properties). MyPage extends the MyBasePage and contains the > Wizard. Again, I get the default message displayed, but the logs show that > the page specifice properties file was loaded and also the > Application.properties file (which didn't show in the first try???): > > Dec 12, 2007 4:59:12 PM wicket.resource.PropertiesFactoryloadPropertiesFileAndWatchForChanges > INFO: Loading properties files from file:/C:/tomcat-5.0.28 > /webapps/myApp/WEB-INF/classes/com/my/application/MyPage.properties > Dec 12, 2007 4:59:12 PM wicket.resource.PropertiesFactoryloadPropertiesFileAndWatchForChanges > INFO: Loading properties files from file:/C:/tomcat-5.0.28 > /work/Catalina/localhost/myApp/loader/wicket/extensions/wizard/Wizard.proper ties > Dec 12, 2007 4:59:18 PM wicket.resource.PropertiesFactoryloadPropertiesFileAndWatchForChanges > INFO: Loading properties files from file:/C:/tomcat-5.0.28 > /work/Catalina/localhost/myApp/loader/wicket/Application.properties > > I suspect I may have an issue with where I'm putting the properties file, > but if it loaded the file, why wouldn't it read/use the message? > > Any help/insight would be greatly appreciated. > > Thanks! > Shelli > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.0-rc1 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-rc1/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]