This is how I solved the deficiency. I am using gxt 2.2.5.
Code:
class FieldSetFriendlyFormPanel extends FormPanel
{
/**
* isValid is called by FormButtonBinding
* to dis/enable the fields in a form
* based on the validation of member fields
*/
@Override
public boolean isValid(boolean preventMark) {
boolean valid = true;
for (Field<?> f : getFields()) {
if (!f.isValid(preventMark)) {
valid = false;
}
}
for(Component c : getItems()) {
if (c instanceof FieldSet) {
validateFieldSet((FieldSet)c, preventMark, valid);
}
}
return valid;
}
protected boolean validateFieldSet(FieldSet fieldset, boolean preventMark, boolean valid) {
for(Component c : fieldset.getItems()) {
if (c instanceof Field) {
if (((Field)c).isValid(preventMark))
valid = false;
}
}
return valid;
}
}