1 18 package org.apache.beehive.netui.tags.tree; 19 20 import org.apache.beehive.netui.tags.AbstractSimpleTag; 21 import org.apache.beehive.netui.util.logging.Logger; 22 23 import javax.servlet.jsp.JspException ; 24 25 43 public class TreeHtmlAttribute extends AbstractSimpleTag 44 { 45 private static final Logger logger = Logger.getInstance(TreeHtmlAttribute.class); 46 47 TreeHtmlAttributeInfo _info = new TreeHtmlAttributeInfo(); 48 49 52 public String getTagName() 53 { 54 return "TreeHtmlAttribute"; 55 } 56 57 68 public void setAttribute(String attr) 69 { 70 _info.setAttribute(attr); 71 } 72 73 82 public void setValue(String value) 83 { 84 _info.setValue(value); 85 } 86 87 95 public void setOnIcon(boolean onIcon) 96 { 97 _info.setOnIcon(onIcon); 98 } 99 100 108 public void setOnSelectionLink(boolean onSelectionLink) 109 { 110 _info.setOnSelectionLink(onSelectionLink); 111 } 112 113 121 public void setOnDiv(boolean onDiv) 122 { 123 _info.setOnDiv(onDiv); 124 } 125 126 134 public void setApplyToDescendents(boolean applyToDescendents) 135 { 136 _info.setApplyToDescendents(applyToDescendents); 137 } 138 139 public void doTag() 140 throws JspException 141 { 142 Object o = getParent(); 143 assert (o != null); 144 145 if (o instanceof TreeItem) { 146 TreeItem ti = (TreeItem) o; 147 ti.setItemAttribute(_info); 148 } 149 else { 150 logger.error("Found an unexpected parent object'" + o.getClass().getName() + "' expected a TreeItem"); 151 } 152 } 153 } 154 155 | Popular Tags |