Search in sources :

Example 1 with TreeStore

use of com.sencha.gxt.data.shared.TreeStore in project activityinfo by bedatadriven.

the class FieldTreeBuilderTest method subForms.

@Test
public void subForms() {
    FormSource formStore = new FormSourceSyncImpl(new TestingStorageProvider(), 1);
    FormTree tree = formStore.getFormTree(ReferralSubForm.FORM_ID).waitFor();
    TreeStore<MeasureTreeNode> treeStore = new TreeStore<>(MeasureTreeNode::getId);
    FieldTreeBuilder builder = new FieldTreeBuilder(tree, treeStore);
    try {
        builder.build(tree);
    } catch (Exception e) {
        e.printStackTrace();
    }
    System.out.println("===== FormTree === ");
    FormTreePrettyPrinter.print(tree);
    System.out.println();
    System.out.println("===== TreeStore === ");
    prettyPrint(treeStore);
}
Also used : TreeStore(com.sencha.gxt.data.shared.TreeStore) FormTree(org.activityinfo.model.formTree.FormTree) TestingStorageProvider(org.activityinfo.store.testing.TestingStorageProvider) FormSourceSyncImpl(org.activityinfo.store.query.server.FormSourceSyncImpl) FormSource(org.activityinfo.store.query.shared.FormSource) Test(org.junit.Test)

Aggregations

TreeStore (com.sencha.gxt.data.shared.TreeStore)1 FormTree (org.activityinfo.model.formTree.FormTree)1 FormSourceSyncImpl (org.activityinfo.store.query.server.FormSourceSyncImpl)1 FormSource (org.activityinfo.store.query.shared.FormSource)1 TestingStorageProvider (org.activityinfo.store.testing.TestingStorageProvider)1 Test (org.junit.Test)1