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.properties 
message:

    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.PropertiesFactory 
loadPropertiesFileAndWatchForChanges
    INFO: Loading properties files from 
file:/C:/tomcat-5.0.28/work/Catalina/localhost/myApp/loader/wicket/extensions/wizard/Wizard.properties

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.PropertiesFactory 
loadPropertiesFileAndWatchForChanges
    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.PropertiesFactory 
loadPropertiesFileAndWatchForChanges
    INFO: Loading properties files from 
file:/C:/tomcat-5.0.28/work/Catalina/localhost/myApp/loader/wicket/extensions/wizard/Wizard.properties
    Dec 12, 2007 4:59:18 PM wicket.resource.PropertiesFactory 
loadPropertiesFileAndWatchForChanges
    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]

Reply via email to