DropDownChoice - how to select default item

2010-09-01 Thread drf
this message in context: http://apache-wicket.1842946.n4.nabble.com/DropDownChoice-how-to-select-default-item-tp2402960p2402960.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users

Re: DropDownChoice - how to select default item

2010-09-01 Thread Sven Meier
Should be working fine. Are you sure you're showing the actual code, i.e. accountList vs accountsList ? BTW are you accounts really just represented as Longs? Regards Sven On 09/01/2010 01:15 PM, drf wrote: I am having a problem that my DropDownChoice is not selecting the item I expect,

Re: DropDownChoice - how to select default item

2010-09-01 Thread drf
] View message @ http://apache-wicket.1842946.n4.nabble.com/DropDownChoice-how-to-select-default-item-tp2402960p2402968.html To unsubscribe from DropDownChoice - how to select default item, click here. -- View this message in context: http://apache-wicket.1842946.n4

Re: DropDownChoice - how to select default item

2010-09-01 Thread Michael O'Cleirigh
. - To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] View message @ http://apache-wicket.1842946.n4.nabble.com/DropDownChoice-how-to-select-default-item

Re: DropDownChoice - how to select default item

2010-09-01 Thread drf
, will this still help? David -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/DropDownChoice-how-to-select-default-item-tp2402960p2403224.html Sent from the Wicket - User mailing list archive at Nabble.com

Re: DropDownChoice - how to select default item

2010-09-01 Thread Sven Meier
Hi, your dropdown accesses the selected account via a model, so it should work regardless when you initialize the selectedAccount variable. Put a breakpoint on that line and check the return value of getDefaultAccount(). BTW using ModelAccount and IChoiceRenderer gives you some advantages

Re: DropDownChoice - how to select default item

2010-09-01 Thread drf
.1842946.n4.nabble.com/DropDownChoice-how-to-select-default-item-tp2402960p2403250.html To unsubscribe from DropDownChoice - how to select default item, click here. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/DropDownChoice-how-to-select-default-item-tp2402960p2403304

Re: DropDownChoice - how to select default item

2010-09-01 Thread T Ames
Mike may have been referring to the usage of this when he was talking about the constructor. I create drop downs in constructors with no issue, I have not however used a this with a property model. Wild guess: possibly java is in the process of constructing the object, but DropDownChoice cannot

Re: DropDownChoice - how to select default item

2010-09-01 Thread Sven Meier
Of course you can use this inside the constructor. I've thrown together the following example and it works (of course): public class AccountPage extends WebPage { private ListLong accountList = new ArrayListLong(); private Long selectedAccount; public AccountPage() {

Re: DropDownChoice - how to select default item

2010-09-01 Thread andrea del bene
Hi drf! Have you checked the generated HTML? Is there any 'selected' attribute in your option tags? I am having a problem that my DropDownChoice is not selecting the item I expect, only Choose one. Here is the code: ... private ListLong accountList = new ArrayListLong(); private Long