View Javadoc
1   /*
2    * Copyright (C) 2003-2007 eXo Platform SAS.
3    *
4    * This program is free software; you can redistribute it and/or
5    * modify it under the terms of the GNU Affero General Public License
6    * as published by the Free Software Foundation; either version 3
7    * of the License, or (at your option) any later version.
8    *
9    * This program is distributed in the hope that it will be useful,
10   * but WITHOUT ANY WARRANTY; without even the implied warranty of
11   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12   * GNU General Public License for more details.
13   *
14   * You should have received a copy of the GNU General Public License
15   * along with this program; if not, see<http://www.gnu.org/licenses/>.
16   */
17  package org.exoplatform.ecm.webui.component.explorer.popup.admin;
18  
19  import org.exoplatform.webui.core.UIPopupComponent;
20  import org.exoplatform.webui.config.annotation.ComponentConfig;
21  import org.exoplatform.webui.core.UIComponent;
22  import org.exoplatform.webui.core.UIContainer;
23  import org.exoplatform.webui.core.UIPopupWindow;
24  import org.exoplatform.webui.core.lifecycle.UIContainerLifecycle;
25  
26  /**
27   * Created by The eXo Platform SARL
28   * Author : Dang Van Minh
29   *          minh.dang@exoplatform.com
30   * Nov 8, 2006
31   * 11:22:07 AM
32   */
33  @ComponentConfig(
34      lifecycle = UIContainerLifecycle.class
35  )
36  public class UIActionContainer extends UIContainer implements UIPopupComponent {
37  
38    public UIActionContainer() throws Exception {
39      addChild(UIActionTypeForm.class, null, null) ;
40      addChild(UIActionForm.class, null, null) ;
41    }
42  
43    public void activate() { }
44    public void deActivate() { }
45  
46    public void initPopup(UIComponent uiComp) throws Exception {
47      removeChildById("PopupComponent") ;
48      UIPopupWindow uiPopup = addChild(UIPopupWindow.class, null, "PopupComponent") ;
49      uiPopup.setShowMask(true);
50      uiPopup.setUIComponent(uiComp) ;
51      uiPopup.setWindowSize(640, 300) ;
52      uiPopup.setShow(true) ;
53      uiPopup.setResizable(true) ;
54    }
55  }