Sorry, you were right.

YES, overriding of validation messages now works as expected.

BUT overring of other messages doesn't work any longer. Example:
APage
-> XPanel "x"
-> DropDownChoice "y"
Now the string resource for a displayValue "0" will be searched in the 
following order:
APage.properties:
-> x.y.y.0
-> y.0
XPanel.properties
-> y.y.0
-> y.0

This is caused by the following slight difference:
- AbstractChoice 
getLocalizer().getString(getId() + "." + displayValue,this,displayValue);
- AbstractValidator
localizer.getString(resourceKey, formComponent.getParent(),resourceModel, "");

Both use the id of the component as a prefix in the resourceKey.
But AbstractChoice resolves the string against itself, while AbstractValidator 
resolves it against the parent of the component.

IMHO the id shouldn't be included in the resourcekey, this is now done by 
ComponentStringResourceLoader anyway.
But perhaps you prefer another solution - at least it has to be consistent.

Sven

>It works on my side. I created unit tests and I think they are ok. I
>enabled logging for the package and it doesn't happen. I tested the
>formInput example and it works without changes. Did you update
>AbstractValidator as well?
>
>Juergen


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to