开发者

How do I remove a FieldSet from a Form in Java?

开发者 https://www.devze.com 2023-01-25 07:40 出处:网络
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\".

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

0

精彩评论

暂无评论...
验证码 换一张
取 消