Hi,
I asked a variation of this question recently but didn't get a response. I'm
still stumped, so am trying again. I am using Wicket 1.2.6 and Tomcat 5.0.28
and have created 2 custom validators:
com.my.company.MyPatternValidator
com.my.company.MyStringValidator
where MyPatternValidator extends PatternValidator and MyStringValidator extends
StringValidator. I have also created properties files for each class within a
directory structure that match the classpath:
com/my/company/MyPatternValidator.properties
com/my/company/MyStringValidator.properties
The class that extends PatternValidator uses the default message from
Application.properties instead of the message defined in its properties file.
The logs show that the Wizard and Application resources are being loaded:
Dec 28, 2007 2:31:24 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 28, 2007 2:31:34 PM wicket.resource.PropertiesFactory
loadPropertiesFileAndWatchForChanges
INFO: Loading properties files from
file:/C:/tomcat-5.0.28/work/Catalina/localhost/myApp/loader/wicket/Application.properties
The other that extends StringValidator throws this exception:
java.util.MissingResourceException: Unable to find resource: MyStringValidator
for component: wizard:form:view:service.name
I have checked and tomcat-5.0.28/work/Catalina/localhost/myApp also contains
/com/my/company/MyPatternValidator.properties and
/com/my/company/MyStringValidator.properties files.
Can somebody please explain to me (or point me to a resource) how to set up
properties files in Wicket so that they can be found? Any help is greatly
appreciated!
Shelli
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]