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