kinman      2002/11/04 09:44:25

  Modified:    jsr152/src/share/javax/servlet/jsp/tagext BodyTag.java
                        IterationTag.java SimpleTag.java Tag.java
                        TagData.java TagExtraInfo.java TagInfo.java
                        VariableInfo.java
               jsr154/src/share/dtd web-jsptaglibrary_2_0.xsd
  Log:
  - Patch by Mark Roth
  
  Here is a patch with some more javadoc clarifications, to make the API
  more testable.  Thanks go to Ryan Lubke for helping out!
  
  Change summary:
  ---------------
  
  jsr152/src/share/javax/servlet/jsp/tagext/VariableInfo.java
     - Fixed incorrect wording from last patch, for variable
       synchronization.
  
  jsr152/src/share/javax/servlet/jsp/tagext/TagExtraInfo.java
     - Fixed wording to preserve forwards compatibility for existing TEI
       implementations.
  
  jsr152/src/share/javax/servlet/jsp/tagext/TagInfo.java
     - Fixed default implementation of getVariableInfo() to return a
       variable for the id attribute, if specified.
       Clarified intent in javadocs.
  
  jsr152/src/share/javax/servlet/jsp/tagext/TagData.java
     - Fixed getId() description, as we're not returning the jsp:id in this
       case.
  
  jsr152/src/share/javax/servlet/jsp/tagext/BodyTag.java
  jsr152/src/share/javax/servlet/jsp/tagext/IterationTag.java
  jsr152/src/share/javax/servlet/jsp/tagext/SimpleTag.java
  jsr152/src/share/javax/servlet/jsp/tagext/Tag.java
     - Clarified javadocs w.r.t. variable synchronization
  
  jsr152/src/share/dtd/web-jsptaglibrary_2_0.xsd
  jsr154/src/share/dtd/web-jsptaglibrary_2_0.xsd
     - Removed fragment element under variable element, as fragment-scoped
       variables are no longer supported.
  
  Revision  Changes    Path
  1.3       +3 -3      
jakarta-servletapi-5/jsr152/src/share/javax/servlet/jsp/tagext/BodyTag.java
  
  Index: BodyTag.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-servletapi-5/jsr152/src/share/javax/servlet/jsp/tagext/BodyTag.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- BodyTag.java      29 Oct 2002 01:18:12 -0000      1.2
  +++ BodyTag.java      4 Nov 2002 17:44:24 -0000       1.3
  @@ -200,9 +200,9 @@
        * tags whose doStartTag() method returns SKIP_BODY or EVAL_BODY_INCLUDE.
        *
        * <p>
  -     * The JSP container will resynchronize any variable values that 
  -     * are indicated as so in TagExtraInfo or TLD after the invocation of 
  -     * doInitBody().
  +     * The JSP container will resynchronize the values of any AT_BEGIN and
  +     * NESTED variables (defined by the associated TagExtraInfo or TLD) after
  +     * the invocation of doInitBody().
        *
        * @throws JspException
        * @see #doAfterBody
  
  
  
  1.3       +3 -3      
jakarta-servletapi-5/jsr152/src/share/javax/servlet/jsp/tagext/IterationTag.java
  
  Index: IterationTag.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-servletapi-5/jsr152/src/share/javax/servlet/jsp/tagext/IterationTag.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- IterationTag.java 29 Oct 2002 01:18:12 -0000      1.2
  +++ IterationTag.java 4 Nov 2002 17:44:24 -0000       1.3
  @@ -138,9 +138,9 @@
        * of external computation.
        *
        * <p>
  -     * The JSP container will resynchronize any variable values that are 
  -     * indicated as so in TagExtraInfo or TLD after the invocation of 
  -     * doAfterBody().
  +     * The JSP container will resynchronize the values of any AT_BEGIN and
  +     * NESTED variables (defined by the associated TagExtraInfo or TLD) after
  +     * the invocation of doAfterBody().
        *
        * @return whether additional evaluations of the body are desired
        * @throws JspException
  
  
  
  1.4       +5 -0      
jakarta-servletapi-5/jsr152/src/share/javax/servlet/jsp/tagext/SimpleTag.java
  
  Index: SimpleTag.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-servletapi-5/jsr152/src/share/javax/servlet/jsp/tagext/SimpleTag.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- SimpleTag.java    29 Oct 2002 01:18:12 -0000      1.3
  +++ SimpleTag.java    4 Nov 2002 17:44:24 -0000       1.4
  @@ -111,6 +111,11 @@
        * Called by the container to invoke this tag.
        * The implementation of this method is provided by the tag library
        * developer, and handles all tag processing, body iteration, etc.
  +     *
  +     * <p>
  +     * The JSP container will resynchronize any AT_BEGIN and AT_END
  +     * variables (defined by the associated tag file, TagExtraInfo, or TLD)
  +     * after the invocation of doTag().
        * 
        * @throws javax.servlet.jsp.JspException If an error occurred 
        *     while processing this tag.
  
  
  
  1.4       +8 -6      
jakarta-servletapi-5/jsr152/src/share/javax/servlet/jsp/tagext/Tag.java
  
  Index: Tag.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-servletapi-5/jsr152/src/share/javax/servlet/jsp/tagext/Tag.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Tag.java  29 Oct 2002 01:18:12 -0000      1.3
  +++ Tag.java  4 Nov 2002 17:44:24 -0000       1.4
  @@ -243,9 +243,11 @@
        * implements BodyTag.
        *
        * <p>
  -     * The JSP container will resynchronize any variable values that are 
  -     * indicated as so in TagExtraInfo or the TLD after the invocation of 
  -     * doStartTag().
  +     * The JSP container will resynchronize the values of any AT_BEGIN and
  +     * NESTED variables (defined by the associated TagExtraInfo or TLD)
  +     * after the invocation of doStartTag(), except for a tag handler
  +     * implementing BodyTag whose doStartTag() method returns
  +     * BodyTag.EVAL_BODY_BUFFERED.
        *
        * @return EVAL_BODY_INCLUDE if the tag wants to process body, SKIP_BODY 
        *     if it does not want to process it.
  @@ -275,9 +277,9 @@
        * only the current page evaluation is stopped.
        *
        * <p>
  -     * The JSP container will resynchronize any variable values that are 
  -     * indicated as so in TagExtraInfo or the TLD after the invocation of 
  -     * doEndTag().
  +     * The JSP container will resynchronize the values of any AT_BEGIN and
  +     * AT_END variables (defined by the associated TagExtraInfo or TLD)
  +     * after the invocation of doEndTag().
        *
        * @return indication of whether to continue evaluating the JSP page.
        * @throws JspException if an error occurred while processing this tag
  
  
  
  1.4       +3 -2      
jakarta-servletapi-5/jsr152/src/share/javax/servlet/jsp/tagext/TagData.java
  
  Index: TagData.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-servletapi-5/jsr152/src/share/javax/servlet/jsp/tagext/TagData.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TagData.java      29 Oct 2002 01:18:12 -0000      1.3
  +++ TagData.java      4 Nov 2002 17:44:24 -0000       1.4
  @@ -119,9 +119,10 @@
       }
   
       /**
  -     * The value of the jsp:id attribute.
  +     * The value of the tag's id attribute.
        *
  -     * @return the value of the jsp:id attribute.
  +     * @return the value of the tag's id attribute, or null if no such
  +     *     attribute was specified.
        */
   
       public String getId() {
  
  
  
  1.4       +1 -1      
jakarta-servletapi-5/jsr152/src/share/javax/servlet/jsp/tagext/TagExtraInfo.java
  
  Index: TagExtraInfo.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-servletapi-5/jsr152/src/share/javax/servlet/jsp/tagext/TagExtraInfo.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TagExtraInfo.java 29 Oct 2002 01:18:12 -0000      1.3
  +++ TagExtraInfo.java 4 Nov 2002 17:44:24 -0000       1.4
  @@ -97,7 +97,7 @@
        * Request-time attributes are indicated as such in the TagData parameter.
        *
        * @param data The TagData instance.
  -     * @return An array of VariableInfo data, or a zero length array
  +     * @return An array of VariableInfo data, or null or a zero length array
        *         if no scripting variables are to be defined.
        */
       public VariableInfo[] getVariableInfo(TagData data) {
  
  
  
  1.4       +19 -10    
jakarta-servletapi-5/jsr152/src/share/javax/servlet/jsp/tagext/TagInfo.java
  
  Index: TagInfo.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-servletapi-5/jsr152/src/share/javax/servlet/jsp/tagext/TagInfo.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TagInfo.java      29 Oct 2002 01:18:12 -0000      1.3
  +++ TagInfo.java      4 Nov 2002 17:44:24 -0000       1.4
  @@ -265,22 +265,31 @@
       /**
        * Information on the scripting objects created by this tag at runtime.
        * This is a convenience method on the associated TagExtraInfo class.
  -     * <p>
  -     * Default is null if the tag has no "id" attribute,
  -     * otherwise, {"id", Object}
        *
        * @param data TagData describing this action.
  -     * @return Array of VariableInfo elements, or a zero length
  -     *         array if the associated TagExtraInfo defines no scripting
  -     *         variables.
  +     * @return if a TagExtraInfo object is associated with this TagInfo, the
  +     *     the result of getTagExtraInfo().getVariableInfo( data ), otherwise
  +     *     null if the tag has no "id" attribute or new VariableInfo[] {
  +     *     new VariableInfo( data.getId(), "java.lang.Object", true,
  +     *     VariableInfo.NESTED ) } if an "id" attribute is present.
        */
  -
      public VariableInfo[] getVariableInfo(TagData data) {
  +       VariableInfo[] result = null;
          TagExtraInfo tei = getTagExtraInfo();
  -       if (tei == null) {
  -        return null;
  +       if (tei != null) {
  +        result = tei.getVariableInfo( data );
          }
  -       return tei.getVariableInfo(data);
  +       else {
  +        String idValue = data.getId();
  +        if( idValue != null ) {
  +            result = 
  +                new VariableInfo[] {
  +                    new VariableInfo( idValue, "java.lang.Object",
  +                        true, VariableInfo.NESTED )
  +                };
  +        }
  +       }
  +       return result;
      }
   
       /**
  
  
  
  1.5       +1 -2      
jakarta-servletapi-5/jsr152/src/share/javax/servlet/jsp/tagext/VariableInfo.java
  
  Index: VariableInfo.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-servletapi-5/jsr152/src/share/javax/servlet/jsp/tagext/VariableInfo.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- VariableInfo.java 31 Oct 2002 23:02:01 -0000      1.4
  +++ VariableInfo.java 4 Nov 2002 17:44:24 -0000       1.5
  @@ -137,8 +137,7 @@
    * The scope value for a variable implies what methods may affect its
    * value and thus where synchronization is needed as illustrated by
    * the table below.  <b>Note:</b> the synchronization of the variable(s)
  - * will occur <em>after</em> the associated method has been called.
  - *
  + * will occur <em>after</em> the respective method has been called.
    *
    * <blockquote>
    * <table cellpadding="2" cellspacing="2" border="0" width="55%"
  
  
  
  1.5       +5 -3      
jakarta-servletapi-5/jsr154/src/share/dtd/web-jsptaglibrary_2_0.xsd
  
  Index: web-jsptaglibrary_2_0.xsd
  ===================================================================
  RCS file: 
/home/cvs/jakarta-servletapi-5/jsr154/src/share/dtd/web-jsptaglibrary_2_0.xsd,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- web-jsptaglibrary_2_0.xsd 3 Oct 2002 23:01:44 -0000       1.4
  +++ web-jsptaglibrary_2_0.xsd 4 Nov 2002 17:44:25 -0000       1.5
  @@ -10,7 +10,7 @@
   
   <xsd:annotation>
   <xsd:documentation>
  -@(#)web-jsptaglibrary_2_0.xsds       1.19 09/30/02
  +@(#)web-jsptaglibrary_2_0.xsds       1.21 10/15/02
   </xsd:documentation>
   </xsd:annotation>
   <xsd:annotation>
  @@ -318,7 +318,9 @@
   path    Where to find the .tag file implementing this
           action, relative to the root of the web application or
        the root of the JAR file for a tag library packaged in
  -     a JAR.
  +     a JAR.  This must begin with /WEB-INF/tags if the .tag
  +     file resides in the WAR, or /META-INF/tags if the .tag
  +     file resides in a JAR.
   
   </xsd:documentation>
   </xsd:annotation>
  @@ -816,7 +818,7 @@
   variables defined by using this tag.  It is a (translation
   time) error for a tag that has one or more variable
   subelements to have a TagExtraInfo class that returns a
  -non-null object.
  +non-null value from a call to getVariableInfo().
   
   The subelements of variableType are of the form:
   
  
  
  

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@;jakarta.apache.org>

Reply via email to