1 18 package net.sf.uitags.tag.formGuide; 19 20 import javax.servlet.jsp.JspException ; 21 22 import net.sf.uitags.tag.AbstractUiTag; 23 import net.sf.uitags.tagutil.validation.RuntimeValidator; 24 25 31 public class InsertTag extends AbstractUiTag { 32 36 39 private static final long serialVersionUID = 100L; 40 41 44 public static final String CALLBACK_METHOD = "insertElements"; 45 46 47 51 54 private String elementId; 55 58 private String elementName; 59 60 61 62 66 69 public InsertTag() { 70 super(); 71 } 72 73 74 75 79 84 public void setElementId(String val) { 85 this.elementId = val; 86 } 87 88 93 public void setElementName(String val) { 94 this.elementName = val; 95 } 96 97 98 102 108 public int doEndTag() throws JspException { 109 RuntimeValidator.assertAttributeExclusive( 110 "elementId", this.elementId, "elementName", this.elementName); 111 RuntimeValidator.assertEitherSpecified( 112 "elementId", this.elementId, "elementName", this.elementName); 113 114 FormGuideTag formGuideTag = (FormGuideTag) findParent(FormGuideTag.class); 115 formGuideTag.addJavascriptCallback(CALLBACK_METHOD, 116 RemoveTag.CALLBACK_METHOD, this.elementId, this.elementName); 117 118 return EVAL_PAGE; 119 } 120 } 121 | Popular Tags |