Package org.vaadin.addon.customfield.demo.data

Examples of org.vaadin.addon.customfield.demo.data.Person


        table.setNullSelectionAllowed(true);
        table.addContainerProperty("Name", String.class, null);
        table.addListener(getTableValueChangeListener());
        Address address = new Address("Ruukinkatu 2–4", "20540", City.TURKU);
        Address address2 = new Address("Ruukinkatu 2–4", "20540", City.TURKU);
        Person person = new Person("Teppo", "Testaaja", new Date(100000000l),
                address);
        Person person2 = new Person("Taina", "Testaaja", new Date(200000000l),
                address2);
        Item item = table.addItem(person);
        item.getItemProperty("Name").setValue(
                person.getFirstName() + " " + person.getLastName());
        item = table.addItem(person2);
        item.getItemProperty("Name").setValue(
                person2.getFirstName() + " " + person2.getLastName());
        return table;
    }
View Full Code Here


            public void buttonClick(ClickEvent event) {
                getTeamForm().commit();
                BeanItem<Team> item = (BeanItem<Team>) getTeamForm()
                        .getItemDataSource();
                String message = "";
                Person manager = (Person) item.getItemProperty("manager")
                        .getValue();
                if (null != manager) {
                    message = message + "The team manager is "
                            + manager.getFirstName() + " "
                            + manager.getLastName() + ".<br>";
                }
                for (Person member : (Set<Person>) item.getItemProperty(
                        "members").getValue()) {
                    message = message + "Team member: " + member.getFirstName()
                            + " " + member.getLastName() + "<br>";
View Full Code Here

    public Container getPersonContainer() {
        if (null == personContainer) {
            BeanContainer<Integer, Person> container = new BeanContainer<Integer, Person>(
                    Person.class);
            container.setBeanIdProperty("lastName");
            container.addBean(new Person("Aarne", "Alainen", null, null));
            container.addBean(new Person("Matti", "Meikäläinen", null, null));
            container.addBean(new Person("Teppo", "Testaaja", null, null));
            personContainer = container;
        }
        return personContainer;
    }
View Full Code Here

TOP

Related Classes of org.vaadin.addon.customfield.demo.data.Person

Copyright © 2018 www.massapicom. 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.