Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Duplicate
-
1.5.4
-
None
Description
I have a custom MyValidator.java and corresponding MyValidator.properties that contains translations for errors. This is working with Wicket 1.4.18 and 1.4.19. The same thing is not working with Wicket 1.5.4.
I get following message when MyValidator triggers in Wicket 1.5:
Could not locate error message for component: TextField@form:field and error: [ValidationError message=[null], keys=[MyValidator.invalid], variables=[null]]. Tried keys: field.MyValidator.invalid, MyValidator.invalid.
I get following message in Wicket 1.4:
This is MyValidator msg
According the log, the MyValidator.properties is not read at all in Wicket 1.5:
DEBUG - Localizer - Locate property: key: 'field.MyValidator.invalid'; Component: '[TextField [Component id = field]]'
DEBUG - ponentStringResourceLoader - component: '[TextField [Component id = field]]'; key: 'field.MyValidator.invalid'
DEBUG - ponentStringResourceLoader - key: 'form.field.field.MyValidator.invalid'; class: 'com.mycompany.HomePage'; locale: 'fi_FI'; Style: 'null'; Variation: 'null'
DEBUG - ponentStringResourceLoader - key: 'field.MyValidator.invalid'; class: 'com.mycompany.HomePage'; locale: 'fi_FI'; Style: 'null'; Variation: 'null'
DEBUG - ponentStringResourceLoader - key: 'field.field.MyValidator.invalid'; class: 'com.mycompany.HomePage$1'; locale: 'fi_FI'; Style: 'null'; Variation: 'null'
DEBUG - ponentStringResourceLoader - key: 'field.MyValidator.invalid'; class: 'com.mycompany.HomePage$1'; locale: 'fi_FI'; Style: 'null'; Variation: 'null'
DEBUG - ponentStringResourceLoader - key: 'field.MyValidator.invalid'; class: 'org.apache.wicket.markup.html.form.TextField'; locale: 'fi_FI'; Style: 'null'; Variation: 'null'
DEBUG - ponentStringResourceLoader - component: '[TextField [Component id = field]]'; key: 'field.MyValidator.invalid'
DEBUG - ponentStringResourceLoader - component: '[TextField [Component id = field]]'; key: 'field.MyValidator.invalid'
DEBUG - ponentStringResourceLoader - key: 'form.field.field.MyValidator.invalid'; class: 'com.mycompany.WicketApplication'; locale: 'fi_FI'; Style: 'null'; Variation: 'null'
INFO - PropertiesFactory - Loading properties files from jar:file:/C:/Users/K838349/.m2/repository/org/apache/wicket/wicket-core/1.5.4/wicket-core-1.5.4.jar!/org/apache/wicket/Application_fi.properties with loader org.apache.wicket.resource.IsoPropertiesFilePropertiesLoader@1fac852
INFO - PropertiesFactory - Loading properties files from jar:file:/C:/Users/K838349/.m2/repository/org/apache/wicket/wicket-core/1.5.4/wicket-core-1.5.4.jar!/org/apache/wicket/Application.properties with loader org.apache.wicket.resource.IsoPropertiesFilePropertiesLoader@1fac852
DEBUG - ponentStringResourceLoader - key: 'field.MyValidator.invalid'; class: 'com.mycompany.WicketApplication'; locale: 'fi_FI'; Style: 'null'; Variation: 'null'
DEBUG - ponentStringResourceLoader - key: 'field.field.MyValidator.invalid'; class: 'com.mycompany.WicketApplication'; locale: 'fi_FI'; Style: 'null'; Variation: 'null'
DEBUG - ponentStringResourceLoader - key: 'field.MyValidator.invalid'; class: 'com.mycompany.WicketApplication'; locale: 'fi_FI'; Style: 'null'; Variation: 'null'
DEBUG - ponentStringResourceLoader - key: 'field.MyValidator.invalid'; class: 'com.mycompany.WicketApplication'; locale: 'fi_FI'; Style: 'null'; Variation: 'null'
DEBUG - ponentStringResourceLoader - key: 'field.MyValidator.invalid'; class: 'org.apache.wicket.validation.ValidatorAdapter'; locale: 'fi_FI'; Style: 'null'; Variation: 'null'
DEBUG - ponentStringResourceLoader - key: 'field.MyValidator.invalid'; class: 'org.apache.wicket.validation.validator.StringValidator$MaximumLengthValidator'; locale: 'fi_FI'; Style: 'null'; Variation: 'null'
DEBUG - ponentStringResourceLoader - key: 'field.MyValidator.invalid'; class: 'org.apache.wicket.Initializer'; locale: 'fi_FI'; Style: 'null'; Variation: 'null'
DEBUG - Localizer - Property not found; key: 'field.MyValidator.invalid'; Component: '[TextField [Component id = field]]'
DEBUG - Localizer - Property found in cache: 'field.MyValidator.invalid'; Component: '[TextField [Component id = field]]'; value: 'null'
DEBUG - Localizer - Locate property: key: 'MyValidator.invalid'; Component: '[TextField [Component id = field]]'
DEBUG - ponentStringResourceLoader - component: '[TextField [Component id = field]]'; key: 'MyValidator.invalid'
DEBUG - ponentStringResourceLoader - key: 'form.field.MyValidator.invalid'; class: 'com.mycompany.HomePage'; locale: 'fi_FI'; Style: 'null'; Variation: 'null'
DEBUG - ponentStringResourceLoader - key: 'MyValidator.invalid'; class: 'com.mycompany.HomePage'; locale: 'fi_FI'; Style: 'null'; Variation: 'null'
DEBUG - ponentStringResourceLoader - key: 'field.MyValidator.invalid'; class: 'com.mycompany.HomePage$1'; locale: 'fi_FI'; Style: 'null'; Variation: 'null'
DEBUG - ponentStringResourceLoader - key: 'MyValidator.invalid'; class: 'com.mycompany.HomePage$1'; locale: 'fi_FI'; Style: 'null'; Variation: 'null'
DEBUG - ponentStringResourceLoader - key: 'MyValidator.invalid'; class: 'org.apache.wicket.markup.html.form.TextField'; locale: 'fi_FI'; Style: 'null'; Variation: 'null'
DEBUG - ponentStringResourceLoader - component: '[TextField [Component id = field]]'; key: 'MyValidator.invalid'
DEBUG - ponentStringResourceLoader - component: '[TextField [Component id = field]]'; key: 'MyValidator.invalid'
DEBUG - ponentStringResourceLoader - key: 'form.field.MyValidator.invalid'; class: 'com.mycompany.WicketApplication'; locale: 'fi_FI'; Style: 'null'; Variation: 'null'
DEBUG - ponentStringResourceLoader - key: 'MyValidator.invalid'; class: 'com.mycompany.WicketApplication'; locale: 'fi_FI'; Style: 'null'; Variation: 'null'
DEBUG - ponentStringResourceLoader - key: 'field.MyValidator.invalid'; class: 'com.mycompany.WicketApplication'; locale: 'fi_FI'; Style: 'null'; Variation: 'null'
DEBUG - ponentStringResourceLoader - key: 'MyValidator.invalid'; class: 'com.mycompany.WicketApplication'; locale: 'fi_FI'; Style: 'null'; Variation: 'null'
DEBUG - ponentStringResourceLoader - key: 'MyValidator.invalid'; class: 'com.mycompany.WicketApplication'; locale: 'fi_FI'; Style: 'null'; Variation: 'null'
DEBUG - ponentStringResourceLoader - key: 'MyValidator.invalid'; class: 'org.apache.wicket.validation.ValidatorAdapter'; locale: 'fi_FI'; Style: 'null'; Variation: 'null'
DEBUG - ponentStringResourceLoader - key: 'MyValidator.invalid'; class: 'org.apache.wicket.validation.validator.StringValidator$MaximumLengthValidator'; locale: 'fi_FI'; Style: 'null'; Variation: 'null'
DEBUG - ponentStringResourceLoader - key: 'MyValidator.invalid'; class: 'org.apache.wicket.Initializer'; locale: 'fi_FI'; Style: 'null'; Variation: 'null'
DEBUG - Localizer - Property not found; key: 'MyValidator.invalid'; Component: '[TextField [Component id = field]]'
DEBUG - Localizer - Property found in cache: 'MyValidator.invalid'; Component: '[TextField [Component id = field]]'; value: 'null'
WARN - FormComponent - Could not locate error message for component: TextField@form:field and error: [ValidationError message=[null], keys=[MyValidator.invalid], variables=[null]]. Tried keys: field.MyValidator.invalid, MyValidator.invalid.
onerror
I will attach quickstarts from Wicket 1.4 and Wicket 1.5 versions.
Attachments
Attachments
Issue Links
- duplicates
-
WICKET-4379 org.apache.wicket.validation.ValidatorAdapter class causes problem with validator properties to be loaded
- Resolved