struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From craig...@locus.apache.org
Subject cvs commit: jakarta-struts/src/share/org/apache/struts/taglib/logic CompareTagBase.java ConditionalTagBase.java IterateTag.java MatchTag.java PresentTag.java
Date Fri, 03 Nov 2000 18:40:10 GMT
craigmcc    00/11/03 10:40:10

  Modified:    src/share/org/apache/struts/taglib/logic CompareTagBase.java
                        ConditionalTagBase.java IterateTag.java
                        MatchTag.java PresentTag.java
  Log:
  Add a "scope" attribute on all struts-logic beans that accept a "name"
  attribute to reference a JSP bean.
  
  Revision  Changes    Path
  1.4       +5 -5      jakarta-struts/src/share/org/apache/struts/taglib/logic/CompareTagBase.java
  
  Index: CompareTagBase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/logic/CompareTagBase.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- CompareTagBase.java	2000/10/30 03:20:27	1.3
  +++ CompareTagBase.java	2000/11/03 18:40:06	1.4
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/logic/CompareTagBase.java,v
1.3 2000/10/30 03:20:27 craigmcc Exp $
  - * $Revision: 1.3 $
  - * $Date: 2000/10/30 03:20:27 $
  + * $Header: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/logic/CompareTagBase.java,v
1.4 2000/11/03 18:40:06 craigmcc Exp $
  + * $Revision: 1.4 $
  + * $Date: 2000/11/03 18:40:06 $
    *
    * ====================================================================
    *
  @@ -78,7 +78,7 @@
    * define values for desired1 and desired2.
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.3 $ $Date: 2000/10/30 03:20:27 $
  + * @version $Revision: 1.4 $ $Date: 2000/11/03 18:40:06 $
    */
   
   public abstract class CompareTagBase extends ConditionalTagBase {
  @@ -208,7 +208,7 @@
                   ((HttpServletRequest) pageContext.getRequest()).
                   getHeader(header);
           } else if (name != null) {
  -            Object bean = BeanUtils.lookup(pageContext, name, null);
  +            Object bean = BeanUtils.lookup(pageContext, name, scope);
               if (property != null) {
                   if (bean == null) {
                       JspException e =new JspException
  
  
  
  1.3       +20 -4     jakarta-struts/src/share/org/apache/struts/taglib/logic/ConditionalTagBase.java
  
  Index: ConditionalTagBase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/logic/ConditionalTagBase.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ConditionalTagBase.java	2000/10/30 03:20:27	1.2
  +++ ConditionalTagBase.java	2000/11/03 18:40:06	1.3
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/logic/ConditionalTagBase.java,v
1.2 2000/10/30 03:20:27 craigmcc Exp $
  - * $Revision: 1.2 $
  - * $Date: 2000/10/30 03:20:27 $
  + * $Header: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/logic/ConditionalTagBase.java,v
1.3 2000/11/03 18:40:06 craigmcc Exp $
  + * $Revision: 1.3 $
  + * $Date: 2000/11/03 18:40:06 $
    *
    * ====================================================================
    *
  @@ -72,7 +72,7 @@
    * Abstract base class for the various conditional evaluation tags.
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.2 $ $Date: 2000/10/30 03:20:27 $
  + * @version $Revision: 1.3 $ $Date: 2000/11/03 18:40:06 $
    */
   
   public abstract class ConditionalTagBase extends TagSupport {
  @@ -161,6 +161,21 @@
       }
   
   
  +    /**
  +     * The scope to search for the bean named by the name property, or
  +     * "any scope" if null.
  +     */
  +    protected String scope = null;
  +
  +    public String getScope() {
  +        return (this.scope);
  +    }
  +
  +    public void setScope(String scope) {
  +        this.scope = scope;
  +    }
  +
  +
       // --------------------------------------------------------- Public Methods
   
   
  @@ -203,6 +218,7 @@
           name = null;
           parameter = null;
           property = null;
  +        scope = null;
   
       }
   
  
  
  
  1.5       +19 -4     jakarta-struts/src/share/org/apache/struts/taglib/logic/IterateTag.java
  
  Index: IterateTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/logic/IterateTag.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- IterateTag.java	2000/10/30 06:02:22	1.4
  +++ IterateTag.java	2000/11/03 18:40:07	1.5
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/logic/IterateTag.java,v
1.4 2000/10/30 06:02:22 craigmcc Exp $
  - * $Revision: 1.4 $
  - * $Date: 2000/10/30 06:02:22 $
  + * $Header: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/logic/IterateTag.java,v
1.5 2000/11/03 18:40:07 craigmcc Exp $
  + * $Revision: 1.5 $
  + * $Date: 2000/11/03 18:40:07 $
    *
    * ====================================================================
    *
  @@ -88,7 +88,7 @@
    * <b>NOTE</b> - This tag requires a Java2 (JDK 1.2 or later) platform.
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.4 $ $Date: 2000/10/30 06:02:22 $
  + * @version $Revision: 1.5 $ $Date: 2000/11/03 18:40:07 $
    */
   
   public class IterateTag extends BodyTagSupport {
  @@ -219,6 +219,20 @@
   
   
       /**
  +     * The scope of the bean specified by the name property, if any.
  +     */
  +    protected String scope = null;
  +
  +    public String getScope() {
  +        return (this.scope);
  +    }
  +
  +    public void setScope(String scope) {
  +        this.scope = scope;
  +    }
  +
  +
  +    /**
        * The Java class of each exposed element of the collection.
        */
       protected String type = null;
  @@ -430,6 +444,7 @@
           name = null;
           offset = null;
           property = null;
  +        scope = null;
   
       }
   
  
  
  
  1.5       +5 -5      jakarta-struts/src/share/org/apache/struts/taglib/logic/MatchTag.java
  
  Index: MatchTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/logic/MatchTag.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- MatchTag.java	2000/10/30 06:02:22	1.4
  +++ MatchTag.java	2000/11/03 18:40:07	1.5
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/logic/MatchTag.java,v
1.4 2000/10/30 06:02:22 craigmcc Exp $
  - * $Revision: 1.4 $
  - * $Date: 2000/10/30 06:02:22 $
  + * $Header: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/logic/MatchTag.java,v
1.5 2000/11/03 18:40:07 craigmcc Exp $
  + * $Revision: 1.5 $
  + * $Date: 2000/11/03 18:40:07 $
    *
    * ====================================================================
    *
  @@ -78,7 +78,7 @@
    * is a substring of the specified variable.
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.4 $ $Date: 2000/10/30 06:02:22 $
  + * @version $Revision: 1.5 $ $Date: 2000/11/03 18:40:07 $
    */
   
   public class MatchTag extends ConditionalTagBase {
  @@ -181,7 +181,7 @@
                   ((HttpServletRequest) pageContext.getRequest()).
                   getHeader(header);
           } else if (name != null) {
  -            Object bean = BeanUtils.lookup(pageContext, name, null);
  +            Object bean = BeanUtils.lookup(pageContext, name, scope);
               if (bean == null) {
                   JspException e = new JspException
                       (messages.getMessage("logic.bean", name));
  
  
  
  1.4       +5 -5      jakarta-struts/src/share/org/apache/struts/taglib/logic/PresentTag.java
  
  Index: PresentTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/logic/PresentTag.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- PresentTag.java	2000/10/30 03:20:28	1.3
  +++ PresentTag.java	2000/11/03 18:40:08	1.4
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/logic/PresentTag.java,v
1.3 2000/10/30 03:20:28 craigmcc Exp $
  - * $Revision: 1.3 $
  - * $Date: 2000/10/30 03:20:28 $
  + * $Header: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/logic/PresentTag.java,v
1.4 2000/11/03 18:40:08 craigmcc Exp $
  + * $Revision: 1.4 $
  + * $Date: 2000/11/03 18:40:08 $
    *
    * ====================================================================
    *
  @@ -78,7 +78,7 @@
    * is present for this request.
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.3 $ $Date: 2000/10/30 03:20:28 $
  + * @version $Revision: 1.4 $ $Date: 2000/11/03 18:40:08 $
    */
   
   public class PresentTag extends ConditionalTagBase {
  @@ -134,7 +134,7 @@
                   getHeader(header);
               present = (value != null);
           } else if (name != null) {
  -            Object bean = BeanUtils.lookup(pageContext, name, null);
  +            Object bean = BeanUtils.lookup(pageContext, name, scope);
               if (property != null) {
                   if (bean == null) {
                       JspException e = new JspException
  
  
  

Mime
View raw message