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;
18  
19  import org.exoplatform.webui.config.annotation.ComponentConfig;
20  import org.exoplatform.webui.config.annotation.EventConfig;
21  
22  
23  /**
24   * Created by The eXo Platform SARL
25   * Author : Dang Van Minh
26   *          minh.dang@exoplatform.com
27   * Oct 15, 2007 10:10:03 AM
28   */
29  @ComponentConfig(
30      events = {
31          @EventConfig(listeners = UIDocumentInfo.ChangeNodeActionListener.class),
32          @EventConfig(listeners = UIDocumentInfo.ViewNodeActionListener.class),
33          @EventConfig(listeners = UIDocumentInfo.SortActionListener.class),
34          @EventConfig(listeners = UIDocumentInfo.VoteActionListener.class),
35          @EventConfig(listeners = UIDocumentInfo.ChangeLanguageActionListener.class),
36          @EventConfig(listeners = UIDocumentInfo.DownloadActionListener.class),
37          @EventConfig(listeners = UIDocumentInfo.ShowPageActionListener.class)
38      }
39  )
40  public class UIDocumentWithTree extends UIDocumentInfo {
41  
42    public UIDocumentWithTree() throws Exception {
43      getChildById(CONTENT_PAGE_ITERATOR_ID).setId("PageIteratorWithTreeView");
44      getChildById(CONTENT_TODAY_PAGE_ITERATOR_ID).setId("TodayPageIteratorWithTreeView");
45      getChildById(CONTENT_YESTERDAY_PAGE_ITERATOR_ID).setId("YesterdayPageIteratorWithTreeView");
46      getChildById(CONTENT_WEEK_PAGE_ITERATOR_ID).setId("WeekPageIteratorWithTreeView");
47      getChildById(CONTENT_MONTH_PAGE_ITERATOR_ID).setId("MonthPageIteratorWithTreeView");
48      getChildById(CONTENT_YEAR_PAGE_ITERATOR_ID).setId("YearPageIteratorWithTreeView");
49      getChild(UIDocumentNodeList.class).setId("UIDocumentNodeListWithTreeView");
50    }
51  
52    public String getTemplate() {
53      UIJCRExplorer uiExplorer = getAncestorOfType(UIJCRExplorer.class) ;
54      return uiExplorer.getDocumentInfoTemplate();
55    }
56  }