public enum CacheSyncMode extends java.lang.Enum<CacheSyncMode> implements ValueEnum
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.
| Enum Constant and Description |
|---|
ALWAYS Pick up changes from any successful "update" against the DataSource, whichever component or DataSource.updateCaches() call made them, as well as changes the server made to this component's own save. |
NEVER Never update from a save response at all. |
WHENSAVING Pick up only the changes the server made to this component's own save. |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String | getValue() |
static CacheSyncMode | valueOf(java.lang.String name) Returns 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. |
public static final CacheSyncMode ALWAYS
DataSource.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 XML file or server-side DataSource descriptor (.ds.xml file), use the value "always".
public static final CacheSyncMode WHENSAVING
If this enumerated value is used in a Component XML file or server-side DataSource descriptor (.ds.xml file), use the value "whenSaving".
public static final CacheSyncMode NEVER
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 the oldValues sent 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 XML file or server-side DataSource descriptor (.ds.xml file), use the value "never".
public static CacheSyncMode[] values()
for (CacheSyncMode c : CacheSyncMode.values()) System.out.println(c);
public static CacheSyncMode valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is null