1 16 package org.apache.taglibs.dbtags.resultset; 17 18 import javax.servlet.jsp.tagext.TagData ; 19 import javax.servlet.jsp.tagext.TagExtraInfo ; 20 21 28 public class BaseGetterTEI extends TagExtraInfo { 29 30 public boolean isValid (TagData data) 31 { 32 boolean bPosition = false; 33 boolean bName = false; 34 35 if (data.getAttribute("position") != null) { 36 bPosition = true; 37 } 38 39 if (data.getAttribute("colName") != null) { 40 bName = true; 41 } 42 43 if (bPosition && bName) { 44 System.out.println("Error: Get tags must not set _both_ the colName and position attributes"); 45 return false; 46 } 47 48 if (!bPosition && !bName) { 49 System.out.println("Error: Get tags must set _either_ the colName or the position attribute"); 50 return false; 51 } 52 53 return true; 54 } 55 } 56 57 | Popular Tags |