> Hi Iman,
>
> Thank you for your response.
> But How to set the default selection?
> My DropDownChoice defined as follows:
> DropDownChoice choices = new DropDownChoice("answerChoices", new
> PropertyModel(properties, "answer"), ANSWERS);

Drop down matches the current model value with the available
alternatives. In your case, the model comes from 'answer' on
'properties', so whatever properties.get("answer") returns will be
your current selection. Do keep in mind Wicket has to be able to match
that value with the available choices you provided (ANSWERS). For your
choices, use objects that have hashCode and equals implemented
properly, and for custom objects, consider using IChoiceRenderer.

Eelco

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to