Hi,

I'm migrating an existing (Spring MVC) JSP application to Wicket and this
application already has i18n with just one largish properties file, named as
per Spring tradition "messages.properties".

I'm using Wicket 1.2.4.  I was able to easily delegate looking up of
messages to Spring's "MessageSource" by doing
getResourceSettings().addStringResourceLoader(new IStringResourceLoader() in
the Application class.  This is working fine.

My problem is when I have a custom Validator attached to a form component.
In the Validator, I am trying to force the resourceKey that will be used to
resolve the error message by overriding "protected String
resourceKey(FormComponent)".

The problem is the Component id is always being prefixed to whatever I try
to set the resourceKey to. All I want to do is to tell wicket to use a
specific key as-is for a validation error and not prefix anything to it.

I guess that if I were using the Wicket default StringResourceLoader, I
could have used an ApplicationName.properties to "generalize" messages.  But
you see my problem, this is a migration and I would really like to use my
existing resource bundles as is and I am tied to the Spring message source
for now.

Any way around this?

Thanks,

Peter.
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to