1 5 package org.exoplatform.faces.core.component; 6 7 import java.util.ArrayList ; 8 import java.util.List ; 9 import javax.faces.context.FacesContext; 10 import javax.faces.render.Renderer; 11 import org.exoplatform.faces.core.component.model.Row; 12 import org.exoplatform.faces.core.component.model.Rows; 13 19 public class UIGrid extends UIExoCommand { 20 public static final String COMPONENT_FAMILY = "org.exoplatform.faces.core.component.UIGrid" ; 21 private List rows_ ; 22 23 public UIGrid() { 24 rows_ = new ArrayList (10) ; 25 setRendererType("GridRenderer") ; 26 } 27 28 final public UIGrid setClazzAndreturn(String clazz) { 29 setClazz(clazz) ; 30 return this ; 31 } 32 33 final public List getRows() { return rows_ ; } 34 35 public void clear() { 36 getChildren().clear() ; 37 rows_.clear() ; 38 } 39 40 final public UIGrid add(Row row) { 41 rows_.add(row) ; 42 return this ; 43 } 44 45 final public UIGrid add(Rows rows) { 46 rows_.add(rows) ; 47 return this ; 48 } 49 50 public Renderer getComponentRenderer(FacesContext context) { 51 return getRenderer(context); 52 } 53 54 public String getFamily() { return COMPONENT_FAMILY ; } 55 } | Popular Tags |