1 package albel.tags.table; 2 3 import javax.servlet.jsp.*; 4 import javax.servlet.*; 5 import javax.servlet.jsp.tagext.*; 6 import javax.servlet.http.*; 7 import albel.tags.table.utils.*; 8 import albel.tags.table.model.*; 9 import albel.tags.table.controll.*; 10 14 public class RowHandlerTag extends BodyTagSupport 15 { 16 17 20 private String handlerObject; 21 22 25 private String handlerClass; 26 27 public RowHandlerTag() 28 { 29 super(); 30 } 31 32 40 41 49 public void otherDoStartTagOperations() 50 { 51 52 70 71 } 72 73 79 public boolean theBodyShouldBeEvaluated() 80 { 81 82 return true; 88 89 } 90 91 92 100 public void otherDoEndTagOperations() 101 { 102 103 111 112 } 113 114 121 public boolean shouldEvaluateRestOfPageAfterEndTag() 122 { 123 124 return true; 131 132 } 133 134 135 144 145 148 public int doStartTag() throws JspException 149 { 150 TableTag tableTag=(TableTag)this.getParent().getParent().getParent(); 151 HttpServletRequest request=(HttpServletRequest)pageContext.getRequest(); 152 HttpRequestAttributesMap attrsReq=new HttpRequestAttributesMap(request); 153 HttpSessionAttributesMap attrsSes=new HttpSessionAttributesMap(request.getSession()); 154 try 155 { 156 Manager.setupRowHandler(attrsSes,attrsReq,tableTag.getId(), getHandlerClass(), getHandlerObject()); 157 } 158 catch (albel.tags.table.model.TableTagException tex) 159 { 160 throw new JspException(); 161 } 162 return this.EVAL_BODY_INCLUDE; 163 } 164 165 166 169 public int doEndTag() throws JspException 170 { 171 return EVAL_PAGE; 173 } 174 175 179 public String getHandlerObject() 180 { 181 return this.handlerObject; 182 } 183 184 188 public void setHandlerObject(String handlerObject) 189 { 190 this.handlerObject = handlerObject; 191 } 192 193 197 public String getHandlerClass() 198 { 199 return this.handlerClass; 200 } 201 202 206 public void setHandlerClass(String handlerClass) 207 { 208 this.handlerClass = handlerClass; 209 } 210 211 } 212 | Popular Tags |