Re: How to pre-select a DropDownChoice

2008-03-17 Thread Erik van Oosten
http://cwiki.apache.org/WICKET/dropdownchoice.html Hoover, William wrote: Can you add this to the wiki (http://cwiki.apache.org/WICKET/dropdownchoice-examples.html)? It seems like a commonly asked question :o) - To

Re: How to pre-select a DropDownChoice

2008-03-14 Thread Juan Gabriel Arias
DropDownChoice has a lot of contructors. One of them, DropDownChoice(String id, IModel model, IModel choices, ...) The first model, could be named selectedModel. And represents the selected object, with a wicket model.

Re: How to pre-select a DropDownChoice

2008-03-14 Thread Erik van Oosten
Funny, I answered the same question to my colleague this morning. Below the code I gave him. What happens is that the model is wrapped in another model. The wrapping model has a defaultModel that is used to return a value when the underlying model returns null. Below the model wrapper you find

RE: How to pre-select a DropDownChoice

2008-03-14 Thread Hoover, William
to pre-select a DropDownChoice Funny, I answered the same question to my colleague this morning. Below the code I gave him. What happens is that the model is wrapped in another model. The wrapping model has a defaultModel that is used to return a value when the underlying model returns null. Below

RE: How to pre-select a DropDownChoice

2008-03-14 Thread Michael Mehrle
Yeah, I figured that out last night. That's actually a great way of handling the component's state. Thanks for your input. -Original Message- From: Nick Heudecker [mailto:[EMAIL PROTECTED] Sent: Thursday, March 13, 2008 5:57 PM To: users@wicket.apache.org Subject: Re: How to pre-select

Re: How to pre-select a DropDownChoice

2008-03-13 Thread Nick Heudecker
Set the model of the DDC to the value you want to have selected. On Thu, Mar 13, 2008 at 7:53 PM, Michael Mehrle [EMAIL PROTECTED] wrote: I feel silly asking this, but I can't figure it out. I need to set my DropDownChoice component to the id I'm passing into my page via a pageparam. How do I