Package com.vaadin.ui

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


        tbl2.setWidth("300px");
        v.addComponent(tbl2);
        tbl2.setSelectable(true);
        tbl2.setMultiSelect(false);
        tbl2.setImmediate(true);
        tbl2.addListener(new Table.ValueChangeListener() {
            @Override
            public void valueChange(ValueChangeEvent event) {
                System.err.println("Value now "
                        + event.getProperty().getValue());
View Full Code Here


        t.setSelectable(true);
        t.setNullSelectionAllowed(true);
        t.setMultiSelect(true);
        t.setMultiSelectMode(MultiSelectMode.SIMPLE);
        t.setImmediate(true);
        t.addListener(new ValueChangeListener() {

            @Override
            public void valueChange(ValueChangeEvent event) {
                TreeSet<?> sorted = new TreeSet<Object>((Set<?>) event
                        .getProperty().getValue());
View Full Code Here

        table.setImmediate(immediate);
        table.setSelectable(selectable);
        table.setWidth("100px");
        table.setHeight("100px");
        if (listenClicks) {
            table.addListener(new ItemClickListener() {

                @Override
                public void itemClick(ItemClickEvent event) {
                    table.markAsDirty();
                    clickLabel.setValue("Click " + event.getItemId());
View Full Code Here

                    clickLabel.setValue("Click " + event.getItemId());
                }
            });
        }
        if (listenValueChanges) {
            table.addListener(new ValueChangeListener() {

                @Override
                public void valueChange(ValueChangeEvent event) {
                    valueChangeLabel.setValue("Value "
                            + event.getProperty().getValue());
View Full Code Here

        item = table.addItem("SE");
        item.getItemProperty("icon").setValue(new FlagSeResource());
        item.getItemProperty("country").setValue("Sweden");

        final Label selectedLabel = new Label();
        table.addListener(new ValueChangeListener() {
            @Override
            public void valueChange(ValueChangeEvent event) {
                selectedLabel.setValue(String.valueOf(table.getValue()));
            }
        });
View Full Code Here

        table.setPageLength(5);
        table.setSelectable(true);
        table.setImmediate(true);
        table.setNullSelectionAllowed(true);
        table.addContainerProperty("Name", String.class, null);
        table.addListener(getTableValueChangeListener());
        Person person = new Person("Teppo", "Testaaja",
                "teppo.testaaja@example.com", "", "Ruukinkatu 2–4", 20540,
                "Turku");
        Person person2 = new Person("Taina", "Testaaja",
                "taina.testaaja@example.com", "", "Ruukinkatu 2–4", 20540,
View Full Code Here

            };

            @Override
            public void valueChange(ValueChangeEvent event) {
                if (table.getListeners(HeaderClickEvent.class).isEmpty()) {
                    table.addListener(headerClickListener);
                } else {
                    table.removeListener(headerClickListener);
                }
            }
        });
View Full Code Here

            };

            @Override
            public void valueChange(ValueChangeEvent event) {
                if (table.getListeners(FooterClickEvent.class).isEmpty()) {
                    table.addListener(footerClickListener);
                } else {
                    table.removeListener(footerClickListener);
                }
            }
        });
View Full Code Here

            public void itemClick(ItemClickEvent event) {
                Notification.show("TF Value on the server:" + tf.getValue(),
                        Notification.TYPE_WARNING_MESSAGE);
            }
        };
        t.addListener(l);
        addComponent(tf);
        addComponent(t);
        t = new Table("Table with drag and drop and item click listener");
        t.setDragMode(TableDragMode.ROW);
        t.setPageLength(3);
View Full Code Here

        table.setContainerDataSource(idx);

        table.setColumnHeader("firstname", "FirstName");
        table.setColumnHeader("lastname", "LastName");

        table.addListener(new Table.ColumnReorderListener() {
            @Override
            public void columnReorder(
                    com.vaadin.ui.Table.ColumnReorderEvent event) {
                order.setValue(aToString(table.getVisibleColumns()));
            }
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.