public class LRUTrackerForTemplate extends java.lang.Object implements FormContextListenerI
Exclusively used when a form is opened with view type MDIManagerI.VIEWTYPE_SCHABLONE
(Schablone). While existing persisted BOs are tracked immediately upon opening,
templated BOs defer LRU tracking until their first successful persistence.
This listener automatically unregisters itself from the FormContextI
during onAfterSave() to prevent redundant tracking and avoid memory leaks.
| Modifier and Type | Method and Description |
|---|---|
static LRUTrackerForTemplate |
attach(FormContextI ftx,
Formular form)
Convenience factory method to instantiate and register the tracker on the context.
|
void |
onAfterSave()
Records the LRU entry using the committed BO state and unregisters
this listener from the context.
|
void |
onBeforeSave()
Invoked during
FormContextI#beforeSave to prepare the form context prior to persistence. |
void |
onRefresh()
Invoked during
FormContextI#refreshForm to update the UI components from the underlying model. |
void |
onSaveInitiated()
Invoked during
FormContextI#saveFormData at the initial stage of the persistence workflow. |
void |
onSync()
Invoked during
FormContextI#sync to synchronize UI form data with the underlying model. |
public static LRUTrackerForTemplate attach(FormContextI ftx, Formular form)
ftx - the form context to listen toform - the form descriptor being trackedpublic void onSync()
FormContextListenerIFormContextI#sync to synchronize UI form data with the underlying model.
Called prior to FormElementI#sync, before synchronization cascades to subcontexts,
and before any onSync scripts execute.
onSync in interface FormContextListenerIpublic void onRefresh()
FormContextListenerIFormContextI#refreshForm to update the UI components from the underlying model.
Called before FormElementI#refresh, before an optional call to FormContextI#refreshView,
and before any onRefresh scripts execute.
onRefresh in interface FormContextListenerIpublic void onBeforeSave()
FormContextListenerIFormContextI#beforeSave to prepare the form context prior to persistence.
Called before FormElementI#beforeSave, before #beforeSave cascades to subcontexts,
and before any onBeforeSave scripts execute.
onBeforeSave in interface FormContextListenerIpublic void onSaveInitiated()
FormContextListenerIFormContextI#saveFormData at the initial stage of the persistence workflow.
Called before FormContextI#beforeSave executes and before the included business objects
are saved via FormContextI#saveBO or FormContextSaveHandler#saveBO.
onSaveInitiated in interface FormContextListenerIpublic void onAfterSave()
onAfterSave in interface FormContextListenerICopyright © 2000-2026 OAshi S.à r.l. All Rights Reserved.