1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.exoplatform.ecm.webui.component.explorer.popup.admin;
18
19 import org.exoplatform.webui.config.annotation.ComponentConfig;
20 import org.exoplatform.webui.config.annotation.EventConfig;
21 import org.exoplatform.webui.core.UIContainer;
22 import org.exoplatform.webui.event.Event;
23 import org.exoplatform.webui.event.EventListener;
24
25
26
27
28
29
30
31
32 @ComponentConfig(
33 template = "app:/groovy/webui/component/explorer/popup/admin/UITabWithAction.gtmpl",
34 events = { @EventConfig(listeners = UIActionViewContainer.CancelActionListener.class)}
35 )
36
37 public class UIActionViewContainer extends UIContainer {
38
39 private String[] actions_ = new String[] {"Cancel"} ;
40
41 public String[] getActions() {return actions_ ;}
42
43 static public class CancelActionListener extends EventListener<UIActionViewContainer> {
44 public void execute(Event<UIActionViewContainer> event) throws Exception {
45 UIActionManager uiActionManager = event.getSource().getAncestorOfType(UIActionManager.class) ;
46 uiActionManager.removeChild(UIActionViewContainer.class) ;
47 uiActionManager.setRenderedChild(UIActionListContainer.class) ;
48 }
49 }
50 }