invalidateComponent();
}
private void removeSections(int index, Sequence<Form.Section> removed) {
Form form = (Form)getComponent();
for (int i = 0, n = removed.getLength(); i < n; i++) {
// Remove fields
Form.Section section = removed.get(i);
for (int j = 0; j < n; j++) {
removeFields(section, 0, section.getLength());
}
// Remove field label and flag image view lists
labels.remove(index, n);
flagImageViews.remove(index, n);
// Remove separators
Sequence<Separator> removedSeparators = separators.remove(index, n);
for (int j = 0; j < n; j++) {
form.remove(removedSeparators.get(j));
}
}
invalidateComponent();
}