Client behavior implementation to trigger the custom autoSave event of the dirty value to a temporary store before session times out
Method Summary
|
private static Object |
_getAutoSaveBehavior(Object component)
-
Gets the autosave behavior from a component
|
private Object |
_getSubmittedValue()
-
Need to get the submitted value of the peer and NOT the component as the implementation is different [i.e.
|
private Object |
_handleValueUpdated()
-
When data is updated need to clear out the existing timeout for submitting the dirty content and set this._nonDirtySubmittedValue to the current submittedValue.
|
protected Object |
Init(Object idleTimeSubmit)
-
Sets the _idleTimeSubmit based on whether the app has provide idleTimeSubmit 1) If provided will get the max of its value with _MIN_IDLE_TIME_SUBMIT [meaning won't allow it to be set lower than 30 sec as that would require too much of ppr] 2) If not provided will set it to the default of 5 min
|
protected static Object |
InitClass()
-
Static values for AdfAutoSaveBehavior
|
public Object |
initialize(Object component)
-
Note that we can not use AdfValueChangeEvent.VALUE_CHANGE_TYPE as our dirty constraint is much stricter than AdfValueChangeEvent.VALUE_CHANGE_TYPE which gets fired during the blur event.
|
private Object |
_propertyChange(Object propertyChange)
-
Listen for disabled or readOnly property change to either setUp or tearDown the autoSave behavior
|
public static Object |
removeTimer(Object componentId)
-
ValueUpdatedEvent is fired for the component on the server side.
|
private Object |
_resetIdleSubmitHandler()
-
Clears out the idleSubmitHandler
|
private Object |
_setUp()
-
Setup the autoSave feature 1) Add all the component events
|
private Object |
_setUpComponentInitValue()
-
Sets up the initial value of _lastNonDirtySubmittedValue and remove the keyDown + mouseDown listeners
|
private Object |
_setUpIdleTimer(Object componentEvent)
-
Sets up the idle timer
|
private Object |
_submitDirty()
-
Submits a custom _autoSave event to the server with the current submittedValue
|
private Object |
_tearDown()
-
Teardown the autoSave feature 1) Cancel the current idle submit handler if it exists 2) Reset _lastNonDirtySubmittedValue to null [so it can lazily be set again when the behavior is setup] 3) Remove all the component listeners
|