use of org.activityinfo.model.form.SubFormKind in project activityinfo by bedatadriven.
the class FormPanel method addSubForm.
private void addSubForm(FormTree formTree, FormTree.Node node) {
SubFormReferenceType subFormType = (SubFormReferenceType) node.getType();
FormTree subTree = formTree.subTree(subFormType.getClassId());
SubFormKind subFormKind = subTree.getRootFormClass().getSubFormKind();
if (subFormKind == SubFormKind.REPEATING) {
RepeatingSubFormPanel subPanel = new RepeatingSubFormPanel(formSource, node, subTree, inputHandler);
panel.add(subPanel, new CssFloatLayoutContainer.CssFloatData(1));
repeatingSubForms.add(subPanel);
} else {
KeyedSubFormPanel subPanel = new KeyedSubFormPanel(recordRef, formSource, node, subTree, inputHandler);
panel.add(subPanel, new CssFloatLayoutContainer.CssFloatData(1));
keyedSubFormPanels.add(subPanel);
}
}
Aggregations