Re: [Wicket-user] DownDownChoice problem

2006-09-22 Thread Dumitru Postoronca
Johan Compagner wrote: > This is wrong. > > This is mentioned before on the list: The model object that is the > selected object > should be the same kind of object that is in the choices (the list) > > that is just a one-one mapping. > > so if your list is: > final static List OPTIONS = Arrays

Re: [Wicket-user] DownDownChoice problem

2006-09-22 Thread Johan Compagner
This is wrong.This is mentioned before on the list: The model object that is the selected objectshould be the same kind of object that is in the choices (the list)that is just a one-one mapping. so if your list is: final static List OPTIONS = Arrays.asList(new String[] {"Opt1", "Opt2", "Opt3"});th

Re: [Wicket-user] DownDownChoice problem

2006-09-22 Thread Gwyn Evans
How about... add(new DropDownChoice( "options2", new Model(getDefaultSelection(getMyOptionValue())), OPTIONS) { protected String getDefaultChoice( final Object selected ) { return ""; // remove "Choose One" prompt

Re: [Wicket-user] DownDownChoice problem

2006-09-22 Thread Dumitru Postoronca
Gwyn Evans wrote: > What does "c.getMyOptionValue()" return? > > This... > public HomePage() { > add(new DropDownChoice( > "options", > new Model(getMyOptionValue()), > OPTIONS) > { > protected String getDefaultChoice(

Re: [Wicket-user] DownDownChoice problem

2006-09-21 Thread Gwyn Evans
What does "c.getMyOptionValue()" return? This... public HomePage() { add(new DropDownChoice( "options", new Model(getMyOptionValue()), OPTIONS) { protected String getDefaultChoice(final Object selected) {

Re: [Wicket-user] DownDownChoice problem

2006-09-21 Thread Igor Vaynberg
what you do seems like it should work.so maybe what you can do is download wicket-quickstart project, add the minimum amount of your code to it to reproduce the problem and attach it to the email. that way whoever wants to help you can download the project and run it in the ide and see the problem

Re: [Wicket-user] DownDownChoice problem

2006-09-21 Thread Dumitru Postoronca
Igor Vaynberg wrote: > can we see a quickstart? > > -Igor > I'm sorry but I don't understand what you mean. (maybe that's because I'm new to java :) - posto - Take Surveys. Earn Cash. Influence the Future of IT Join Sourc

Re: [Wicket-user] DownDownChoice problem

2006-09-21 Thread Igor Vaynberg
can we see a quickstart?-IgorOn 9/21/06, Dumitru Postoronca <[EMAIL PROTECTED] > wrote:Hello everyone,   I want to create an edit form and I'm trying to set the selected item of a DropDownChoice to match what I have in the database.The form constructor looks like this:-public ClientEditPage(Cli

[Wicket-user] DownDownChoice problem

2006-09-21 Thread Dumitru Postoronca
Hello everyone, I want to create an edit form and I'm trying to set the selected item of a DropDownChoice to match what I have in the database. The form constructor looks like this: - public ClientEditPage(Client c) {...} - The code that sets the form looks like this: - final st