KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > exoplatform > portlets > backup > component > UIData


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.backup.component;
6
7 import org.exoplatform.faces.core.component.UIExoCommand;
8 import org.exoplatform.faces.core.component.UINode;
9 import org.exoplatform.faces.core.event.*;
10 import org.exoplatform.portlets.backup.component.model.ImportData;
11 /**
12  * @email: tuan08@users.sourceforge.net
13  * @version: $Id: UIData.java,v 1.2 2004/09/21 00:16:11 tuan08 Exp $
14  */

15 public class UIData extends UIExoCommand {
16   private ImportData data_ ;
17   private Class JavaDoc importClass_ ;
18
19   public UIData() {
20     setId("UIData") ;
21         setRendererType("DataRenderer") ;
22     addActionListener(BackActionListener.class, "cancel") ;
23   }
24   
25   public void setImportClass(Class JavaDoc clazz ) { importClass_ = clazz ; }
26   
27   public String JavaDoc getFamily() {
28     return "org.exoplatform.portlets.backup.component.UIData" ;
29   }
30   
31   public ImportData getImportDataModel() { return data_ ; }
32   public void setImportDataModel(ImportData data) { data_ = data ;}
33   
34   static public class BackActionListener extends ExoActionListener {
35     public void execute(ExoActionEvent event) throws Exception JavaDoc {
36       UIData uiData = (UIData) event.getSource();
37         UINode parent = (UINode) uiData.getParent() ;
38         parent.setRenderedComponent(uiData.importClass_) ;
39     }
40   }
41 }
Popular Tags