1 5 package org.exoplatform.portlets.monitor.session.component; 6 7 import java.util.List ; 8 import org.exoplatform.faces.core.component.UIExoCommand; 9 import org.exoplatform.faces.core.component.model.Parameter; 10 import org.exoplatform.faces.core.event.ExoActionEvent; 11 import org.exoplatform.faces.core.event.ExoActionListener; 12 18 public class UIActionHistory extends UIExoCommand { 19 final public static Parameter[] BACK_PARAMS = {new Parameter(ACTION , CANCEL_ACTION) } ; 20 21 private List actionHistory_ ; 22 private Class backModule_ ; 23 24 public UIActionHistory() { 25 setRendererType("ActionHistoryRenderer"); 26 addActionListener(CancelActionListener.class, CANCEL_ACTION) ; 27 } 28 29 public List getActionHistory() { return actionHistory_ ; } 30 public void setActionHistory(Class backModule, List history) { 31 actionHistory_ = history ; 32 backModule_ = backModule ; 33 } 34 35 public String getFamily() { 36 return "org.exoplatform.portlets.monitor.session.component.UIActionHistory"; 37 } 38 39 static public class CancelActionListener extends ExoActionListener { 40 public void execute(ExoActionEvent event) throws Exception { 41 UIActionHistory uiComp = (UIActionHistory) event.getSource() ; 42 uiComp.setRenderedSibling(uiComp.backModule_) ; 43 } 44 } 45 }
| Popular Tags
|