Package com.vaadin.data.util

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


    for (String p : CarAdministrationUI.fields) {
      ic.addContainerProperty(p, String.class, "");
    }

    for (int i = 0; i < 100; i++) {
      Object id = ic.addItem();
      ic.getContainerProperty(id, CarAdministrationUI.FIELD_BIRTH_DATE)
          .setValue(
              locBirthDate[(int) (locBirthDate.length * Math
                  .random())]);
      ic.getContainerProperty(id, CarAdministrationUI.FIELD_CAR_TYPE)
View Full Code Here


        // Creates the options container and add given options to it
        final Container c = new IndexedContainer();
        if (options != null) {
            for (final Iterator i = options.iterator(); i.hasNext();) {
                c.addItem(i.next());
            }
        }

        setCaption(caption);
        setContainerDataSource(c);
View Full Code Here

        ArrayList<Person> people= (ArrayList<Person>) em.createQuery("from Person").getResultList();
       
        for (Person person : people) {
          //BeanItem<Person> personItem = new BeanItem<Person>(person);
         
          Object id = personContainer.addItem();
            personContainer.getContainerProperty(id, "First Name").setValue(person.getFirstName());
            personContainer.getContainerProperty(id, "Last Name").setValue(person.getLastName());
            personContainer.getContainerProperty(id, "Mobile Phone").setValue(person.getMobilePhone());
    }
       
View Full Code Here

        // Creates the options container and add given options to it
        final Container c = new IndexedContainer();
        if (options != null) {
            for (final Iterator<?> i = options.iterator(); i.hasNext();) {
                c.addItem(i.next());
            }
        }

        setCaption(caption);
        setContainerDataSource(c);
View Full Code Here

        // Creates the options container and add given options to it
        final Container c = new IndexedContainer();
        if (options != null) {
            for (final Iterator<?> i = options.iterator(); i.hasNext();) {
                c.addItem(i.next());
            }
        }

        setCaption(caption);
        setContainerDataSource(c);
View Full Code Here

        // Creates the options container and add given options to it
        final Container c = new IndexedContainer();
        if (options != null) {
            for (final Iterator<?> i = options.iterator(); i.hasNext();) {
                c.addItem(i.next());
            }
        }

        setCaption(caption);
        setContainerDataSource(c);
View Full Code Here

        // Creates the options container and add given options to it
        final Container c = new IndexedContainer();
        if (options != null) {
            for (final Iterator<?> i = options.iterator(); i.hasNext();) {
                c.addItem(i.next());
            }
        }

        setCaption(caption);
        setContainerDataSource(c);
View Full Code Here

  private IndexedContainer createContainer(Map<?,?> elements) {
        IndexedContainer cont = new IndexedContainer();
        cont.addContainerProperty("name", String.class, "");
        for (Map.Entry<?,?> element : elements.entrySet()) {
            cont.addItem(element.getKey());
            cont.getItem(element.getKey()).getItemProperty("name").setValue(element.getValue());
        }
        cont.sort(new Object[]{ "name" }, new boolean[]{ true });
        return cont;
    }
View Full Code Here

    private IndexedContainer createSimpleContainer(String propertyId, String[] propertyNames) {
        IndexedContainer container = new IndexedContainer();
        container.addContainerProperty(propertyId, String.class, "");
        for (String propertyName : propertyNames) {
            Item item = container.addItem(propertyName);
            item.getItemProperty(propertyId).setValue(getMessagePrefixed(propertyName));
        }
        return container;
    }
View Full Code Here

        // Creates the options container and add given options to it
        final Container c = new IndexedContainer();
        if (options != null) {
            for (final Iterator<?> i = options.iterator(); i.hasNext();) {
                c.addItem(i.next());
            }
        }

        setCaption(caption);
        setContainerDataSource(c);
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.