01: package org.caramba.config;
02:
03: import org.caramba.plugin.PlugIn;
04: import org.caramba.CarambaServlet;
05:
06: import javax.servlet.ServletException;
07:
08: /**
09: * Created by IntelliJ IDEA.
10: * User: Pieter
11: * Date: Jun 7, 2006
12: * Time: 6:32:23 PM
13: * To change this template use File | Settings | File Templates.
14: */
15: public class EnableImplicitComponentRegistrationPlugIn implements
16: PlugIn {
17: public void destroy() {
18: }
19:
20: public void init(CarambaServlet pCarambaServlet,
21: CarambaConfig pCarambaConfig) throws ServletException {
22: EnableImplicitComponentRegistrationListener l = new EnableImplicitComponentRegistrationListener();
23: PageConfig[] pageConfigs = pCarambaConfig.getPageConfigs();
24: for (int i = 0; i < pageConfigs.length; i++) {
25: PageConfig pageConfig = pageConfigs[i];
26: pageConfig.addPageLifeCycleListener(l);
27: }
28:
29: PanelConfig[] panelConfigs = pCarambaConfig.getPanelConfigs();
30: for (int i = 0; i < panelConfigs.length; i++) {
31: PanelConfig panelConfig = panelConfigs[i];
32: panelConfig.addComponentLifeCycleListener(l);
33: }
34:
35: }
36: }
|