Package com.vaadin.ui

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


        f.setSizeUndefined();
        f.getLayout().setSizeUndefined();

        f.setCaption("Test form with a really long caption");
        f.addField("foo", new TextField("Foo"));
        f.addField("bar", new TextField("A bit longer field caption"));

        HorizontalLayout hl = new HorizontalLayout();
        hl.setWidth("100%");
        Button b = new Button("right aligned");
        hl.addComponent(b);
View Full Code Here


        final Form f = new Form();
        addComponent(f);
        f.setSizeUndefined();
        f.getLayout().setSizeUndefined();

        f.addField("foo", new TextField("Foo"));
        f.addField("bar", new TextField("A bit longer field caption"));

        HorizontalLayout hl = new HorizontalLayout();
        hl.setWidth("100%");
        Button b = new Button("right aligned");
View Full Code Here

        addComponent(f);
        f.setSizeUndefined();
        f.getLayout().setSizeUndefined();

        f.addField("foo", new TextField("Foo"));
        f.addField("bar", new TextField("A bit longer field caption"));

        HorizontalLayout hl = new HorizontalLayout();
        hl.setWidth("100%");
        Button b = new Button("right aligned");
        hl.addComponent(b);
View Full Code Here

    @Override
    protected void setup() {
        final Form form = new Form();
        form.setDescription("Some description");
        form.addField("AAAA", new TextField());
        addComponent(form);

        addComponent(new Button("Toggle description",
                new Button.ClickListener() {
                    @Override
View Full Code Here

        setMainWindow(main);

        Form form = new Form(new VerticalLayout());
        TextField text = new TextField("This caption shall be visible");
        text.setRequired(true);
        form.addField("test", text);
        main.addComponent(form);
    }
}
View Full Code Here

    private Form getFormPanelExample() {
        Form f = new Form();
        f.setCaption("Test form");
        CheckBox fb2 = new CheckBox("Test button", true);
        fb2.setComponentError(new SystemError("Test error"));
        f.addField("fb2", fb2);
        TextField ft1 = new TextField("With caption");
        ft1.setComponentError(new SystemError("Error"));
        f.addField("ft1", ft1);
        TextField ft2 = new TextField();
        ft2.setComponentError(new SystemError("Error"));
View Full Code Here

        CheckBox fb2 = new CheckBox("Test button", true);
        fb2.setComponentError(new SystemError("Test error"));
        f.addField("fb2", fb2);
        TextField ft1 = new TextField("With caption");
        ft1.setComponentError(new SystemError("Error"));
        f.addField("ft1", ft1);
        TextField ft2 = new TextField();
        ft2.setComponentError(new SystemError("Error"));
        ft2.setValue("Without caption");
        f.addField("ft2", ft2);
        TextField ft3 = new TextField("With caption and required");
View Full Code Here

        ft1.setComponentError(new SystemError("Error"));
        f.addField("ft1", ft1);
        TextField ft2 = new TextField();
        ft2.setComponentError(new SystemError("Error"));
        ft2.setValue("Without caption");
        f.addField("ft2", ft2);
        TextField ft3 = new TextField("With caption and required");
        ft3.setComponentError(new SystemError("Error"));
        ft3.setRequired(true);
        f.addField("ft3", ft3);
        return f;
View Full Code Here

        ft2.setValue("Without caption");
        f.addField("ft2", ft2);
        TextField ft3 = new TextField("With caption and required");
        ft3.setComponentError(new SystemError("Error"));
        ft3.setRequired(true);
        f.addField("ft3", ft3);
        return f;
    }

    private void addFields(ComponentContainer lo) {
        Button button = new Button("Test button");
View Full Code Here

        dateField = new DateField("Year", dateProperty);
        dateField.setLocale(new Locale("fi", "FI"));
        dateField.setResolution(DateField.RESOLUTION_DAY);
        dateField.setId("_DF");
        form.addField("date", dateField);

        /*
         * Create a TextField with integer property (and integer validator,
         * preventing invalid typed values to be pushded to property) as a
         * reference component.
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.