My apologies for being unclear... Yes the Bean has one method called getMonths()... and in this method I will return the appropriate months based on the locale.
It is just that getting/passing the Locale to the getMonths() in a JSP is not really elegant. JSP code: <html:select property="toMonth" styleClass="dropdowns"> <html:optionsCollection name="ApplicationBean" property="months(foo)" label="label" value="value"/> </html:select> And wondering if there are other options... - Glenn mike <[EMAIL PROTECTED]> 16/06/2004 03:25 PM Please respond to "Struts Users Mailing List" To: "Struts Users Mailing List" <[EMAIL PROTECTED]>, [EMAIL PROTECTED] cc: Subject: Re: ServletContextListener 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]