How do I remove a FieldSet from a Form in Java?
I have a FieldSet object in a form, but for some reason i can't remove it. It says "Cannot set the FieldSet's form to null". My code 开发者_JS百科is something like this.
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);
}
So, when I click on the button Clear Fields, it says "Cannot set the FieldSet's form to null" How can I remove the FieldSet from Form?
I finally could do it. I didn't find a way to remove a fieldSet from a form, instead of it, i added the fieldset on form without a thing when i needed i added stuff, and when i clicked on clear button, i removed stuff from fieldset, and nothing from the form
精彩评论