that's true. i wouldn't like to have the code assume which bundle either. but now in hindsight, perhaps one bundle per language would be better than having the ability to specify many different bundles (per language). because in the end, all of the message keys would work just as well if they were all in the same bundle provided that care was taken to ensure that each message key was unique.
hmm... it really seems the ability to specify which bundle to use is more trouble than it's worth because now everytime we want to display a message we need to worry about the correct bundle. if organizing messages into separate files is really desired, then perhaps some sort of 'include' directive in these property files would be better. having only one bundle would also make it easier to build compound key messages (messages with multiple keys i guess, which is essentially what my original post was about -- however, it came about not from a bundle issue, but an optimization issue) and also to put in logic to display the key literally, instead of throwing an exception when the key is not found. to sum up, we would have: - one bundle per language (get rid of need to specify bundle in all places) - the ability to include other property files from within property files - modify to display all message keys literally if not found in bundle (and assume all parameters are keys) that would be perfect, wouldn't it? woodchuck --- Joe Germuska <[EMAIL PROTECTED]> wrote: > At 9:43 AM -0800 12/21/04, Woodchuck wrote: > >doesn't it seem odd that ActionMessage doesn't already have the > ability > >to use other keys as replacement values... i can't think of any > reason > >for this other than it was simply forgotten > > Well, it's more complicated than that - is it safe to assume that the > > replacement-keys are in the same bundle as the original message? It > may seem obvious, but given the number of Struts users, we tend to be > > reluctant to build assumptions like that into the code. > > Also, in a constructor that takes objects, there's no way to > distinguish whether the object is intended as a literal value or as a > > key to be looked up. You'd have to come up with some alternate > syntax. > > Finally, I don't think it's all that common of a scenario. I've been > > writing Struts apps for three years, and haven't needed anything like > > what you describe. Struts grows and extends when people have > "itches" that need "scratching." > > If you feel like scratching this itch, feel free to post an > enhancement request in bugzilla. Better yet, attach patches to it > that implement a solution! > > Joe > -- > Joe Germuska > [EMAIL PROTECTED] > http://blog.germuska.com > "Narrow minds are weapons made for mass destruction" -The Ex > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > __________________________________ Do you Yahoo!? Yahoo! Mail - now with 250MB free storage. Learn more. http://info.mail.yahoo.com/mail_250 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]