我在表单中有一个 FieldSet 对象,但由于某种原因我无法删除它。它说“无法将 FieldSet 的表单设置为 null ”。我的代码是这样的。
Form form = new Form("form");
FieldSet fsTest = new FieldSet("fsTest", "");
//constructor
public ClassName(){
fsTest.add(new Submit("clear", "Clear Fields", this, "onCleanButtor");
form.add(fsTest);
}
private boolean onClearButton(){
form.remove(fsTest);
}
因此,当我单击清除字段按钮时,它显示“无法将 FieldSet 的表单设置为 null ”如何从表单中删除 FieldSet?