Thanks

No, it does not appear to be working
I have an Account object, but for the dropdown display I am just
extracting a list of Long values. Is that the correct thing to do?
The accountList v accountsList is just a typing error in the email



On Wed, Sep 1, 2010 at 2:26 PM, Sven Meier [via Apache Wicket]
<[email protected]> wrote:
> 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, only "Choose one". Here is the code:
>> ...
>> private List<Long>  accountList = new ArrayList<Long>();
>> private Long selectedAccount;
>>
>> public AccountsDropDownChoice(String id, final Component component) {
>>     super(id);
>>     initializeAccounts();
>>     selectedAccount = getDefaultAccount();
>>
>>     final DropDownChoice<Long>  dropDown = new
>> DropDownChoice<Long>("accountsDropDown",
>>
>> new PropertyModel(this, "selectedAccount"),
>>
>> accountsList) {
>>
>>     }
>>
>> The value selectedAccount is being updated correctly when an item in the
>> dropdown is selected, but the dropdown is not defaulting to the value in
>> that field to begin with. If anyone can help it is very appreciated.
>>
>
> ---------------------------------------------------------------------
> 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-tp2402960p2402968.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-tp2402960p2402993.html
Sent from the Wicket - User mailing list archive at Nabble.com.

Reply via email to