@@ -0,0 +1,1772 @@
+package com.vaadin.tests.components.datefield;%0A%0Aimport java.util.Date;%0A%0Aimport com.vaadin.data.util.ObjectProperty;%0Aimport com.vaadin.tests.components.TestBase;%0Aimport com.vaadin.ui.Button;%0Aimport com.vaadin.ui.Button.ClickEvent;%0Aimport com.vaadin.ui.DateField;%0Aimport com.vaadin.ui.Form;%0Aimport com.vaadin.ui.Label;%0A%0Apublic class CommitInvalid extends TestBase %7B%0A%0A    @Override%0A    protected String getDescription() %7B%0A        return %22DateField with error is committed regardless of the invalidity.%22;%0A    %7D%0A%0A    @Override%0A    protected Integer getTicketNumber() %7B%0A        return 5927;%0A    %7D%0A%0A    @Override%0A    protected void setup() %7B%0A        final Form form = new Form();%0A        addComponent(form);%0A%0A        @SuppressWarnings(%22deprecation%22)%0A        ObjectProperty%3CDate%3E property = new ObjectProperty%3CDate%3E(new Date(%0A                2009 - 1900, 4 - 1, 1));%0A%0A        final DateField df = new DateField(%22Year%22, property);%0A        df.setResolution(DateField.RESOLUTION_DAY);%0A        df.setReadThrough(false);%0A        df.setWriteThrough(false);%0A        df.setImmediate(true);%0A        form.addField(%22date%22, df);%0A%0A        Button validate = new Button(%22Validate%22);%0A        form.getFooter().addComponent(validate);%0A%0A        Button commit = new Button(%22Commit%22);%0A        form.getFooter().addComponent(commit);%0A%0A        Label value = new Label(%22Value%22);%0A        addComponent(value);%0A        value.setPropertyDataSource(property);%0A%0A        validate.addListener(new Button.ClickListener() %7B%0A            public void buttonClick(ClickEvent event) %7B%0A                df.validate();%0A            %7D%0A        %7D);%0A%0A        commit.addListener(new Button.ClickListener() %7B%0A            public void buttonClick(ClickEvent event) %7B%0A                df.commit();%0A            %7D%0A        %7D);%0A%0A%0A    %7D%0A%7D%0A

Test case for #5927.