On 11/27/05, Niall Pemberton <[EMAIL PROTECTED]> wrote: > > A couple of questions I had on the resources API: > > 1) I was wondering why TimeZone is include in the Resources's content > read methods? Is there a use case, for example, for giving west coast > Americans a different message to east coast?
Some of the format options for displaying times take a time zone parameter (so that it can be included in the emitted string). Simply pass null if it doesn't matter to you. 2) A couple of possible suggestions for inclusion in the Message interface: > 2.1) Struts has "non resource" messages where the message contains the > actual message text, rather than a key to a resource - is it worth > adding an "isResource()" method to Message? I guess I'm not seeing the difference ... "resources" in the name of the package was intended to support the retrieval of localized string messages or non-string resources that correspond to a key. 2.2) Its been requested in Struts that the Message object include the > name of the Resources it comes from - that way Messages can contain > messages from multiple resources. Is it worth adding a > "getResourcesName()" method to the Message interface? Why not have a property of type Resources so you can refer to it directly, rather than inventing a new identifier? It would also be worth thinking through whether one can easily configure Resources instances with a dependency injection framework ... Niall Craig
