Package com.vaadin.data.util

Examples of com.vaadin.data.util.HierarchicalContainer.addItem()


        navData.addContainerProperty("parent", Double.class, null);
        navData.addContainerProperty("alias", String.class, null);
        List<NavElement> children = null;
        // FIXME only capable of rendering two levels
        for (NavElement e: getRoots()) {
            navData.addItem(e);
            if (hasChildren(e)) {
                children = getChildren(e);
                for (NavElement child: children) {
                    navData.addItem(child);
                    navData.setParent(child, e);
View Full Code Here


        for (NavElement e: getRoots()) {
            navData.addItem(e);
            if (hasChildren(e)) {
                children = getChildren(e);
                for (NavElement child: children) {
                    navData.addItem(child);
                    navData.setParent(child, e);
                    navData.setChildrenAllowed(child, false);
                }
            } else {
                navData.setChildrenAllowed(e, false);
View Full Code Here

    private Hierarchical makeHierarchicalContainer() {
        HierarchicalContainer hc = new HierarchicalContainer();
        hc.addContainerProperty("p1", String.class, "");
        hc.addContainerProperty("p2", String.class, "");

        Object r1 = hc.addItem();
        hc.getItem(r1).getItemProperty("p1").setValue("root1");
        hc.getItem(r1).getItemProperty("p2").setValue("root1");

        Object r2 = hc.addItem();
        hc.getItem(r2).getItemProperty("p1").setValue("root2");
View Full Code Here

        Object r1 = hc.addItem();
        hc.getItem(r1).getItemProperty("p1").setValue("root1");
        hc.getItem(r1).getItemProperty("p2").setValue("root1");

        Object r2 = hc.addItem();
        hc.getItem(r2).getItemProperty("p1").setValue("root2");
        hc.getItem(r2).getItemProperty("p2").setValue("root2");

        Object r3 = hc.addItem();
        hc.getItem(r3).getItemProperty("p1").setValue("root3");
View Full Code Here

        Object r2 = hc.addItem();
        hc.getItem(r2).getItemProperty("p1").setValue("root2");
        hc.getItem(r2).getItemProperty("p2").setValue("root2");

        Object r3 = hc.addItem();
        hc.getItem(r3).getItemProperty("p1").setValue("root3");
        hc.getItem(r3).getItemProperty("p2").setValue("root3");

        Object r4 = hc.addItem();
        hc.getItem(r4).getItemProperty("p1").setValue("END");
View Full Code Here

        Object r3 = hc.addItem();
        hc.getItem(r3).getItemProperty("p1").setValue("root3");
        hc.getItem(r3).getItemProperty("p2").setValue("root3");

        Object r4 = hc.addItem();
        hc.getItem(r4).getItemProperty("p1").setValue("END");
        hc.setChildrenAllowed(r4, false);

        addNodesToRoot(hc, r1, 200);
        addNodesToRoot(hc, r2, 200);
View Full Code Here

        HierarchicalContainer container = new HierarchicalContainer();
        container.addContainerProperty("t1", String.class, "");
        container.addContainerProperty("t2", String.class, "");

        Item item = container.addItem("r1");
        item.getItemProperty("t1").setValue("Row1 t1");
        item.getItemProperty("t2").setValue("Row1 t2");

        item = container.addItem("r2");
        item.getItemProperty("t1").setValue("Row2 t1");
View Full Code Here

        Item item = container.addItem("r1");
        item.getItemProperty("t1").setValue("Row1 t1");
        item.getItemProperty("t2").setValue("Row1 t2");

        item = container.addItem("r2");
        item.getItemProperty("t1").setValue("Row2 t1");
        item.getItemProperty("t2").setValue("Row2 t2");

        MyForm form = new MyForm();
        MyTable table = new MyTable(form, container);
View Full Code Here

            @Override
            public void buttonClick(ClickEvent event) {
                HierarchicalContainer container = (HierarchicalContainer) tt
                        .getContainerDataSource();
                Object itemId = container.addItem();
                container.getContainerProperty(itemId, "i").setValue(i++);
                container.getContainerProperty(itemId, "link").setValue(
                        new Link(String.valueOf(i + 1), new ExternalResource(
                                "http://www.google.fi")));
                container.setChildrenAllowed(itemId, false);
View Full Code Here

        container.addContainerProperty("value", String.class, "");

        final TreeTable tt = new TreeTable(null, container);
        tt.setSizeFull();
        int parentId = counter++;
        Item parent = container.addItem(parentId);
        tt.setCollapsed(parentId, false);
        parent.getItemProperty("value").setValue("parent " + (counter++) + "");
        addComponent(tt);
        Button repopulate = new Button("Repopulate", new ClickListener() {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.