1 23 24 package org.dbforms.taglib; 25 26 import org.dbforms.config.*; 27 28 import javax.servlet.jsp.*; 29 30 31 32 38 public class DbLinkPositionItemTag extends DbBaseHandlerTag 39 implements javax.servlet.jsp.tagext.TryCatchFinally { 40 String value; 41 42 47 public void setValue(String string) { 48 value = string; 49 } 50 51 52 57 public String getValue() { 58 return value; 59 } 60 61 62 65 public void doCatch(Throwable t) throws Throwable { 66 throw t; 67 } 68 69 70 73 public void doFinally() { 74 value = null; 75 super.doFinally(); 76 } 77 78 79 88 public int doStartTag() throws JspException { 89 DbLinkURLTag parentTag = null; 90 91 try { 92 parentTag = (DbLinkURLTag) this.getParent(); 93 } catch (Exception e) { 94 throw new JspException("DbLinkPositionItem-element must be placed inside a DbLinkURL-element!"); 95 } 96 97 Table table = parentTag.getTable(); 98 Field field = table.getFieldByName(getName()); 99 parentTag.addPositionPart(field, getValue()); 100 101 return EVAL_BODY_INCLUDE; 102 } 103 } 104 | Popular Tags |