1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.exoplatform.wcm.webui.authoring;
18
19 import java.util.List;
20
21 import javax.jcr.Node;
22
23 import org.exoplatform.ecm.webui.utils.Utils;
24 import org.exoplatform.services.wcm.core.NodeLocation;
25 import org.exoplatform.webui.config.annotation.ComponentConfig;
26 import org.exoplatform.webui.config.annotation.ComponentConfigs;
27 import org.exoplatform.webui.config.annotation.EventConfig;
28 import org.exoplatform.webui.core.UIContainer;
29 import org.exoplatform.webui.core.UIPageIterator;
30 import org.exoplatform.webui.core.lifecycle.Lifecycle;
31
32
33
34
35
36
37
38
39 @ComponentConfigs( {
40 @ComponentConfig(lifecycle = Lifecycle.class,
41 template = "app:/groovy/authoring/UIDashboardColumn.gtmpl",
42 events = {
43 @EventConfig(listeners = UIDashboardForm.ShowDocumentActionListener.class),
44 @EventConfig(listeners = UIDashboardForm.RefreshActionListener.class) }),
45 @ComponentConfig(type = UIPageIterator.class,
46 template = "app:/groovy/authoring/UIDashBoardColumnIterator.gtmpl",
47 events = {@EventConfig(listeners = UIPageIterator.ShowPageActionListener.class)})
48 })
49 public class UIDashBoardColumn extends UIContainer {
50
51 private static final String locale = "locale.portlet.AuthoringDashboard.AuthoringDashboardPortlet";
52
53 private UIPageIterator uiPageIterator_;
54 private String label_;
55
56 public UIDashBoardColumn() throws Exception {
57 uiPageIterator_ = addChild(UIPageIterator.class, null, "UIDashboardColumnIterator" + Math.random());
58 }
59
60 public UIPageIterator getUIPageIterator() {
61 return uiPageIterator_;
62 }
63
64 public List<Node> getNodes() throws Exception {
65 return NodeLocation.getNodeListByLocationList(uiPageIterator_.getCurrentPageData());
66 }
67
68 public void setLabel(String value) {
69 label_ = Utils.getResourceBundle(locale,
70 value,
71 this.getClass().getClassLoader());
72 }
73
74 public String getLabel() {
75 return label_;
76 }
77 }