summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--server/src/com/vaadin/data/Buffered.java76
-rw-r--r--server/src/com/vaadin/ui/AbstractField.java125
-rw-r--r--server/src/com/vaadin/ui/Form.java62
-rw-r--r--tests/server-side/com/vaadin/tests/server/components/AbstractTestFieldValueChange.java50
-rw-r--r--tests/server-side/com/vaadin/tests/server/components/TestTextFieldValueChange.java53
-rw-r--r--tests/testbench/com/vaadin/tests/components/abstractfield/AbstractFieldCommitWithInvalidValues.java2
-rw-r--r--tests/testbench/com/vaadin/tests/components/customfield/AddressField.java2
-rw-r--r--tests/testbench/com/vaadin/tests/components/customfield/NestedPersonForm.java2
-rw-r--r--tests/testbench/com/vaadin/tests/components/datefield/CommitInvalid.java6
-rw-r--r--tests/testbench/com/vaadin/tests/components/datefield/DateFieldInSubWindow.java2
-rw-r--r--tests/testbench/com/vaadin/tests/components/datefield/DateFieldRangeValidation.java3
-rw-r--r--tests/testbench/com/vaadin/tests/components/select/SelectDisplaysOldValue.java6
-rw-r--r--tests/testbench/com/vaadin/tests/components/textfield/OutOfSyncIssueWithKeyboardShortcut.java2
-rw-r--r--tests/testbench/com/vaadin/tests/containers/sqlcontainer/CheckboxUpdateProblem.java2
-rw-r--r--tests/testbench/com/vaadin/tests/layouts/TestAbsoluteLayout.java4
-rw-r--r--tests/testbench/com/vaadin/tests/tickets/Ticket1806.java3
16 files changed, 48 insertions, 352 deletions
diff --git a/server/src/com/vaadin/data/Buffered.java b/server/src/com/vaadin/data/Buffered.java
index 2472524bbc..0b59c9ff97 100644
--- a/server/src/com/vaadin/data/Buffered.java
+++ b/server/src/com/vaadin/data/Buffered.java
@@ -77,82 +77,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>
* When the object is in buffered mode, an internal buffer will be used to
diff --git a/server/src/com/vaadin/ui/AbstractField.java b/server/src/com/vaadin/ui/AbstractField.java
index 8ac7b21daf..f13c6a3138 100644
--- a/server/src/com/vaadin/ui/AbstractField.java
+++ b/server/src/com/vaadin/ui/AbstractField.java
@@ -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();
}
diff --git a/server/src/com/vaadin/ui/Form.java b/server/src/com/vaadin/ui/Form.java
index 8efd85009c..689a088c41 100644
--- a/server/src/com/vaadin/ui/Form.java
+++ b/server/src/com/vaadin/ui/Form.java
@@ -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, "");
diff --git a/tests/server-side/com/vaadin/tests/server/components/AbstractTestFieldValueChange.java b/tests/server-side/com/vaadin/tests/server/components/AbstractTestFieldValueChange.java
index 3512f555c9..f2de4f3c04 100644
--- a/tests/server-side/com/vaadin/tests/server/components/AbstractTestFieldValueChange.java
+++ b/tests/server-side/com/vaadin/tests/server/components/AbstractTestFieldValueChange.java
@@ -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();
}
diff --git a/tests/server-side/com/vaadin/tests/server/components/TestTextFieldValueChange.java b/tests/server-side/com/vaadin/tests/server/components/TestTextFieldValueChange.java
index f5db67be97..de838e339c 100644
--- a/tests/server-side/com/vaadin/tests/server/components/TestTextFieldValueChange.java
+++ b/tests/server-side/com/vaadin/tests/server/components/TestTextFieldValueChange.java
@@ -78,59 +78,6 @@ public class TestTextFieldValueChange extends
}
/**
- * 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.
*
diff --git a/tests/testbench/com/vaadin/tests/components/abstractfield/AbstractFieldCommitWithInvalidValues.java b/tests/testbench/com/vaadin/tests/components/abstractfield/AbstractFieldCommitWithInvalidValues.java
index aa630c79fd..0aaa7c5f13 100644
--- a/tests/testbench/com/vaadin/tests/components/abstractfield/AbstractFieldCommitWithInvalidValues.java
+++ b/tests/testbench/com/vaadin/tests/components/abstractfield/AbstractFieldCommitWithInvalidValues.java
@@ -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() {
diff --git a/tests/testbench/com/vaadin/tests/components/customfield/AddressField.java b/tests/testbench/com/vaadin/tests/components/customfield/AddressField.java
index a3ee89b3ee..2daeb7bf25 100644
--- a/tests/testbench/com/vaadin/tests/components/customfield/AddressField.java
+++ b/tests/testbench/com/vaadin/tests/components/customfield/AddressField.java
@@ -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);
diff --git a/tests/testbench/com/vaadin/tests/components/customfield/NestedPersonForm.java b/tests/testbench/com/vaadin/tests/components/customfield/NestedPersonForm.java
index 0655c09102..9b40074433 100644
--- a/tests/testbench/com/vaadin/tests/components/customfield/NestedPersonForm.java
+++ b/tests/testbench/com/vaadin/tests/components/customfield/NestedPersonForm.java
@@ -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
diff --git a/tests/testbench/com/vaadin/tests/components/datefield/CommitInvalid.java b/tests/testbench/com/vaadin/tests/components/datefield/CommitInvalid.java
index c4f001ac41..e24f4753ff 100644
--- a/tests/testbench/com/vaadin/tests/components/datefield/CommitInvalid.java
+++ b/tests/testbench/com/vaadin/tests/components/datefield/CommitInvalid.java
@@ -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());
}
diff --git a/tests/testbench/com/vaadin/tests/components/datefield/DateFieldInSubWindow.java b/tests/testbench/com/vaadin/tests/components/datefield/DateFieldInSubWindow.java
index 2a7807670b..85f1c80a08 100644
--- a/tests/testbench/com/vaadin/tests/components/datefield/DateFieldInSubWindow.java
+++ b/tests/testbench/com/vaadin/tests/components/datefield/DateFieldInSubWindow.java
@@ -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);
diff --git a/tests/testbench/com/vaadin/tests/components/datefield/DateFieldRangeValidation.java b/tests/testbench/com/vaadin/tests/components/datefield/DateFieldRangeValidation.java
index befdd65693..484b9cfee8 100644
--- a/tests/testbench/com/vaadin/tests/components/datefield/DateFieldRangeValidation.java
+++ b/tests/testbench/com/vaadin/tests/components/datefield/DateFieldRangeValidation.java
@@ -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;
}
diff --git a/tests/testbench/com/vaadin/tests/components/select/SelectDisplaysOldValue.java b/tests/testbench/com/vaadin/tests/components/select/SelectDisplaysOldValue.java
index b9ae958a03..77c187ff60 100644
--- a/tests/testbench/com/vaadin/tests/components/select/SelectDisplaysOldValue.java
+++ b/tests/testbench/com/vaadin/tests/components/select/SelectDisplaysOldValue.java
@@ -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) {
diff --git a/tests/testbench/com/vaadin/tests/components/textfield/OutOfSyncIssueWithKeyboardShortcut.java b/tests/testbench/com/vaadin/tests/components/textfield/OutOfSyncIssueWithKeyboardShortcut.java
index 89f9ffda40..955a9c2772 100644
--- a/tests/testbench/com/vaadin/tests/components/textfield/OutOfSyncIssueWithKeyboardShortcut.java
+++ b/tests/testbench/com/vaadin/tests/components/textfield/OutOfSyncIssueWithKeyboardShortcut.java
@@ -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);
diff --git a/tests/testbench/com/vaadin/tests/containers/sqlcontainer/CheckboxUpdateProblem.java b/tests/testbench/com/vaadin/tests/containers/sqlcontainer/CheckboxUpdateProblem.java
index f34c12607a..537c9be973 100644
--- a/tests/testbench/com/vaadin/tests/containers/sqlcontainer/CheckboxUpdateProblem.java
+++ b/tests/testbench/com/vaadin/tests/containers/sqlcontainer/CheckboxUpdateProblem.java
@@ -76,7 +76,7 @@ public class CheckboxUpdateProblem extends Application.LegacyApplication
private TestForm() {
setSizeFull();
- setWriteThrough(false);
+ setBuffered(true);
setInvalidCommitted(false);
save = new Button("Save", this);
diff --git a/tests/testbench/com/vaadin/tests/layouts/TestAbsoluteLayout.java b/tests/testbench/com/vaadin/tests/layouts/TestAbsoluteLayout.java
index d2f14c114e..33fa0558e7 100644
--- a/tests/testbench/com/vaadin/tests/layouts/TestAbsoluteLayout.java
+++ b/tests/testbench/com/vaadin/tests/layouts/TestAbsoluteLayout.java
@@ -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);
diff --git a/tests/testbench/com/vaadin/tests/tickets/Ticket1806.java b/tests/testbench/com/vaadin/tests/tickets/Ticket1806.java
index 2c979f4600..fa572039aa 100644
--- a/tests/testbench/com/vaadin/tests/tickets/Ticket1806.java
+++ b/tests/testbench/com/vaadin/tests/tickets/Ticket1806.java
@@ -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(