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 32 public class EnableTag extends AbstractUiTag { 33 37 40 private static final long serialVersionUID = 100L; 41 42 45 static final String CALLBACK_METHOD = "enableElements"; 46 47 48 52 55 private String elementId; 56 59 private String elementName; 60 61 62 63 67 70 public EnableTag() { 71 super(); 72 } 73 74 75 76 80 85 public void setElementId(String val) { 86 this.elementId = val; 87 } 88 89 94 public void setElementName(String val) { 95 this.elementName = val; 96 } 97 98 99 103 109 public int doEndTag() throws JspException { 110 RuntimeValidator.assertAttributeExclusive( 111 "elementId", this.elementId, "elementName", this.elementName); 112 RuntimeValidator.assertEitherSpecified( 113 "elementId", this.elementId, "elementName", this.elementName); 114 115 FormGuideTag formGuideTag = (FormGuideTag) findParent(FormGuideTag.class); 116 formGuideTag.addJavascriptCallback(CALLBACK_METHOD, 117 DisableTag.CALLBACK_METHOD, this.elementId, this.elementName); 118 119 return EVAL_PAGE; 120 } 121 } 122 | Popular Tags |