8
我想用其他字符串“成功发生”替换下拉选择中的“选择一个”选项,我不想显示列表项目以设置默认值。Wicket下拉选择设置默认值
DropDownChoice<Person> customer = new DropDownChoice<Person>(
"customer", new PropertyModel<Person>(customermodel, "customer"),list, new ChoiceRenderer<Person>("name", "id"));
+1但是用'setNullValid(真)'时,不要忘了'customer.nullValid'资源键,这可能是OP是使用一个(“成功发生”似乎是一个有效的空值) –