Package com.vaadin.data.util

Examples of com.vaadin.data.util.BeanItem


     *
     * @param bean
     *            The bean to use as data source.
     */
    public void setItemDataSource(T bean) {
        setItemDataSource(new BeanItem(bean));
    }
View Full Code Here


        // If data is an item use it.
        Item item = null;
        if (data instanceof Item) {
            item = (Item) data;
        } else if (data != null) {
            item = new BeanItem(data);
        }

        // Sets the datasource to form
        if (item != null && properties != null) {
            // Shows only given properties
View Full Code Here

                    }
                    return DefaultFieldFactory.get().createField(item,
                            propertyId, uiContext);
                }
            });
            conf.setItemDataSource(new BeanItem(s));
            conf.setVisibleItemProperties(new String[] { "averageVisible",
                    "averageColor", "caption", "description",
                    "displayRangeMax", "displayRangeMin", "graphHeight",
                    "graphWidth", "minmaxDotsVisible", "minmaxLabelsVisible",
                    "maxColor", "minColor", "normalRangeVisible",
View Full Code Here

        return select;
    }

    public Form bindData(Form form, Object data, String[] properties) {
        if (data != null) {
            form.setItemDataSource(new BeanItem(data));
            form.setVisibleItemProperties(properties);
        } else {
            form.setItemDataSource(null);
        }
        return form;
View Full Code Here

        dodajWindow.setWidth(400, Form.UNITS_PIXELS);
        dodajWindow.center();
        final Form form = new Form();
        form.setCaption("asdas");
        dodajWindow.addComponent(form);
        form.setItemDataSource(new BeanItem(new Customer()));
        Button button = new Button("Zapisz", form, "commit");
        button.addListener(new ClickListener() {

          public void buttonClick(ClickEvent event) {
            System.out.println("klik");
View Full Code Here

        // If data is an item use it.
        Item item = null;
        if (data instanceof Item) {
            item = (Item) data;
        } else if (data != null) {
            item = new BeanItem(data);
        }

        // Sets the datasource to form
        if (item != null && properties != null) {
            // Shows only given properties
View Full Code Here

        // If data is an item use it.
        Item item = null;
        if (data instanceof Item) {
            item = (Item) data;
        } else if (data != null) {
            item = new BeanItem(data);
        }

        // Sets the datasource to form
        if (item != null && properties != null) {
            // Shows only given properties
View Full Code Here

     *
     * @param bean
     *            The bean to use as data source.
     */
    public void setItemDataSource(T bean) {
        setItemDataSource(new BeanItem(bean));
    }
View Full Code Here

     *
     * @param bean
     *            The bean to use as data source.
     */
    public void setItemDataSource(T bean) {
        setItemDataSource(new BeanItem(bean));
    }
View Full Code Here

TOP

Related Classes of com.vaadin.data.util.BeanItem

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.