Package com.vaadin.ui

Examples of com.vaadin.ui.Table.removeAllItems()


                            if (t instanceof MethodException) {
                                t = t.getCause();
                                if (t instanceof CacheUpdateException) {
                                    Table table = ((CacheUpdateException) t)
                                            .getTable();
                                    table.removeAllItems();
                                    Notification
                                            .show("Problem updating table. Please try again later",
                                                    Notification.Type.ERROR_MESSAGE);
                                }
                            }
View Full Code Here


        collection.add(new InventoryObject("Dummy Item", 0.0, false));
        final BeanItemContainer<InventoryObject> tableContainer = new BeanItemContainer<InventoryObject>(
                collection);
        table.setContainerDataSource(tableContainer);
        table.setVisibleColumns(new String[] { "name", "weight" });
        table.removeAllItems();

        // Allow the table to receive drops and handle them
        table.setDropHandler(new DropHandler() {
            @Override
            public AcceptCriterion getAcceptCriterion() {
View Full Code Here

        table.setColumnWidth("year", 50);

        addButton("Clean", new ClickListener() {
            @Override
            public void buttonClick(ClickEvent event) {
                table.removeAllItems();
            }
        });

        addButton("Populate", new ClickListener() {
            @Override
View Full Code Here

        Button fill = new Button("fill it");
        fill.addListener(new Button.ClickListener() {
            @Override
            public void buttonClick(ClickEvent event) {
                t.removeAllItems();
                for (int i = 0; i < 200; i++) {
                    Item item = t.addItem(i);
                    for (int j = 0; j < 5; j++) {
                        item.getItemProperty("test" + j).setValue(
                                createComponent(i, j));
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.