1 5 package org.exoplatform.portlets.content.explorer.component; 6 7 import javax.jcr.Node ; 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 import org.exoplatform.portlets.content.explorer.component.model.NodeDescriptor; 13 17 public class UIJCRNodeInfo extends UIExoCommand implements ExplorerListener { 18 private static Parameter[] DELETE_PARAMS = {new Parameter(ACTION, DELETE_ACTION)} ; 19 20 private Node currentNode_ ; 21 22 public UIJCRNodeInfo() { 23 setRendererType("JCRNodeInfoRenderer") ; 24 addActionListener(RemoveNodeActionListener.class, DELETE_ACTION) ; 25 } 26 27 public Node getCurrentNode() { return currentNode_ ; } 28 29 public void onChange(UIExplorer uiExplorer, NodeDescriptor node) { 30 UIJCRExplorer uiJCRExplorer = (UIJCRExplorer) uiExplorer ; 31 currentNode_ = uiJCRExplorer.getCurrentNode() ; 32 } 33 34 public void onRemove(UIExplorer uiExplorer, NodeDescriptor node) { 35 36 } 37 38 public void onModify(UIExplorer uiExplorer, NodeDescriptor node) {} 39 40 public void onAddChild(UIExplorer uiExplorer, NodeDescriptor node) { 41 42 } 43 44 public String getFamily() { 45 return "org.exoplatform.portlets.content.explorer.component.UIJCRNodeInfo" ; 46 } 47 48 static public class RemoveNodeActionListener extends ExoActionListener { 49 public void execute(ExoActionEvent event) throws Exception { 50 51 } 52 } 53 } | Popular Tags |