Wicket Framework DropDownChoice component has default 'Choose one' value by default. To remove that add a override method following:
List<String>employeeNameList=new ArrayList<String>();
employeeNameList.add("Soora");
employeeNameList.add("padman");
employeeNameList.add("kiran");
DropDownChoice employeeNameList = new DropDownChoice("employees",employeeNameList) {
@Override
protected CharSequence getDefaultChoice(String selectedValue) {
// put return type as empty so that default value will be removed
return " ";
}
}
List<String>employeeNameList=new ArrayList<String>();
employeeNameList.add("Soora");
employeeNameList.add("padman");
employeeNameList.add("kiran");
DropDownChoice employeeNameList = new DropDownChoice("employees",employeeNameList) {
@Override
protected CharSequence getDefaultChoice(String selectedValue) {
// put return type as empty so that default value will be removed
return " ";
}
}
No comments:
Post a Comment