struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Van Riper, Mike" <mvanri...@verisign.com>
Subject RE: No Keys Loaded For Validation
Date Thu, 27 Nov 2003 00:31:41 GMT
> -----Original Message-----
> A really strange thing also is that if I copy the:
>       registration.validation.missingCurrentCustomer=Please 
> indicate if
> you are a current customer.
> into my default resource bundle, all messages display properly.
> 
> Anyone have any idea what is going on?

Since there is no way right now to specify the bundle for the message
resource lookup, the default resource bundle is always used for these
message resource lookups in the commons-validator packaged with the Struts
1.1 release. I'm not certain, but, one way around this in Struts 1.1 could
be the use of modules. I do use multiple resource files, but, I don't use
modules as of yet. I'm not suggesting you convert something to use modules
just for this, but, you would have a separate default bundle for each module
in that case. If that did work though, it would mean that you would have to
replicate the common error message resources to the default bundle for each
module. Which is the flip side of the same problem given the inability to
specify the bundle for validations right now.

What you really want is the bundle attribute in your validation elements
that specify keys for message resources. I wouldn't be surprised if adding
the ability to specify the bundle optionally when specifying message
resources in your validation.xml is on the near future roadmap for the
validation framework. I do know this issue has been raised before.

Cheers, Van

P.S. Heck, I'd even be willing to work on this particular feature myself in
the commons-validator. I took great care in setting up my last project with
separate config files and resource files for individual sections of the app
only to find out that all validation messages had to go in the one default
resource file for the app. :-(

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message