You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by eugenebalt <eu...@yahoo.com> on 2012/08/29 00:23:10 UTC

Pre-Select DropDownChoice Selection, but No Model yet

I am in the form-construction part of my code (the Model has not been created
yet, because Submit hasn't been pressed yet).

I have a DropDownChoice, and I need to pre-select a certain item. How do I
do it? The DropDownChoice has already been constructed.

I can't do setModelObject(..) because the model is still null at this point,
I get an error. Thanks



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Pre-Select-DropDownChoice-Selection-but-No-Model-yet-tp4651578.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


RE: Pre-Select DropDownChoice Selection, but No Model yet

Posted by Paul Bors <pa...@bors.ws>.
Drop downs are some of the difficult ones to get at first, but once you
understand one of them you're good to go!

See:
http://wicket.apache.org/learn/examples/dropdownchoice.html (the "Selecting
a default choice")
https://cwiki.apache.org/WICKET/dropdownchoice-examples.html

Or see the FormInput live example:
http://www.wicket-library.com/wicket-examples/forminput

~ Thank you,
  Paul Bors

-----Original Message-----
From: eugenebalt [mailto:eugenebalt@yahoo.com] 
Sent: Tuesday, August 28, 2012 6:33 PM
To: users@wicket.apache.org
Subject: Re: Pre-Select DropDownChoice Selection, but No Model yet

(Note: In my form, I am using a CompoundPropertyModel. So my DropDownChoice
is automatically tied to the field in my bean.)



--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/Pre-Select-DropDownChoice-Selecti
on-but-No-Model-yet-tp4651578p4651579.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Pre-Select DropDownChoice Selection, but No Model yet

Posted by eugenebalt <eu...@yahoo.com>.
(Note: In my form, I am using a CompoundPropertyModel. So my DropDownChoice
is automatically tied to the field in my bean.)



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Pre-Select-DropDownChoice-Selection-but-No-Model-yet-tp4651578p4651579.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org