kinman      2003/03/04 14:23:48

  Modified:    jasper2/src/share/org/apache/jasper/compiler/tagplugin
                        TagPluginContext.java
               jasper2/src/share/org/apache/jasper/tagplugins/jstl
                        When.java
  Log:
  - In PluginContext, use setPluginAttribute instead of setAttribute to
    avoid confusion and to make its function exmplicit.  Same for getAttribute.
  
  Revision  Changes    Path
  1.11      +9 -7      
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/tagplugin/TagPluginContext.java
  
  Index: TagPluginContext.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/tagplugin/TagPluginContext.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- TagPluginContext.java     15 Feb 2003 01:41:45 -0000      1.10
  +++ TagPluginContext.java     4 Mar 2003 22:23:48 -0000       1.11
  @@ -146,8 +146,8 @@
       /**
        * Get the PluginContext for the parent of this custom tag.  NOTE:
        * The operations available for PluginContext so obtained is limited
  -     * to getAttribute and setAttribute, and queries (e.g. isScriptless(),
  -     * There should be no generate*().
  +     * to getPluginAttribute and setPluginAttribute, and queries (e.g.
  +     * isScriptless().  There should be no calls to generate*().
        * @return The pluginContext for the parent node.
        *         null if the parent is not a custom tag, or if the pluginConxt
        *         if not available (because useTagPlugin is false, e.g).
  @@ -156,12 +156,14 @@
   
       /**
        * Associate the attribute with a value in the current tagplugin context.
  +     * The plugin attributes can be used for communication among tags that
  +     * must work together as a group.  See <c:when> for an example.
        */
  -    void setAttribute(String attr, Object value);
  +    void setPluginAttribute(String attr, Object value);
   
       /**
        * Get the value of an attribute in the current tagplugin context.
        */
  -    Object getAttribute(String attr);
  +    Object getPluginAttribute(String attr);
   }
   
  
  
  
  1.2       +5 -5      
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/tagplugins/jstl/When.java
  
  Index: When.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/tagplugins/jstl/When.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- When.java 15 Feb 2003 01:41:46 -0000      1.1
  +++ When.java 4 Mar 2003 22:23:48 -0000       1.2
  @@ -73,13 +73,13 @@
            return;
        }
   
  -     if ("true".equals(parentContext.getAttribute("hasBeenHere"))) {
  +     if ("true".equals(parentContext.getPluginAttribute("hasBeenHere"))) {
            ctxt.generateJavaSource("} else if(");
            // See comment below for the reason we generate the extra "}" here.
        }
        else {
            ctxt.generateJavaSource("if(");
  -         parentContext.setAttribute("hasBeenHere", "true");
  +         parentContext.setPluginAttribute("hasBeenHere", "true");
        }
        ctxt.generateAttribute("test");
        ctxt.generateJavaSource("){");
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to