1 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 15 public class UIData extends UIExoCommand { 16 private ImportData data_ ; 17 private Class importClass_ ; 18 19 public UIData() { 20 setId("UIData") ; 21 setRendererType("DataRenderer") ; 22 addActionListener(BackActionListener.class, "cancel") ; 23 } 24 25 public void setImportClass(Class clazz ) { importClass_ = clazz ; } 26 27 public String 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 { 36 UIData uiData = (UIData) event.getSource(); 37 UINode parent = (UINode) uiData.getParent() ; 38 parent.setRenderedComponent(uiData.importClass_) ; 39 } 40 } 41 } | Popular Tags |