Package com.vaadin.data.util

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


                        String.class,
                        "Long enough string to cause a scrollbar when the window is set to a dencently small size.");
        container.addContainerProperty("size", Long.class, 23958l);
        container.addItem();
        container.addItem();
        container.addItem();

        Table table = new Table();
        table.setContainerDataSource(container);
        table.setWidth("100%");
        table.setColumnCollapsingAllowed(true);
View Full Code Here


        for (int i = 0; i < ids.length; ++i) {
            container.addContainerProperty(ids[i], types[i], "");
        }

        for (int i = 0; i < 100; i++) {
            Item item = container.addItem("item " + i);
            for (int j = 0; j < ids.length; ++j) {
                Property itemProperty = item.getItemProperty(ids[j]);
                if (types[j] == String.class) {
                    itemProperty.setValue(ids[j].toString() + i);
                } else if (types[j] == BaseClass.class) {
View Full Code Here

        container.addContainerProperty("col1", String.class, "");
        container.addContainerProperty("col2", String.class, "");
        container.addContainerProperty("col3", String.class, "");

        for (int i = 0; i < 100; i++) {
            Item item = container.addItem("item " + i);
            item.getItemProperty("col1").setValue("first" + i);
            item.getItemProperty("col2").setValue("middle" + i);
            item.getItemProperty("col3").setValue("last" + i);
        }
View Full Code Here

        for (int col = 1; col <= cols; col++) {
            ic.addContainerProperty("Property" + col, String.class, "");
        }

        for (int row = 0; row < rows; row++) {
            Item item = ic.addItem("row" + row);
            for (int col = 1; col <= cols; col++) {
                item.getItemProperty("Property" + col).setValue(
                        "Row " + row + " col " + col + "(" + iter + ")");
            }
View Full Code Here

        container.addContainerProperty("testStartDate", Date.class, null);
        container.addContainerProperty("testEndDate", Date.class, null);

        java.util.Calendar cal = java.util.Calendar.getInstance();
        for (int i = 1; i <= 10; i++) {
            Item item = container.getItem(container.addItem());
            item.getItemProperty("testCaption").setValue("Test " + i);
            item.getItemProperty("testDescription")
                    .setValue("Description " + i);
            item.getItemProperty("testStartDate").setValue(cal.getTime());
            item.getItemProperty("testEndDate").setValue(cal.getTime());
View Full Code Here

        c.addContainerProperty("Property 1", String.class, "");
        c.addContainerProperty("Property 2", String.class, "");
        c.addContainerProperty("Property 3", String.class, "");
        c.addContainerProperty("Property 4", String.class, "");
        for (int ix = 0; ix < 500; ix++) {
            Item i = c.addItem(ix);
            i.getItemProperty("Property 1").setValue("Item " + ix + ",1");
            i.getItemProperty("Property 2").setValue("Item " + ix + ",2");
            i.getItemProperty("Property 3").setValue("Item " + ix + ",3");
            i.getItemProperty("Property 4").setValue("Item " + ix + ",4");
        }
View Full Code Here

        table.setSelectable(true);

        Container ds = new IndexedContainer();
        ds.addContainerProperty("column", Integer.class, null);
        for (int i = 0; i < 500; i++) {
            Item item = ds.addItem(i);
            item.getItemProperty("column").setValue(i);
        }
        table.setContainerDataSource(ds);

        return table;
View Full Code Here

        table.setPageLength(pageLength);

        IndexedContainer idx = new IndexedContainer();
        idx.addContainerProperty("firstname", String.class, null);
        idx.addContainerProperty("lastname", String.class, null);
        Item i = idx.addItem(1);
        i.getItemProperty("firstname").setValue("John");
        i.getItemProperty("lastname").setValue("Johnson");
        i = idx.addItem(2);
        i.getItemProperty("firstname").setValue("Jane");
        i.getItemProperty("lastname").setValue("Janeine");
View Full Code Here

        idx.addContainerProperty("firstname", String.class, null);
        idx.addContainerProperty("lastname", String.class, null);
        Item i = idx.addItem(1);
        i.getItemProperty("firstname").setValue("John");
        i.getItemProperty("lastname").setValue("Johnson");
        i = idx.addItem(2);
        i.getItemProperty("firstname").setValue("Jane");
        i.getItemProperty("lastname").setValue("Janeine");

        table.setContainerDataSource(idx);
View Full Code Here

    private Container getContainer() {
        IndexedContainer container = new IndexedContainer();
        container.addContainerProperty("na", String.class, null);

        for (int i = 0; i < 10; i++) {
            container.addItem(i);
        }
        return container;
    }

    @Override
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.