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.admin.namespace;
18  
19  
20  import org.exoplatform.webui.config.annotation.ComponentConfig;
21  import org.exoplatform.webui.core.UIPopupWindow;
22  import org.exoplatform.webui.core.lifecycle.UIContainerLifecycle;
23  import org.exoplatform.webui.ext.manager.UIAbstractManager;
24  
25  /**
26   * Created by The eXo Platform SARL
27   * Author : pham tuan
28   *          phamtuanchip@yahoo.de
29   * September 20, 2006
30   * 16:37:15 AM
31   */
32  @ComponentConfig(lifecycle = UIContainerLifecycle.class)
33  public class UINamespaceManager extends UIAbstractManager {
34  
35    public UINamespaceManager() throws Exception {addChild(UINamespaceList.class, null, null) ;}
36  
37    public void refresh ()throws Exception {
38      UINamespaceList list = getChild(UINamespaceList.class) ;
39      list.refresh(1);
40    }
41  
42    public void initPopup() throws Exception {
43      UIPopupWindow uiPopup = getChild(UIPopupWindow.class) ;
44      if(uiPopup == null) {      
45        uiPopup = addChild(UIPopupWindow.class, null, "NamespacePopup") ;
46        uiPopup.setWindowSize(600,0) ;
47        UINamespaceForm uiNamespaceForm = createUIComponent(UINamespaceForm.class, null, "UINamespaceForm") ;
48        uiPopup.setUIComponent(uiNamespaceForm) ;
49        uiPopup.setShow(true) ;
50        uiPopup.setResizable(true) ;
51        uiPopup.setShowMask(true);
52        return ;
53      }
54      uiPopup.setRendered(true) ;
55      uiPopup.setShow(true) ;
56    }
57  }