You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Andrew MacKenzie <am...@edespot.com> on 2007/10/25 17:21:40 UTC

DropDownChoice model being lost.

I'm having a number of problems with DropDownChoices in Wicket.

I have a rather complex page that has a form with multiple submit buttons
and ListView within ListView within ListView.

In the lowest ListView I have a drop down and a text field.  The text field
works fine, but the drop down gives me many headaches.

I'm using setReuseItems(true) on each ListView.  The selection list for the
drop down is driven by a Hibernate DAO, as is the selected choice (for the
TextFields as well).

When the default submit button is clicked the Model backing the
DropDownChoices is not updated - the TextField is updated fine however.

When a non-default submit button which calls "getForm().process()" is
clicked the DropDownChoices 'lose' their state and all display the default
choice ("Choose One").  

I can't really include a simple 'quick start' to demostrate this as it's
rather complex to setup and would take some time...  

Are there any known 'pitfalls' or 'gotchas' with drop downs that I am
missing?  The TextFields seem to behave just fine.  

-- 
// Andrew MacKenzie  |  http://www.edespot.com
// GPG public key: http://www.edespot.com/~amackenz/public.key
// Re graphics: A picture is worth 10K words - but only those to describe
// the picture. Hardly any sets of 10K words can be adequately described with
// pictures.
//     - Alan Perlis