sorry sent accidentally.

On 1 May 2012 16:16, Fergal Keating <fergal.keat...@directski.com> wrote:

>
> I have the following Dropdown added to my code.
>
> DropDownChoice<String> listSites = new
> DropDownChoice<String>("localeSelect", new PropertyModel<String>(this,
> "selected"), currentProductLocales)
>  {
> /**
>  *
>  */
> private static final long serialVersionUID = 1L;
>
>  protected boolean wantOnSelectionChangedNotifications()
> {
> return true;
>  }
>
> /**
>  * Called when a option is selected of a dropdown list that wants to
>  * be notified of this event.
>  *
>  * @param newSelection
>  *            The newly selected object of the backing model
>  */
> protected void onSelectionChanged(final String newSelection)
>  {
> List<LocaleCurrency> ListofLocalesCurrency = new
> ArrayList<LocaleCurrency>();
>  ListofLocalesCurrency =
> productController.getCurrencyCountry(MyAuthenticatedWebSession.get().getProduct());
>
> List<String> currentProductLocales = new ArrayList<String>();
>
> // get the list of currencies/countries/languages for this
> // product, and set them as default
>  for (LocaleCurrency localeCurrency : ListofLocalesCurrency)
> {
>
>  if (selected.equals(localeCurrency.getDisplayName()))
> {
> MyAuthenticatedWebSession.get().setLocalCurrency(localeCurrency);
>  localeCurrency.setDefaultLocale();
> }
>
> }
>  ;
> }
> };
>
>
>


-- 
Fergal Keating
IT Senior Engineer
-----------------------------------------------
e. fergal.keat...@directski.com
p. NA
w. www.directski.com

Reply via email to