Hi,
The PropertyModel you've used does that for you. It *binds* the selection to
the properties object, using "answer", so it reads the "answer" property
from the properties when it wants to select an option to display , and sets
it to the properties when the form is submitted. So whatever is in
properties.get("answer") will be the default value.

On 2/25/07, Zhang Hailong <[EMAIL PROTECTED]> wrote:

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);

Thank you!


Regards,
Hailong Zhang

On 2/25/07, Iman Rahmatizadeh <[EMAIL PROTECTED] > wrote:
>
>    // Note that when the selection is null, Wicket will lookup a
> localized string to
>    // represent this null with key: "id + '.null'". In this case, this
> is 'site.null'
>    // which can be found in DropDownChoicePage.properties
>
> copied from the JavaDoc for DropDownChoice.
>
> On 2/25/07, Zhang Hailong <[EMAIL PROTECTED] > wrote:
>
> > Hi all,
> >
> > The default DropDownChoice always adds a "Choose One" option. How to
> > disable this?
> >
> > Thank you!
> >
> >
> > Regards,
> > Hailong Zhang
> >
> >
> > -------------------------------------------------------------------------
> > 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
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
> >
>
>
> -------------------------------------------------------------------------
> 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
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>

-------------------------------------------------------------------------
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
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


-------------------------------------------------------------------------
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
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to