]> source.dussan.org Git - vaadin-framework.git/commitdiff
Removed readThrough/writeThrough in favor of buffered (#8180)
authorArtur Signell <artur@vaadin.com>
Wed, 22 Aug 2012 18:57:12 +0000 (21:57 +0300)
committerArtur Signell <artur@vaadin.com>
Wed, 22 Aug 2012 19:24:31 +0000 (22:24 +0300)
16 files changed:
server/src/com/vaadin/data/Buffered.java
server/src/com/vaadin/ui/AbstractField.java
server/src/com/vaadin/ui/Form.java
tests/server-side/com/vaadin/tests/server/components/AbstractTestFieldValueChange.java
tests/server-side/com/vaadin/tests/server/components/TestTextFieldValueChange.java
tests/testbench/com/vaadin/tests/components/abstractfield/AbstractFieldCommitWithInvalidValues.java
tests/testbench/com/vaadin/tests/components/customfield/AddressField.java
tests/testbench/com/vaadin/tests/components/customfield/NestedPersonForm.java
tests/testbench/com/vaadin/tests/components/datefield/CommitInvalid.java
tests/testbench/com/vaadin/tests/components/datefield/DateFieldInSubWindow.java
tests/testbench/com/vaadin/tests/components/datefield/DateFieldRangeValidation.java
tests/testbench/com/vaadin/tests/components/select/SelectDisplaysOldValue.java
tests/testbench/com/vaadin/tests/components/textfield/OutOfSyncIssueWithKeyboardShortcut.java
tests/testbench/com/vaadin/tests/containers/sqlcontainer/CheckboxUpdateProblem.java
tests/testbench/com/vaadin/tests/layouts/TestAbsoluteLayout.java
tests/testbench/com/vaadin/tests/tickets/Ticket1806.java

index 2472524bbce65aecfe11bb86b5a8cc99db95b69f..0b59c9ff97976441ddef4e4cf6f2c9f64cbcbb66 100644 (file)
@@ -76,82 +76,6 @@ public interface Buffered extends Serializable {
      */
     public void discard() throws SourceException;
 
-    /**
-     * Tests if the object is in write-through mode. If the object is in
-     * write-through mode, all modifications to it will result in
-     * <code>commit</code> being called after the modification.
-     * 
-     * @return <code>true</code> if the object is in write-through mode,
-     *         <code>false</code> if it's not.
-     * @deprecated As of 7.0, use {@link #setBuffered(boolean)} instead. Note
-     *             that setReadThrough(true), setWriteThrough(true) equals
-     *             setBuffered(false)
-     */
-    @Deprecated
-    public boolean isWriteThrough();
-
-    /**
-     * Sets the object's write-through mode to the specified status. When
-     * switching the write-through mode on, the <code>commit</code> operation
-     * will be performed.
-     * 
-     * @param writeThrough
-     *            Boolean value to indicate if the object should be in
-     *            write-through mode after the call.
-     * @throws SourceException
-     *             If the operation fails because of an exception is thrown by
-     *             the data source.
-     * @throws InvalidValueException
-     *             If the implicit commit operation fails because of a
-     *             validation error.
-     * 
-     * @deprecated As of 7.0, use {@link #setBuffered(boolean)} instead. Note
-     *             that setReadThrough(true), setWriteThrough(true) equals
-     *             setBuffered(false)
-     */
-    @Deprecated
-    public void setWriteThrough(boolean writeThrough) throws SourceException,
-            InvalidValueException;
-
-    /**
-     * Tests if the object is in read-through mode. If the object is in
-     * read-through mode, retrieving its value will result in the value being
-     * first updated from the data source to the object.
-     * <p>
-     * The only exception to this rule is that when the object is not in
-     * write-through mode and it's buffer contains a modified value, the value
-     * retrieved from the object will be the locally modified value in the
-     * buffer which may differ from the value in the data source.
-     * </p>
-     * 
-     * @return <code>true</code> if the object is in read-through mode,
-     *         <code>false</code> if it's not.
-     * @deprecated As of 7.0, use {@link #isBuffered(boolean)} instead. Note
-     *             that setReadThrough(true), setWriteThrough(true) equals
-     *             setBuffered(false)
-     */
-    @Deprecated
-    public boolean isReadThrough();
-
-    /**
-     * Sets the object's read-through mode to the specified status. When
-     * switching read-through mode on, the object's value is updated from the
-     * data source.
-     * 
-     * @param readThrough
-     *            Boolean value to indicate if the object should be in
-     *            read-through mode after the call.
-     * 
-     * @throws SourceException
-     *             If the operation fails because of an exception is thrown by
-     *             the data source. The cause is included in the exception.
-     * @deprecated As of 7.0, use {@link #setBuffered(boolean)} instead. Note
-     *             that setReadThrough(true), setWriteThrough(true) equals
-     *             setBuffered(false)
-     */
-    @Deprecated
-    public void setReadThrough(boolean readThrough) throws SourceException;
-
     /**
      * Sets the object's buffered mode to the specified status.
      * <p>
index 8ac7b21daf15c13be554bd91946e3522d8cc1496..f13c6a31384ea54fc14a132e2bb17f540be5dd4a 100644 (file)
@@ -97,14 +97,9 @@ public abstract class AbstractField<T> extends AbstractComponent implements
     private LinkedList<Validator> validators = null;
 
     /**
-     * Auto commit mode.
+     * True if field is in buffered mode, false otherwise
      */
-    private boolean writeThroughMode = true;
-
-    /**
-     * Reads the value from data-source, when it is not modified.
-     */
-    private boolean readThroughMode = true;
+    private boolean buffered;
 
     /**
      * Flag to indicate that the field is currently committing its value to the
@@ -345,7 +340,7 @@ public abstract class AbstractField<T> extends AbstractComponent implements
      */
     private T getFieldValue() {
         // Give the value from abstract buffers if the field if possible
-        if (dataSource == null || !isReadThrough() || isModified()) {
+        if (dataSource == null || isBuffered() || isModified()) {
             return getInternalValue();
         }
 
@@ -368,91 +363,6 @@ public abstract class AbstractField<T> extends AbstractComponent implements
         requestRepaint();
     }
 
-    /*
-     * Tests if the field is in write-through mode. Don't add a JavaDoc comment
-     * here, we use the default documentation from the implemented interface.
-     */
-    @Override
-    public boolean isWriteThrough() {
-        return writeThroughMode;
-    }
-
-    /**
-     * Sets the field's write-through mode to the specified status. When
-     * switching the write-through mode on, a {@link #commit()} will be
-     * performed.
-     * 
-     * @see #setBuffered(boolean) for an easier way to control read through and
-     *      write through modes
-     * 
-     * @param writeThrough
-     *            Boolean value to indicate if the object should be in
-     *            write-through mode after the call.
-     * @throws SourceException
-     *             If the operation fails because of an exception is thrown by
-     *             the data source.
-     * @throws InvalidValueException
-     *             If the implicit commit operation fails because of a
-     *             validation error.
-     * @deprecated As of 7.0, use {@link #setBuffered(boolean)} instead. Note
-     *             that setReadThrough(true), setWriteThrough(true) equals
-     *             setBuffered(false)
-     */
-    @Override
-    @Deprecated
-    public void setWriteThrough(boolean writeThrough)
-            throws Buffered.SourceException, InvalidValueException {
-        if (writeThroughMode == writeThrough) {
-            return;
-        }
-        writeThroughMode = writeThrough;
-        if (writeThroughMode) {
-            commit();
-        }
-    }
-
-    /*
-     * Tests if the field is in read-through mode. Don't add a JavaDoc comment
-     * here, we use the default documentation from the implemented interface.
-     */
-    @Override
-    public boolean isReadThrough() {
-        return readThroughMode;
-    }
-
-    /**
-     * Sets the field's read-through mode to the specified status. When
-     * switching read-through mode on, the object's value is updated from the
-     * data source.
-     * 
-     * @see #setBuffered(boolean) for an easier way to control read through and
-     *      write through modes
-     * 
-     * @param readThrough
-     *            Boolean value to indicate if the object should be in
-     *            read-through mode after the call.
-     * 
-     * @throws SourceException
-     *             If the operation fails because of an exception is thrown by
-     *             the data source. The cause is included in the exception.
-     * @deprecated As of 7.0, use {@link #setBuffered(boolean)} instead. Note
-     *             that setReadThrough(true), setWriteThrough(true) equals
-     *             setBuffered(false)
-     */
-    @Override
-    @Deprecated
-    public void setReadThrough(boolean readThrough)
-            throws Buffered.SourceException {
-        if (readThroughMode == readThrough) {
-            return;
-        }
-        readThroughMode = readThrough;
-        if (!isModified() && readThroughMode && getPropertyDataSource() != null) {
-            setInternalValue(convertFromDataSource(getDataSourceValue()));
-            fireValueChange(false);
-        }
-    }
-
     /**
      * Sets the buffered mode of this Field.
      * <p>
@@ -460,34 +370,35 @@ public abstract class AbstractField<T> extends AbstractComponent implements
      * property data source until {@link #commit()} is called.
      * </p>
      * <p>
-     * Changing buffered mode will change the read through and write through
-     * state for the field.
+     * Setting buffered mode from true to false will commit any pending changes.
      * </p>
      * <p>
-     * Mixing calls to {@link #setBuffered(boolean)} and
-     * {@link #setReadThrough(boolean)} or {@link #setWriteThrough(boolean)} is
-     * generally a bad idea.
+     * 
      * </p>
      * 
+     * @since 7.0.0
      * @param buffered
      *            true if buffered mode should be turned on, false otherwise
      */
     @Override
     public void setBuffered(boolean buffered) {
-        setReadThrough(!buffered);
-        setWriteThrough(!buffered);
+        if (this.buffered == buffered) {
+            return;
+        }
+        this.buffered = buffered;
+        if (!buffered) {
+            commit();
+        }
     }
 
     /**
      * Checks the buffered mode of this Field.
-     * <p>
-     * This method only returns true if both read and write buffering is used.
      * 
      * @return true if buffered mode is on, false otherwise
      */
     @Override
     public boolean isBuffered() {
-        return !isReadThrough() && !isWriteThrough();
+        return buffered;
     }
 
     /* Property interface implementation */
@@ -607,8 +518,8 @@ public abstract class AbstractField<T> extends AbstractComponent implements
             setModified(dataSource != null);
 
             valueWasModifiedByDataSourceDuringCommit = false;
-            // In write through mode , try to commit
-            if (isWriteThrough() && dataSource != null
+            // In not buffering, try to commit
+            if (!isBuffered() && dataSource != null
                     && (isInvalidCommitted() || isValid())) {
                 try {
 
@@ -1267,7 +1178,7 @@ public abstract class AbstractField<T> extends AbstractComponent implements
      */
     @Override
     public void valueChange(Property.ValueChangeEvent event) {
-        if (isReadThrough()) {
+        if (!isBuffered()) {
             if (committingValueToDataSource) {
                 boolean propertyNotifiesOfTheBufferedValue = equals(event
                         .getProperty().getValue(), getInternalValue());
@@ -1371,7 +1282,7 @@ public abstract class AbstractField<T> extends AbstractComponent implements
 
         if (!isListeningToPropertyEvents) {
             addPropertyListeners();
-            if (!isModified() && isReadThrough()) {
+            if (!isModified() && !isBuffered()) {
                 // Update value from data source
                 discard();
             }
index 8efd85009c5681beecdb528d68caee3d710da1d3..689a088c41cf6918ce64d3fa4749908506897032 100644 (file)
@@ -99,14 +99,9 @@ public class Form extends AbstractField<Object> implements Item.Editor,
     private Buffered.SourceException currentBufferedSourceException = null;
 
     /**
-     * Is the form in write trough mode.
+     * Is the form in buffered mode.
      */
-    private boolean writeThrough = true;
-
-    /**
-     * Is the form in read trough mode.
-     */
-    private boolean readThrough = true;
+    private boolean buffered = false;
 
     /**
      * Mapping from propertyName to corresponding field.
@@ -427,50 +422,15 @@ public class Form extends AbstractField<Object> implements Item.Editor,
     }
 
     /*
-     * Is the editor in a read-through mode? Don't add a JavaDoc comment here,
-     * we use the default one from the interface.
-     */
-    @Override
-    @Deprecated
-    public boolean isReadThrough() {
-        return readThrough;
-    }
-
-    /*
-     * Is the editor in a write-through mode? Don't add a JavaDoc comment here,
-     * we use the default one from the interface.
-     */
-    @Override
-    @Deprecated
-    public boolean isWriteThrough() {
-        return writeThrough;
-    }
-
-    /*
-     * Sets the editor's read-through mode to the specified status. Don't add a
-     * JavaDoc comment here, we use the default one from the interface.
-     */
-    @Override
-    public void setReadThrough(boolean readThrough) {
-        if (readThrough != this.readThrough) {
-            this.readThrough = readThrough;
-            for (final Iterator<Object> i = propertyIds.iterator(); i.hasNext();) {
-                (fields.get(i.next())).setReadThrough(readThrough);
-            }
-        }
-    }
-
-    /*
-     * Sets the editor's read-through mode to the specified status. Don't add a
+     * Sets the editor's buffered mode to the specified status. Don't add a
      * JavaDoc comment here, we use the default one from the interface.
      */
     @Override
-    public void setWriteThrough(boolean writeThrough) throws SourceException,
-            InvalidValueException {
-        if (writeThrough != this.writeThrough) {
-            this.writeThrough = writeThrough;
+    public void setBuffered(boolean buffered) {
+        if (buffered != this.buffered) {
+            this.buffered = buffered;
             for (final Iterator<Object> i = propertyIds.iterator(); i.hasNext();) {
-                (fields.get(i.next())).setWriteThrough(writeThrough);
+                (fields.get(i.next())).setBuffered(buffered);
             }
         }
     }
@@ -560,11 +520,10 @@ public class Form extends AbstractField<Object> implements Item.Editor,
             propertyIds.addLast(propertyId);
         }
 
-        // Update the read and write through status and immediate to match the
+        // Update the buffered mode and immediate to match the
         // form.
         // Should this also include invalidCommitted (#3993)?
-        field.setReadThrough(readThrough);
-        field.setWriteThrough(writeThrough);
+        field.setBuffered(buffered);
         if (isImmediate() && field instanceof AbstractComponent) {
             ((AbstractComponent) field).setImmediate(true);
         }
@@ -949,8 +908,7 @@ public class Form extends AbstractField<Object> implements Item.Editor,
                 : new Select();
         newField.setCaption(oldField.getCaption());
         newField.setReadOnly(oldField.isReadOnly());
-        newField.setReadThrough(oldField.isReadThrough());
-        newField.setWriteThrough(oldField.isWriteThrough());
+        newField.setBuffered(oldField.isBuffered());
 
         // Creates the options list
         newField.addContainerProperty("desc", String.class, "");
index 3512f555c9a6753402d657e6f5faa717249685fe..f2de4f3c04be3d0aae4488f05ef5a31ef7865e76 100644 (file)
@@ -42,8 +42,7 @@ public abstract class AbstractTestFieldValueChange<T> extends TestCase {
      */
     public void testRemoveListener() {
         getField().setPropertyDataSource(new ObjectProperty<String>(""));
-        getField().setWriteThrough(true);
-        getField().setReadThrough(true);
+        getField().setBuffered(false);
 
         // Expectations and start test
         listener.valueChange(EasyMock.isA(ValueChangeEvent.class));
@@ -76,10 +75,9 @@ public abstract class AbstractTestFieldValueChange<T> extends TestCase {
      * Field value change notifications closely mirror value changes of the data
      * source behind the field.
      */
-    public void testWriteThroughReadThrough() {
+    public void testNonBuffered() {
         getField().setPropertyDataSource(new ObjectProperty<String>(""));
-        getField().setWriteThrough(true);
-        getField().setReadThrough(true);
+        getField().setBuffered(false);
 
         expectValueChangeFromSetValueNotCommit();
     }
@@ -91,47 +89,9 @@ public abstract class AbstractTestFieldValueChange<T> extends TestCase {
      * Field value change notifications reflect the buffered value in the field,
      * not the original data source value changes.
      */
-    public void testNoWriteThroughNoReadThrough() {
+    public void testBuffered() {
         getField().setPropertyDataSource(new ObjectProperty<String>(""));
-        getField().setWriteThrough(false);
-        getField().setReadThrough(false);
-
-        expectValueChangeFromSetValueNotCommit();
-    }
-
-    /**
-     * Less common partly buffered case: writeThrough (auto-commit) is on and
-     * readThrough is off. Calling commit() should not cause notifications.
-     * 
-     * Without readThrough activated, changes to the data source that do not
-     * cause notifications are not reflected by the field value.
-     * 
-     * Field value change notifications correspond to changes made to the data
-     * source value through the text field or the (notifying) property.
-     */
-    public void testWriteThroughNoReadThrough() {
-        getField().setPropertyDataSource(new ObjectProperty<String>(""));
-        getField().setWriteThrough(true);
-        getField().setReadThrough(false);
-
-        expectValueChangeFromSetValueNotCommit();
-    }
-
-    /**
-     * Partly buffered use where the data source is read but not nor modified
-     * during editing, and is updated at commit().
-     * 
-     * When used like this, a field is updated from the data source if necessary
-     * when its value is requested and the property value has changed but the
-     * field has not been modified in its buffer.
-     * 
-     * Field value change notifications reflect the buffered value in the field,
-     * not the original data source value changes.
-     */
-    public void testNoWriteThroughReadThrough() {
-        getField().setPropertyDataSource(new ObjectProperty<String>(""));
-        getField().setWriteThrough(false);
-        getField().setReadThrough(true);
+        getField().setBuffered(true);
 
         expectValueChangeFromSetValueNotCommit();
     }
index f5db67be977d7f65267e82176a2c3d535eaeef6e..de838e339c74ac5a327fdf6f286b09f8c4eed6d1 100644 (file)
@@ -77,59 +77,6 @@ public class TestTextFieldValueChange extends
         EasyMock.verify(getListener());
     }
 
-    /**
-     * If read through is on and value has been modified, but not committed, the
-     * value should not propagate similar to
-     * {@link #testValueChangeEventPropagationWithReadThrough()}
-     * 
-     * TODO make test field type agnostic (eg. combobox)
-     */
-    public void testValueChangePropagationWithReadThroughWithModifiedValue() {
-        final String initialValue = "initial";
-        ObjectProperty<String> property = new ObjectProperty<String>(
-                initialValue);
-        getField().setPropertyDataSource(property);
-
-        // write buffering on, read buffering off
-        getField().setWriteThrough(false);
-        getField().setReadThrough(true);
-
-        // Expect no value changes calls to listener
-        EasyMock.replay(getListener());
-
-        // first set the value (note, write through false -> not forwarded to
-        // property)
-        setValue(getField());
-
-        Assert.assertTrue(getField().isModified());
-
-        // Add listener and set the value -> should end up in listener once
-        getField().addListener(getListener());
-
-        // modify property value, should not fire value change in field as the
-        // field has uncommitted value (aka isModified() == true)
-        property.setValue("Foo");
-
-        // Ensure listener was called once
-        EasyMock.verify(getListener());
-
-        // get value should not fire value change again
-        Object value = getField().getValue();
-        // Ensure listener still has been called only once
-        EasyMock.verify(getListener());
-
-        // field value should be different from the original value and current
-        // proeprty value
-        boolean isValueEqualToInitial = value.equals(initialValue);
-        Assert.assertFalse(isValueEqualToInitial);
-        boolean isValueEqualToPropertyValue = value.equals(property.getValue());
-        Assert.assertFalse(isValueEqualToPropertyValue);
-
-        // Ensure listener has not been called
-        EasyMock.verify(getListener());
-
-    }
-
     /**
      * Value change events from property should not propagate if read through is
      * false. Execpt when the property is being set.
index aa630c79fd00119009a39399d72f856607dba6a7..0aaa7c5f136e5ff00a87853c5d1187e0b58a8008 100644 (file)
@@ -28,7 +28,7 @@ public class AbstractFieldCommitWithInvalidValues extends TestBase {
         tf = new TextField("A field, must contain 1-2 chars",
                 new ObjectProperty<String>("a"));
         tf.addValidator(new StringLengthValidator("Invalid length", 1, 2, false));
-        tf.setWriteThrough(false);
+        tf.setBuffered(true);
         tf.setRequired(true);
 
         Button b = new Button("Commit", new ClickListener() {
index a3ee89b3ee7911f2abee5005c2e695c7b468fbe6..2daeb7bf258e711f48db7c67b8980a14304b4411 100644 (file)
@@ -34,7 +34,7 @@ public class AddressField extends CustomField<Address> {
             addressForm = new Form();
         }
         addressForm.setCaption("Address");
-        addressForm.setWriteThrough(false);
+        addressForm.setBuffered(true);
 
         // make sure field changes are sent early
         addressForm.setImmediate(true);
index 0655c09102ac0d16d315951aa5f55a6912071d41..9b400744332a905d0dc874c529047ae95f56eee8 100644 (file)
@@ -31,7 +31,7 @@ public class NestedPersonForm extends Form {
 
         beanItem = new BeanItem<Person>(person);
         setCaption("Update person details");
-        setWriteThrough(false);
+        setBuffered(true);
         setFormFieldFactory(new PersonFieldFactory());
         // set the data source and the visible fields
         // Note that if the nested form is the first or last field in the parent
index c4f001ac4105ba99ef14a6be9aa0b11c83e5c95f..e24f4753ff8eb4a765518e8ee7089a940ae4763d 100644 (file)
@@ -41,7 +41,7 @@ public class CommitInvalid extends TestBase {
          * Create and configure form.
          */
         final Form form = new Form();
-        form.setWriteThrough(false); // set write buffering on
+        form.setBuffered(true); // set write buffering on
         form.setImmediate(true); // make form (and especially its fields
                                  // immediate)
 
@@ -132,8 +132,8 @@ public class CommitInvalid extends TestBase {
     }
 
     private void printState() {
-        log.log("Date. Field: " + f((Date) dateField.getValue())
-                + " Property: " + f(dateProperty.getValue()));
+        log.log("Date. Field: " + f(dateField.getValue()) + " Property: "
+                + f(dateProperty.getValue()));
         log.log("Integer: Field: " + integerField.getValue() + " Property: "
                 + integerProperty.getValue());
     }
index 2a7807670b09c771fb38cfe93ba3236cac61760b..85f1c80a08cc7b542c9eb3a0f85faf91ffe64ea9 100644 (file)
@@ -88,7 +88,7 @@ public class DateFieldInSubWindow extends AbstractTestCase {
             final Form generalForm = new Form();
             {
                 generalForm.setCaption("My form");
-                generalForm.setWriteThrough(true);
+                generalForm.setBuffered(false);
                 generalForm.setFormFieldFactory(fieldFactory);
 
                 BeanItem<MyBean> myBeanItem = new BeanItem<MyBean>(myBean);
index befdd65693f685afee04cd8e242f9d2d8f72859c..484b9cfee8b5afa236c0c49b06751e530ee37f1f 100644 (file)
@@ -125,8 +125,7 @@ public class DateFieldRangeValidation extends TestBase {
         PopupDateField df = new PopupDateField();
         df.setLocale(new Locale("en", "US"));
         df.setResolution(Resolution.DAY);
-        df.setWriteThrough(true);
-        df.setReadThrough(true);
+        df.setBuffered(false);
         df.setImmediate(true);
         return df;
     }
index b9ae958a036331b0c22281a153c1626b2466ca2c..77c187ff60b2fed7424519c2027b7744cd91883a 100644 (file)
@@ -121,8 +121,7 @@ public class SelectDisplaysOldValue extends TestBase {
             controllerComboBox.setNullSelectionAllowed(false);
             controllerComboBox.setNewItemsAllowed(false);
             controllerComboBox.setImmediate(true);
-            controllerComboBox.setWriteThrough(false);
-            controllerComboBox.setReadThrough(false);
+            controllerComboBox.setBuffered(true);
 
         }
 
@@ -131,8 +130,7 @@ public class SelectDisplaysOldValue extends TestBase {
             slaveComboBox.setNullSelectionAllowed(false);
             slaveComboBox.setNewItemsAllowed(false);
             slaveComboBox.setImmediate(true);
-            slaveComboBox.setWriteThrough(false);
-            slaveComboBox.setReadThrough(false);
+            slaveComboBox.setBuffered(true);
         }
 
         private void refreshSlaveDropdown(Integer masterId) {
index 89f9ffda40296608af653b352803c30849522e32..955a9c27725905fa3f345ca260882da8ec95a59f 100644 (file)
@@ -70,7 +70,7 @@ public class OutOfSyncIssueWithKeyboardShortcut extends TestBase {
 
             form.setImmediate(true);
             // this is critical for the problem to occur
-            form.setWriteThrough(false);
+            form.setBuffered(true);
 
             HorizontalLayout footer = new HorizontalLayout();
             footer.setSpacing(true);
index f34c12607a995706c6bceefdbcdb1cb655633cdd..537c9be973cf518615965ef408f9c9067d64689d 100644 (file)
@@ -76,7 +76,7 @@ public class CheckboxUpdateProblem extends Application.LegacyApplication
 
         private TestForm() {
             setSizeFull();
-            setWriteThrough(false);
+            setBuffered(true);
             setInvalidCommitted(false);
 
             save = new Button("Save", this);
index d2f14c114eff182108af5dc9bcc51ec72bff4555..33fa0558e716ce1190fd749bdc96ae8ab913ad70 100644 (file)
@@ -271,14 +271,14 @@ public class TestAbsoluteLayout extends TestBase {
             addComponent(addComp);
 
             componentEditor = new Form();
-            componentEditor.setWriteThrough(false);
+            componentEditor.setBuffered(true);
             componentEditor.setCaption("Component properties:");
             componentEditor.setFormFieldFactory(MFieldFactory.get());
             addComponent(componentEditor);
 
             positionEditor = new Form();
             positionEditor.setCaption("Component position");
-            positionEditor.setWriteThrough(false);
+            positionEditor.setBuffered(true);
             positionEditor.setFormFieldFactory(MFieldFactory.get());
             addComponent(positionEditor);
 
index 2c979f4600a713c61fdf4693ed11b03d2470d0d5..fa572039aa1d90885000feb0a99d99cf0c1c379b 100644 (file)
@@ -17,8 +17,7 @@ public class Ticket1806 extends com.vaadin.Application.LegacyApplication {
         final ObjectProperty<String> prop = new ObjectProperty<String>("");
         final TextField tf1 = new TextField(
                 "Buffered TextField bound to ObjectProperty");
-        tf1.setWriteThrough(false);
-        tf1.setReadThrough(false);
+        tf1.setBuffered(true);
         tf1.setPropertyDataSource(prop);
         main.addComponent(tf1);
         main.addComponent(new Button(