UIActionContainer.java

  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. import org.exoplatform.webui.core.UIPopupComponent;
  19. import org.exoplatform.webui.config.annotation.ComponentConfig;
  20. import org.exoplatform.webui.core.UIComponent;
  21. import org.exoplatform.webui.core.UIContainer;
  22. import org.exoplatform.webui.core.UIPopupWindow;
  23. import org.exoplatform.webui.core.lifecycle.UIContainerLifecycle;

  24. /**
  25.  * Created by The eXo Platform SARL
  26.  * Author : Dang Van Minh
  27.  *          minh.dang@exoplatform.com
  28.  * Nov 8, 2006
  29.  * 11:22:07 AM
  30.  */
  31. @ComponentConfig(
  32.     lifecycle = UIContainerLifecycle.class
  33. )
  34. public class UIActionContainer extends UIContainer implements UIPopupComponent {

  35.   public UIActionContainer() throws Exception {
  36.     addChild(UIActionTypeForm.class, null, null) ;
  37.     addChild(UIActionForm.class, null, null) ;
  38.   }

  39.   public void activate() { }
  40.   public void deActivate() { }

  41.   public void initPopup(UIComponent uiComp) throws Exception {
  42.     removeChildById("PopupComponent") ;
  43.     UIPopupWindow uiPopup = addChild(UIPopupWindow.class, null, "PopupComponent") ;
  44.     uiPopup.setShowMask(true);
  45.     uiPopup.setUIComponent(uiComp) ;
  46.     uiPopup.setWindowSize(640, 300) ;
  47.     uiPopup.setShow(true) ;
  48.     uiPopup.setResizable(true) ;
  49.   }
  50. }