I got a screen that is shown according to what the costumer wants. So it depends on costumers needs.
The problem is, I have to remove 3 FieldSets when I click on “Clean Fields” button. To re-add them later when costumer clicks on “Search” button.
But when I try to remove, it says “Cannot set the FieldSet’s form to null” as an IllegalArgumentException. Do you guys have any idea to help me out?
ps: If is there any Brazilians, maybe I can explain it in Portuguese.
public boolean onCleanClick() {
this.form.remove(fsResult1);
this.form.remove(fsResult2);
this.form.remove(fsSubmits);
this.profile1.setValue("0");
this.profile2.setValue("0");
return true;
}
public boolean onComparaPerfisClick(){
fsSubmits.setShowBorder(false);
fsSubmits.setColumns(2);
fsSubmits.add(submitProfile1);
fsSubmits.add(submitProfile2);
form.add(fsSubmits, 2);
fsResult1.add(processProfile1);
fsResult1.setShowBorder(false);
fsResult2.add(processProfile2);
fsResult2.setShowBorder(false);
form.add(fsResult1);
form.add(fsResult2);
}
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