Search in sources :

Example 1 with SubFormKind

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);
    }
}
Also used : SubFormReferenceType(org.activityinfo.model.type.subform.SubFormReferenceType) CssFloatLayoutContainer(com.sencha.gxt.widget.core.client.container.CssFloatLayoutContainer) SubFormKind(org.activityinfo.model.form.SubFormKind) FormTree(org.activityinfo.model.formTree.FormTree)

Aggregations

CssFloatLayoutContainer (com.sencha.gxt.widget.core.client.container.CssFloatLayoutContainer)1 SubFormKind (org.activityinfo.model.form.SubFormKind)1 FormTree (org.activityinfo.model.formTree.FormTree)1 SubFormReferenceType (org.activityinfo.model.type.subform.SubFormReferenceType)1