You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Fergal Keating <fe...@directski.com> on 2012/05/01 17:16:25 UTC

JSessionID breaking my dropdown

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();
}

}
;
}
};

Re: JSessionID breaking my dropdown

Posted by Fergal Keating <fe...@directski.com>.
sorry sent accidentally.

On 1 May 2012 16:16, Fergal Keating <fe...@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.keating@directski.com
p. NA
w. www.directski.com