|
From: Seth L. <se...@eh...> - 2004-03-02 00:07:17
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 | (2) Improve the handling of Errors objects to allow message resources to be | specified as arguments that would not be resolved to their corresponding | messages until reaching the view. I really like this solution, but I have | not thought it through completely. One more note: since the errorArgs | parameter is an array of Objects (not an array of Strings), maybe there | would be a way to use a "Message" object that would be resolved at a later | time, while preserving the current functionality of Strings that are used | directly as arguments. For all I know, there is already a way to do this (it | seems logical enough), and I just don't know about it. This J2EE stuff is so | hard to keep up with... | Daniel, Spring seems to have an interface that says "Hi, I'm a resolvable Message". This is similar to the Message object you propose above. http://www.springframework.org/docs/api/org/springframework/context/MessageSourceResolvable.html I'm now subclasses ResourceBundleMessageSource to search through the message args, look for MessageSourceResolvable, and resolve it. I'm specifically reimplementing the getMessageInternal method from AbstractMessageSource. That's a little ugly, but that seems to be the point where the MessageFormat is used. Hope that helps, Seth -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFAQ81F5EIB1scRes8RAqRiAJ46Xm6+uoI/J7ci/3trE5JDcv+/sACghEdE Gc6YPhbEalOzhAAkbSC/chE= =1VaR -----END PGP SIGNATURE----- |