1 33 34 package com.icesoft.faces.webapp.parser; 35 36 import com.icesoft.faces.component.UIXhtmlComponent; 37 import org.xml.sax.Attributes ; 38 39 import javax.faces.component.UIComponent; 40 import javax.faces.webapp.UIComponentTag; 41 42 45 public class XhtmlTag extends UIComponentTag { 46 private String tagName; 47 private Attributes attributes; 48 private static int uniqueId = 0; 49 50 55 public String getRendererType() { 56 return "com.icesoft.faces.Xhtml"; 57 } 58 59 64 public String getComponentType() { 65 return TagToComponentMap.XHTML_COMPONENT_TYPE; 66 } 67 68 69 protected void setProperties(UIComponent comp) { 70 super.setProperties(comp); 71 UIXhtmlComponent component = (UIXhtmlComponent) comp; 72 component.setTag(getTagName()); 73 component.setXmlAttributes(getAttributes()); 74 String id = new String ("icesoftXhtmlID" + uniqueId++); 76 component.setId(id); 77 this.setId(id); 78 } 79 80 85 public void setTagName(String tag) { 86 tagName = tag; 87 } 88 89 94 public String getTagName() { 95 return tagName; 96 } 97 98 103 public void setAttributes(Attributes attrib) { 104 attributes = attrib; 105 } 106 107 112 public Attributes getAttributes() { 113 return attributes; 114 } 115 } 116 | Popular Tags |