KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > exoplatform > portlets > monitor > session > component > UIActionHistory


1 /***************************************************************************
2  * Copyright 2001-2003 The eXo Platform SARL All rights reserved. *
3  * Please look at license.txt in info directory for more license detail. *
4  **************************************************************************/

5 package org.exoplatform.portlets.monitor.session.component;
6
7 import java.util.List JavaDoc ;
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 /**
13  * Wed, Dec 22, 2003 @ 23:14
14  * @author: Tuan Nguyen
15  * @email: tuan08@users.sourceforge.net
16  * @version: $Id: UIPortalMonitor.java,v 1.3 2004/08/02 12:04:26 tuan08 Exp $
17  */

18 public class UIActionHistory extends UIExoCommand {
19   final public static Parameter[] BACK_PARAMS = {new Parameter(ACTION , CANCEL_ACTION) } ;
20
21   private List JavaDoc actionHistory_ ;
22   private Class JavaDoc backModule_ ;
23   
24   public UIActionHistory() {
25     setRendererType("ActionHistoryRenderer");
26     addActionListener(CancelActionListener.class, CANCEL_ACTION) ;
27     }
28   
29   public List JavaDoc getActionHistory() { return actionHistory_ ; }
30   public void setActionHistory(Class JavaDoc backModule, List JavaDoc history) {
31     actionHistory_ = history ;
32     backModule_ = backModule ;
33   }
34   
35   public String JavaDoc 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 JavaDoc {
41       UIActionHistory uiComp = (UIActionHistory) event.getSource() ;
42       uiComp.setRenderedSibling(uiComp.backModule_) ;
43     }
44   }
45 }
Free Books   Free Magazines  
Popular Tags