2 things:

1. Probably you should use an IChoiceRenderer in addition to your current list.
2. you *replace* the component, and with it the selected value, better
to use a lazy model to retrieve the list of countries, instead of
pushing it to the component

ad 2:

new DDC("countries", new Model() { public void getObject(...) { return
getCountries(); } }, new CountryChoiceRenderer());

Martijn

On 3/29/07, Toscano <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> I had the following: one extended DropDownChoice with different languages
> and some fields in a form. When the user changes it, I get success in
> getting the translation of everything in the page, and also Wicket maintains
> whatever the user wrote in the fields, so it's nice. But I have a problem
> with one DropDownChoice which cointains countries.
> By default, it show the english names of all the countries in the world. In
> the onSelectionChanged of the languages DropDownChoice I reload the country
> names from the database, and make the following:
>
>          countries  = new DropDownChoice("country", getCountries());
>          userInformationForm.replace(countries);
>
> It works, at the same time I change the language, I get the country list in
> that language, but if the user selected one country, I can't maintain his
> selection...
>
> Any ideas? It should be easy as long as the ID of the country is the same...
>
> Thank you very very much for your help,
> Oskar
>
> --
> View this message in context: 
> http://www.nabble.com/Internationalization-and-DropDownChoice-tf3485705.html#a9731005
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Wicket-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>


-- 
Learn Wicket at ApacheCon Europe: http://apachecon.com
Join the wicket community at irc.freenode.net: ##wicket
Wicket 1.2.5 will keep your server alive. Download Wicket now!
http://wicketframework.org

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to