struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Baljeet Nijjhar <Baljeet.Nijj...@gmail.com>
Subject Struts 1.3.9 validation oddity - If non-default bundle specified for 'msg', 'arg' must also define bundle attribute
Date Tue, 05 Jan 2010 12:22:52 GMT

Hi
I am using Struts 1.3.9 and validator_1_3_0.dtd. I have defined some message
resources in my struts-moduleX.xml as follows:




I then define a field validation for e.g. propertyX in my
validation-moduleX.xml as follows:


   
   


In this case, I place both 'label.propertyX' and 'errors.mask.propertyX' in
ApplicationResources, both are found ok, and the message displays the text
of both keys correctly.
If I place both in ModuleXResources, and define the validation without
specifying a bundle as follows:


   
   


the message also displays correctly.
If I place the arg key 'label.propertyX' in ApplicationResources and the msg
key 'errors.mask.propertyX' in ModuleXResources, and define the validation
as follows:


   
   


the message also displays correctly.
HOWEVER, if I place the arg key 'label.propertyX' in ModuleXResources and
the msg key 'errors.mask.propertyX' in ApplicationResources, and define the
validation as follows:


   
   


then I get '??label.propertyX??' in my message - i.e. label.propertyX is not
located.
Basically, it seems that if I specify a bundle attribute for the msg key,
then I must specify a bundle attribute for the arg key (even if it is a
different bundle) - it cannot find the arg key if it is left in the default
bundle.
As I would like the flexibility of choosing where to put my keys, I would
appreciate some explanation as to why this is so, or whether it is a bug.
thanks, Baljeet.
-- 
View this message in context: http://old.nabble.com/Struts-1.3.9-validation-oddity---If-non-default-bundle-specified-for-%27msg%27%2C-%27arg%27-must-also-define-bundle-attribute-tp27026593p27026593.html
Sent from the Struts - User mailing list archive at Nabble.com.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message