diff options
Diffstat (limited to 'server/src/com/vaadin/ui/Form.java')
-rw-r--r-- | server/src/com/vaadin/ui/Form.java | 62 |
1 files changed, 10 insertions, 52 deletions
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, ""); |