Examples of UserError


Examples of com.vaadin.server.UserError

            }
            if (r.nextBoolean()) {
                tf.setRequired(true);
            }
            if (r.nextBoolean()) {
                tf.setComponentError(new UserError("Error"));
            }
            tf.setWidth("100%");
            layout.setComponentAlignment(tf, Alignment.BOTTOM_LEFT);
            layout.addComponent(tf);
View Full Code Here

Examples of com.vaadin.server.UserError

            }
            if (r.nextBoolean()) {
                tf.setRequired(true);
            }
            if (r.nextBoolean()) {
                tf.setComponentError(new UserError("Error"));
            }
            tf.setWidth("100%");
            layout.setComponentAlignment(tf, Alignment.MIDDLE_LEFT);
            layout.addComponent(tf);
View Full Code Here

Examples of com.vaadin.server.UserError

            }
            if (r.nextBoolean()) {
                tf.setRequired(true);
            }
            if (r.nextBoolean()) {
                tf.setComponentError(new UserError("Error"));
            }

            tf.setRows(2);
            tf.setSizeFull();
View Full Code Here

Examples of com.vaadin.server.UserError

    @Override
    protected void setup(VaadinRequest request) {

        addTab();
        addTab().setComponentError(new UserError("Error!"));
        addTab().setDescription("This is a tab");

        Tab t = addTab();
        t.setComponentError(new UserError("Error!"));
        t.setDescription("This tab has both an error and a description");

        setContent(tabSheet);
        getTooltipConfiguration().setOpenDelay(0);
        getTooltipConfiguration().setQuickOpenDelay(0);
View Full Code Here

Examples of com.vaadin.server.UserError

                try {
                    target.setHeight(height.getValue());
                    height.setComponentError(null);
                    updateLabel();
                } catch (Exception e) {
                    height.setComponentError(new UserError(e.getMessage()));
                }
            }
        });
        width.addListener(new Property.ValueChangeListener() {
            @Override
            public void valueChange(ValueChangeEvent event) {
                try {
                    target.setWidth(width.getValue());
                    width.setComponentError(null);
                    updateLabel();
                } catch (Exception e) {
                    width.setComponentError(new UserError(e.getMessage()));
                }
            }
        });

    }
View Full Code Here

Examples of com.vaadin.server.UserError

        ol.setComponentAlignment(tf, Alignment.TOP_RIGHT);

        tf = new TextField("Short caption");
        tf.setWidth("100px");

        tf.setComponentError(new UserError("error message"));
        ol.addComponent(tf);
        ol.setComponentAlignment(tf, Alignment.TOP_RIGHT);

        tf = new TextField("Short caption");
        tf.setComponentError(new UserError("error message"));
        tf.setIcon(new ThemeResource("icons/16/calendar.png"));
        tf.setWidth("100px");

        tf.setComponentError(new UserError("error message"));
        ol.addComponent(tf);
        ol.setComponentAlignment(tf, Alignment.TOP_RIGHT);

        tf = new TextField();
        tf.setValue("No caption");
View Full Code Here

Examples of com.vaadin.server.UserError

        final DateField df = new DateField();
        df.setValue(new Date(1203910239L));
        df.setResolution(DateField.RESOLUTION_SEC);
        df.setWidth("200px");
        df.setRequired(true);
        df.setComponentError(new UserError("abc"));
        df.addStyleName("popup-style");
        addComponent(df);
    }
View Full Code Here

Examples of com.vaadin.server.UserError

        Button err = new Button("Set error");
        err.addClickListener(new ClickListener() {

            @Override
            public void buttonClick(ClickEvent event) {
                df.setComponentError(new UserError("foo"));
            }
        });
        gl.addComponent(err);

        err = new Button("Clear error");
View Full Code Here

Examples of com.vaadin.server.UserError

        HorizontalLayout test = new HorizontalLayout();
        test.setSizeFull();

        TextField tf = new TextField();
        tf.setComponentError(new UserError("Error message"));

        test.addComponent(tf);
        test.setComponentAlignment(tf, Alignment.MIDDLE_CENTER);

        LegacyWindow w = new LegacyWindow("Test #1916", test);
View Full Code Here

Examples of com.vaadin.server.UserError

        componentError.setEnabled(false);
        componentError.addListener(new ValueChangeListener() {
            @Override
            public void valueChange(ValueChangeEvent event) {
                if (target != null) {
                    target.setComponentError(componentError.getValue() ? new UserError(
                            "Error message") : null);
                }
            }
        });
        component.addComponent(componentError);
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.