Package io.jmix.ui.component
Interface Buffered
- All Known Subinterfaces:
CheckBox,ColorPicker,ComboBox<V>,CurrencyField<V>,DateField<V>,DatePicker<V>,EntityComboBox<V>,EntityPicker<V>,EntitySuggestionField<V>,FileStorageUploadField,FileUploadField,MaskedField<V>,PasswordField,ResizableTextArea<V>,RichTextArea,SingleFileUploadField,TagPicker<V>,TextArea<V>,TextField<V>,TextInputField<V>,TimeField<V>,ValuePicker<V>,ValuesPicker<V>,WebdavDocumentUploadField
- All Known Implementing Classes:
AbstractFileStorageUploadField,AbstractSingleFileUploadField,AbstractTextArea,CheckBoxImpl,ColorPickerImpl,ComboBoxImpl,CurrencyFieldImpl,DateFieldImpl,DatePickerImpl,EntityComboBoxImpl,EntityPickerImpl,EntitySuggestionFieldImpl,FileStorageUploadFieldImpl,FileUploadFieldImpl,MaskedFieldImpl,PasswordFieldImpl,ResizableTextAreaImpl,RichTextAreaImpl,SearchFieldImpl,TagPickerImpl,TextAreaImpl,TextFieldImpl,TimeFieldImpl,ValuePickerImpl,ValuesPickerImpl,WebdavDocumentUploadFieldImpl
public interface Buffered
Data aware component that supports buffered write mode.
-
Method Summary
Modifier and TypeMethodDescriptionvoidcommit()Updates all changes since the previous commit to the data source.voiddiscard()Discards all changes since last commit.booleanbooleanTests if the value stored in the object has been modified since it was last updated from the data source.voidsetBuffered(boolean buffered) Sets the buffered mode.
-
Method Details
-
commit
void commit()Updates all changes since the previous commit to the data source. -
discard
void discard()Discards all changes since last commit. The object updates its value from the data source. -
isBuffered
boolean isBuffered()- Returns:
trueif buffered mode is on,falseotherwise
-
setBuffered
Sets the buffered mode.When in buffered mode, an internal buffer will be used to store changes until
commit()is called. Callingdiscard()will revert the internal buffer to the value of the data source.When in non-buffered mode both read and write operations will be done directly on the data source. In this mode the
commit()anddiscard()methods serve no purpose.- Parameters:
buffered-trueif buffered mode should be turned on,falseotherwise
-
isModified
boolean isModified()Tests if the value stored in the object has been modified since it was last updated from the data source.- Returns:
trueif the value in the object has been modified since the last data source update,falseif not.
-