You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Bailey, Shane C." <SH...@saic.com> on 2003/05/23 23:20:06 UTC

Why would you use the key attribute in ?

What case(s) would provoke the use of the key attribute of

the message-resources tag in the struts config?

 

I only ask this because that was what was screwing up my

validation errors reporting from substituting the key values.

 

I think I added the key to mine early on in my Struts 1.1

development and didn't think much about it.  I thought I

should do that so that there would be no naming conflicts.

I saw the documentation saying that the module name

would be appended automagically but I didn't think that

having a key value there would be a problem.

 

I am going to stick with no key value for my message-resources

in my module but I am just curious how validation error

reporting would work with a key value for that tag?

 

As I posted before I can use bundle="<key-value>/module"

for bean:message and such.  But it seems like the

validation.xml arg0 needs a bundle attribute perhaps,

in case someone uses the key attribute for message-resources.

 

 


Re: Why would you use the key attribute in ?

Posted by Ted Husted <hu...@apache.org>.
Bailey, Shane C. wrote:
 > What case(s) would provoke the use of the key attribute of
 >
 > the message-resources tag in the struts config?

Some people like to load more than one message resource, for 
organizational reasons.

You can then refer to the key in the corresponding tags, to get a 
message from an alternate bundle.

-Ted.


-- 
Ted Husted,
Struts in Action <http://husted.com/struts/book.html>



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