Hi there,

Nutshell version:
The problem is that I cannot seem to get access to the session from within
my MessageResources, so I cannot call my 'myWebSession.getLanguageId()'
method.

Explanation:
I need a MessageResources handler too solve two issues: 1) Pulling messages
from a DB table, and 2) Pulling messages that match a users 'languageId'
which is retrieved from the DB and set into the session when they logon.
Issue number 2 is the tricky one...

The languageId is an Integer and maps to a language table (e.g.: 1 =
English, 2 = Chinese). We do not use the notion of locales for legacy
reasons. In effect, in the MessageResources.getMessage(Locale locale, String
key) method, I need to call something like: 
Message message = messageFactory.getMessage(new Integer(key),
myWebSession.getLanguageId());

Of course it is my class so I can create a method to pass in the session,
but I have make sure the html:errors etc can use my MessageResources class.
Hopefully someone out there will point out that this is a simple problem,
and that I am missing something obvious...

Kind Regards,
Simon.





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

Reply via email to