Package com.vaadin.ui

Examples of com.vaadin.ui.Form.addField()


            public boolean isValid(Object value) {
                return field1.getValue().equals("valid");
            }
        });
        form.addField("Field 1", field1);
        layout.addComponent(form);

        getMainWindow().addWindow(subWindow);
        subWindow.bringToFront();
    }
View Full Code Here


            @Override
            public void focus() {
                secondFieldIsFocused[0] = true;
            }
        };
        form.addField("a", field1);
        form.addField("b", field2);
        form.focus();

        Assert.assertTrue("Field with enabled connector is not focused",
                secondFieldIsFocused[0]);
View Full Code Here

            public void focus() {
                secondFieldIsFocused[0] = true;
            }
        };
        form.addField("a", field1);
        form.addField("b", field2);
        form.focus();

        Assert.assertTrue("Field with enabled connector is not focused",
                secondFieldIsFocused[0]);
        Assert.assertFalse("Field with disabled connector is focused",
View Full Code Here

                    field.addValidator(new AlwaysFailValidator());
                }
            }
        };

        form.addField("Field", new TextField("Text"));
        form.addField("Date", new DateField("Date"));
        // not good for automated testing with screenshots when null
        // form.addField("Inline Date", new InlineDateField("Date"));
        // same as basic DateField
        // form.addField("Popup Date", new PopupDateField("Date"));
View Full Code Here

                }
            }
        };

        form.addField("Field", new TextField("Text"));
        form.addField("Date", new DateField("Date"));
        // not good for automated testing with screenshots when null
        // form.addField("Inline Date", new InlineDateField("Date"));
        // same as basic DateField
        // form.addField("Popup Date", new PopupDateField("Date"));
        Button setDateButton = new Button("Set date");
View Full Code Here

                form.getField("Date").setValue(new Date(0));
            }
        });

        NativeSelect nativeSelect = new NativeSelect("NativeSelect");
        form.addField("Native Select", nativeSelect);
        nativeSelect.addItem("Value 1");

        // in #4103, the Select component was behaving differently from others
        form.addField("Select", new Select("Select"));
View Full Code Here

        NativeSelect nativeSelect = new NativeSelect("NativeSelect");
        form.addField("Native Select", nativeSelect);
        nativeSelect.addItem("Value 1");

        // in #4103, the Select component was behaving differently from others
        form.addField("Select", new Select("Select"));

        Select select2 = new Select("Select 2");
        select2.addItem("Value 1");
        form.addField("Select 2", select2);
View Full Code Here

        // in #4103, the Select component was behaving differently from others
        form.addField("Select", new Select("Select"));

        Select select2 = new Select("Select 2");
        select2.addItem("Value 1");
        form.addField("Select 2", select2);

        OptionGroup optionGroup = new OptionGroup("OptionGroup");
        optionGroup.setMultiSelect(false);
        optionGroup.addItem("Option 1");
        optionGroup.addItem("Option 2");
View Full Code Here

        OptionGroup optionGroup = new OptionGroup("OptionGroup");
        optionGroup.setMultiSelect(false);
        optionGroup.addItem("Option 1");
        optionGroup.addItem("Option 2");
        form.addField("Option Group 1", optionGroup);

        OptionGroup optionGroup2 = new OptionGroup("OptionGroup");
        optionGroup2.setMultiSelect(true);
        optionGroup2.addItem("Option 1");
        optionGroup2.addItem("Option 2");
View Full Code Here

        OptionGroup optionGroup2 = new OptionGroup("OptionGroup");
        optionGroup2.setMultiSelect(true);
        optionGroup2.addItem("Option 1");
        optionGroup2.addItem("Option 2");
        form.addField("Option Group 2", optionGroup2);

        // TODO could add more different fields

        return form;
    }
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.