At 12:13 PM 6/16/2004, [EMAIL PROTECTED] wrote:
Greetings,

I have created a ServletContextListener that sets a Bean in the
application scope.
This Bean contains 2 list of Months... and these lists contain
LabelValueBeans.

My uncertainty is on the best way to get my JSP to use the appropriate
List depending on the locale.

JSP code:
Option One: Do I pass as a parameter to the months method the Locale? Any other suggestions would be appreciated. :) - Glenn

What "months method"? I assume you mean that your bean has some method called getMonths()?


If so, there is clearly a problem making the method getMonths(Locale locale) with a bean. If you have only two locales, then you might want to do the otherwise dumb thing and use two methods which are chosen depending on the locale, e.g.:


if(locale == ?) { bean.getMonthLocaleA(); } else { bean.getMonthLocaleB(); }

This helpful?

Michael




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



Reply via email to