[Wicket-user] RE: combo box displaying choose one

2006-05-31 Thread Andrew Strickland



If you call setNullValid(true) the default "null" value will be an empty string instead of "Choose One"

Andy

"When I reach with the selection in a combo box, to the first item in the list, wicket places a "Choose one" option as the first item in the combo. Am I doing something wrong or ... does anybody know how to avoid this ? "




Re: [Wicket-user] RE: combo box displaying choose one

2006-05-31 Thread Vincent Jenks

add(new DropDownChoice(dropdown, model, values)
{
protected String getDefaultChoice(final Object selected)
{
   return ; //this fixes your problem...
}

public String getDisplayValue(Object object)
{
return object.toString();
}

public String getIdValue(Object object, int index)
{
return object.toString();
}   
})


---
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnkkid=107521bid=248729dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user