Enum CacheSyncMode
- All Implemented Interfaces:
ValueEnum,Serializable,Comparable<CacheSyncMode>,Constable
ResultSet to keep it current — a DynamicForm, ValuesManager or DetailViewer — picks up changes to the record it is showing. Two distinct cases are covered. First, a save may be altered by the server: sequence values, defaults, computed fields and server-side business logic can all mean the stored record differs from what was submitted, and the component should show what was actually stored. Second, the same record may be edited somewhere else — another form, a grid on a different screen, or a real-time update applied via DataSource.updateCaches() — leaving the component showing superseded values that a user has no reason to think are stale, and may go on to commit.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionPick up changes from any successful "update" against the DataSource, whichever component orDataSource.updateCaches()call made them, as well as changes the server made to this component's own save.Never update from a save response at all.Pick up only the changes the server made to this component's own save. -
Method Summary
Modifier and TypeMethodDescriptiongetValue()static CacheSyncModeReturns the enum constant of this type with the specified name.static CacheSyncMode[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
ALWAYS
Pick up changes from any successful "update" against the DataSource, whichever component orDataSource.updateCaches()call made them, as well as changes the server made to this component's own save. This is the default, and is the only setting that covers both cases described above.If this enumerated value is used in a
Component XMLfile or server-side DataSource descriptor (.ds.xml file), use the value "always". -
WHENSAVING
Pick up only the changes the server made to this component's own save. Updates originating elsewhere are ignored, so the component goes on showing what it last saved or was last given.If this enumerated value is used in a
Component XMLfile or server-side DataSource descriptor (.ds.xml file), use the value "whenSaving". -
NEVER
Never update from a save response at all. The component shows only the values the application puts into it.An update never discards an edit the user has made and not yet saved. A field the user has changed keeps the value they typed, and goes on reporting as changed via
DynamicForm.valuesHaveChanged(), so theoldValuessent with their eventual save still describe the record they started from. The exception is a field where the update happens to carry the same value the user typed: that edit has already been stored by whoever made the update, so it stops counting as an unsaved change.If this enumerated value is used in a
Component XMLfile or server-side DataSource descriptor (.ds.xml file), use the value "never".
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getValue
-