ציטוט Dan Adams:

Okay,

good !

I have an object that operates as a singleton and is created by
spring. There are a number of properties that define support email
addresses. I want to be able to store these values in a
separate .properties so that i can easily use different files for
testing and production. So my questions are:

- How can I get the properties from an arbitrary object that is created
by spring (and if I have to create a resource bundle myself how do i get
the locale)?

This is a java thing... just as you access resource files in java, I guess through the class path...

The locale is available through tapestry/hivemind, either through the engine getPage().getEngine().getClass() or from some tapestry service...

- How do you load additional .properties files?

I would however reconsider the implementation:

If the bean is Business Logic and not presentation, whats the point of localized messaged in it? If its not avoidable, you can always pass a MessageSource to it on each method call.



Thanks. :)


Cheers,
Ron


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to