You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-dev@jakarta.apache.org by mo...@apache.org on 2001/03/19 22:18:04 UTC

cvs commit: jakarta-taglibs/jdbc/src/org/apache/taglibs/jdbc/resultset BaseGetterTEI.java

morgand     01/03/19 13:18:03

  Modified:    jdbc/src/org/apache/taglibs/jdbc/resultset
                        BaseGetterTEI.java
  Log:
  changed isValid tag to use getAttribute(String) instead of getAttributes(), a patch for
  the Resin JSP engine
  
  Revision  Changes    Path
  1.5       +6 -10     jakarta-taglibs/jdbc/src/org/apache/taglibs/jdbc/resultset/BaseGetterTEI.java
  
  Index: BaseGetterTEI.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/jdbc/src/org/apache/taglibs/jdbc/resultset/BaseGetterTEI.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- BaseGetterTEI.java	2001/02/09 17:15:44	1.4
  +++ BaseGetterTEI.java	2001/03/19 21:18:02	1.5
  @@ -57,8 +57,6 @@
    */
   package org.apache.taglibs.jdbc.resultset;
   
  -import java.util.Enumeration;
  -
   import javax.servlet.jsp.tagext.TagData;
   import javax.servlet.jsp.tagext.TagExtraInfo;
   
  @@ -66,7 +64,7 @@
    * TagExtraInfo for all getter tags.  Insures that each
    * getter tag uses <i>either</i> the position attribute
    * or the colName attribute.
  - * 
  + *
    * @author Marius Scurtescu
    */
   public class BaseGetterTEI extends TagExtraInfo {
  @@ -75,15 +73,13 @@
     {
       boolean bPosition = false;
       boolean bName = false;
  -    Enumeration eAttrib = data.getAttributes ();
   
  -    while (eAttrib.hasMoreElements ()) {
  -      String strAttrib = (String) eAttrib.nextElement ();
  +    if (data.getAttribute("position") != null) {
  +      bPosition = true;
  +    }
   
  -      if (strAttrib.equals ("position"))
  -        bPosition = true;
  -      else if (strAttrib.equals ("colName"))
  -        bName = true;
  +    if (data.getAttribute("colName") != null) {
  +      bName = true;
       }
   
       if (bPosition && bName) {