1 4 package org.exoplatform.portlets.content.explorer.component; 5 6 import org.exoplatform.faces.core.component.UIGrid; 7 import org.exoplatform.faces.core.component.model.LabelCell; 8 import org.exoplatform.faces.core.component.model.Row; 9 import org.exoplatform.portlets.content.explorer.component.model.NodeDescriptor; 10 11 14 public class UIChoiceLabel extends UIGrid implements ExplorerListener{ 15 16 public UIChoiceLabel(){ 17 setId("UIChoiceLabel"); 18 19 add(new Row(). 20 add(new LabelCell("#{UIChoiceLabel.label.choice}"))); 21 } 22 23 24 public void onChange(UIExplorer uiExplorer, NodeDescriptor node) { 25 if(node.isLeafNode()) setRendered(false) ; 26 else setRendered(true) ; 27 } 28 29 public void onModify(UIExplorer uiExplorer, NodeDescriptor node) {} 30 31 public void onAddChild(UIExplorer uiExplorer, NodeDescriptor node) { } 32 33 public void onRemove(UIExplorer uiExplorer, NodeDescriptor node) { } 34 35 36 } 37 | Popular Tags |