1 37 38 package net.sourceforge.cruisecontrol.taglib; 39 40 import javax.servlet.jsp.JspException ; 41 import javax.servlet.jsp.JspTagException ; 42 import javax.servlet.jsp.tagext.Tag ; 43 44 49 public class TabRowTag extends CruiseControlTagSupport { 50 private String name; 51 private String label; 52 53 public int doStartTag() throws JspException { 54 Tag parentTag = getParent(); 55 if (!(parentTag instanceof TabSheetTag)) { 56 throw new JspTagException ("TabRowTag needs to be directly enclosed in a TabSheetTag"); 57 } 58 TabSheetTag tabSheet = (TabSheetTag) parentTag; 59 tabSheet.addTab(new Tab(name, null, label, false, true)); 60 return Tag.SKIP_BODY; 61 } 62 63 public void setName(String name) { 64 this.name = name; 65 } 66 67 public void setLabel(String label) { 68 this.label = label; 69 } 70 } 71 | Popular Tags |