1 16 package org.apache.cocoon.faces.taglib.html; 17 18 import org.apache.cocoon.faces.taglib.UIComponentTag; 19 20 import javax.faces.FacesException; 21 import javax.faces.component.UIComponent; 22 import javax.faces.component.UIPanel; 23 24 27 public class PanelGroupTag extends UIComponentTag { 28 29 private String style; 30 private String styleClass; 31 32 33 public void setStyle(String style) { 34 this.style = style; 35 } 36 37 public void setStyleClass(String styleClass) { 38 this.styleClass = styleClass; 39 } 40 41 42 public String getRendererType() { 43 return "javax.faces.Group"; 44 } 45 46 public String getComponentType() { 47 return "javax.faces.HtmlPanelGroup"; 48 } 49 50 51 protected void setProperties(UIComponent component) { 52 super.setProperties(component); 53 54 if (!(component instanceof UIPanel)) { 55 throw new FacesException("Tag <" + getClass().getName() + "> expected UIPanel. " + 56 "Got <" + component.getClass().getName() + ">"); 57 } 58 59 setProperty(component, "style", style); 60 setProperty(component, "styleClass", styleClass); 61 } 62 63 public void recycle() { 64 super.recycle(); 65 style = null; 66 styleClass = null; 67 } 68 } 69 | Popular Tags |