1 15 package fr.improve.struts.taglib.layout.expert; 16 17 import javax.servlet.jsp.JspException ; 18 import javax.servlet.jsp.tagext.TagSupport ; 19 20 24 public class ExpertFieldTag extends TagSupport { 25 26 protected String layoutId; 27 28 public void setLayoutId(String layoutId) { 29 this.layoutId = layoutId; 30 } 31 32 public String getLayoutId() { 33 return layoutId; 34 } 35 36 public int doStartTag() throws JspException { 37 ExpertTag tag = (ExpertTag) findAncestorWithClass(this, ExpertTag.class); 38 if (tag==null) { 39 throw new JspException ("<layout:expertField> should be nested in a <layout:expert> tag"); 40 } 41 tag.doReferencer(this.layoutId); 42 return SKIP_BODY; 43 } 44 } 45 | Popular Tags |