Differences
This shows you the differences between two versions of the page.
application_lifecycle [2013/11/02 08:35] |
application_lifecycle [2021/04/05 11:23] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Application Life Cycle ====== | ||
+ | A class can hook into the application lifecycle of an e4 application by adding a property into the plugin.xml file for the product element. | ||
+ | <sxh xml; highlight: [9,12]> | ||
+ | < | ||
+ | < | ||
+ | | ||
+ | | ||
+ | <product | ||
+ | name=" | ||
+ | application=" | ||
+ | ... | ||
+ | < | ||
+ | | ||
+ | | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | The bundle class consists of the bundle id and the full qualified class name. | ||
+ | |||
+ | <sxh java> | ||
+ | public class LifeCycleManager { | ||
+ | |||
+ | @PostContextCreate | ||
+ | void postContextCreate(IApplicationContext appContext, Display display) { | ||
+ | System.out.println(" | ||
+ | } | ||
+ | |||
+ | @PreSave | ||
+ | void preSave(IApplicationContext context) { | ||
+ | System.out.println(" | ||
+ | } | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | See [[http:// | ||
+ | |||
+ | {{tag> |