1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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
25
26
27
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 }