You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by dm...@apache.org on 2003/02/19 04:49:50 UTC

cvs commit: jakarta-struts/contrib/struts-el/src/share/org/apache/strutsel/taglib/bean ELIncludeTag.java ELIncludeTagBeanInfo.java ELMessageTag.java ELPageTag.java ELResourceTag.java ELSizeTag.java ELSizeTagBeanInfo.java ELStrutsTag.java

dmkarr      2003/02/18 19:49:50

  Modified:    contrib/struts-el/src/share/org/apache/strutsel/taglib/bean
                        ELIncludeTag.java ELIncludeTagBeanInfo.java
                        ELMessageTag.java ELPageTag.java ELResourceTag.java
                        ELSizeTag.java ELSizeTagBeanInfo.java
                        ELStrutsTag.java
  Log:
  Changed all Struts-EL tag attributes to be fronted by a "shadow" attribute,
  with the same name, but using different getter/setter methods, pointed to by an
  associated BeanInfo class.  This is done to allow for the possibility for web
  containers to omit redundant calls to attribute setters for reused tag
  handlers, as described in bug 16749.
  
  PR: 16749
  
  Revision  Changes    Path
  1.2       +115 -28   jakarta-struts/contrib/struts-el/src/share/org/apache/strutsel/taglib/bean/ELIncludeTag.java
  
  Index: ELIncludeTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/contrib/struts-el/src/share/org/apache/strutsel/taglib/bean/ELIncludeTag.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ELIncludeTag.java	26 Oct 2002 04:33:17 -0000	1.1
  +++ ELIncludeTag.java	19 Feb 2003 03:49:50 -0000	1.2
  @@ -80,21 +80,112 @@
   public class ELIncludeTag extends IncludeTag {
   
       /**
  -     * String value of the "transaction" attribute.
  +     * Instance variable mapped to "anchor" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
        */
  -    private String   transactionExpr;
  +    private String anchorExpr;
  +    /**
  +     * Instance variable mapped to "forward" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    private String forwardExpr;
  +    /**
  +     * Instance variable mapped to "href" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    private String hrefExpr;
  +    /**
  +     * Instance variable mapped to "id" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    private String idExpr;
  +    /**
  +     * Instance variable mapped to "name" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    private String nameExpr;
  +    /**
  +     * Instance variable mapped to "page" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    private String pageExpr;
  +    /**
  +     * Instance variable mapped to "transaction" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    private String transactionExpr;
   
       /**
  -     * Returns the string value of the "transaction" attribute.
  +     * Getter method for "anchor" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    public String getAnchorExpr() { return (anchorExpr); }
  +    /**
  +     * Getter method for "forward" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    public String getForwardExpr() { return (forwardExpr); }
  +    /**
  +     * Getter method for "href" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    public String getHrefExpr() { return (hrefExpr); }
  +    /**
  +     * Getter method for "id" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
        */
  -    public  String   getTransactionExpr() { return (transactionExpr); }
  +    public String getIdExpr() { return (idExpr); }
  +    /**
  +     * Getter method for "name" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    public String getNameExpr() { return (nameExpr); }
  +    /**
  +     * Getter method for "page" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    public String getPageExpr() { return (pageExpr); }
  +    /**
  +     * Getter method for "transaction" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    public String getTransactionExpr() { return (transactionExpr); }
   
       /**
  -     * Sets the string value of the "transaction" attribute.  This attribute is
  -     * mapped to this method by the <code>ELIncludeTagBeanInfo</code> class.
  +     * Setter method for "anchor" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    public void setAnchorExpr(String anchorExpr) { this.anchorExpr = anchorExpr; }
  +    /**
  +     * Setter method for "forward" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    public void setForwardExpr(String forwardExpr) { this.forwardExpr = forwardExpr; }
  +    /**
  +     * Setter method for "href" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    public void setHrefExpr(String hrefExpr) { this.hrefExpr = hrefExpr; }
  +    /**
  +     * Setter method for "id" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    public void setIdExpr(String idExpr) { this.idExpr = idExpr; }
  +    /**
  +     * Setter method for "name" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    public void setNameExpr(String nameExpr) { this.nameExpr = nameExpr; }
  +    /**
  +     * Setter method for "page" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    public void setPageExpr(String pageExpr) { this.pageExpr = pageExpr; }
  +    /**
  +     * Setter method for "transaction" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
        */
  -    public  void     setTransactionExpr(String transactionExpr)
  -    { this.transactionExpr  = transactionExpr; }
  +    public void setTransactionExpr(String transactionExpr) { this.transactionExpr = transactionExpr; }
   
       /**
        * Resets attribute values for tag reuse.
  @@ -102,6 +193,12 @@
       public void release()
       {
           super.release();
  +        setAnchorExpr(null);
  +        setForwardExpr(null);
  +        setHrefExpr(null);
  +        setIdExpr(null);
  +        setNameExpr(null);
  +        setPageExpr(null);
           setTransactionExpr(null);
       }
   
  @@ -149,43 +246,34 @@
        */
       private void evaluateExpressions() throws JspException {
           try {
  -            setAnchor((String) evalAttr("anchor", getAnchor(), String.class));
  +            setAnchor((String) evalAttr("anchor", getAnchorExpr(), String.class));
           } catch (NullAttributeException ex) {
  -            setAnchor(null);
           }
   
           try {
  -            setForward((String) evalAttr("forward", getForward(),
  +            setForward((String) evalAttr("forward", getForwardExpr(),
                                            String.class));
           } catch (NullAttributeException ex) {
  -            setForward(null);
           }
   
           try {
  -            setHref((String) evalAttr("href", getHref(), String.class));
  +            setHref((String) evalAttr("href", getHrefExpr(), String.class));
           } catch (NullAttributeException ex) {
  -            setHref(null);
           }
   
           try {
  -            setId((String) evalAttr("id", getId(), String.class));
  +            setId((String) evalAttr("id", getIdExpr(), String.class));
           } catch (NullAttributeException ex) {
  -            setId(null);
           }
   
  -        //  The "name" attribute is deprecated.  The base class has a
  -        //  "setName()" method, which sets the "page" attribute, but it does
  -        //  not have a "getName()" attribute, so just use "getPage()".
           try {
  -            setName((String) evalAttr("name", getPage(), String.class));
  +            setName((String) evalAttr("name", getNameExpr(), String.class));
           } catch (NullAttributeException ex) {
  -            setName(null);
           }
   
           try {
  -            setPage((String) evalAttr("page", getPage(), String.class));
  +            setPage((String) evalAttr("page", getPageExpr(), String.class));
           } catch (NullAttributeException ex) {
  -            setPage(null);
           }
   
           try {
  @@ -194,7 +282,6 @@
                                                  Boolean.class)).
                              booleanValue());
           } catch (NullAttributeException ex) {
  -            setTransaction(false);
           }
       }
   }
  
  
  
  1.2       +9 -9      jakarta-struts/contrib/struts-el/src/share/org/apache/strutsel/taglib/bean/ELIncludeTagBeanInfo.java
  
  Index: ELIncludeTagBeanInfo.java
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/contrib/struts-el/src/share/org/apache/strutsel/taglib/bean/ELIncludeTagBeanInfo.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ELIncludeTagBeanInfo.java	26 Oct 2002 04:33:17 -0000	1.1
  +++ ELIncludeTagBeanInfo.java	19 Feb 2003 03:49:50 -0000	1.2
  @@ -89,17 +89,17 @@
   
           try {
               result[0] = new PropertyDescriptor("anchor", ELIncludeTag.class,
  -                                               null, "setAnchor");
  +                                               null, "setAnchorExpr");
               result[1] = new PropertyDescriptor("forward", ELIncludeTag.class,
  -                                               null, "setForward");
  +                                               null, "setForwardExpr");
               result[2] = new PropertyDescriptor("href", ELIncludeTag.class,
  -                                               null, "setHref");
  +                                               null, "setHrefExpr");
               result[3] = new PropertyDescriptor("id", ELIncludeTag.class,
  -                                               null, "setId");
  +                                               null, "setIdExpr");
               result[4] = new PropertyDescriptor("name", ELIncludeTag.class,
  -                                               null, "setName");
  +                                               null, "setNameExpr");
               result[5] = new PropertyDescriptor("page", ELIncludeTag.class,
  -                                                null, "setPage");
  +                                                null, "setPageExpr");
               result[6] = new PropertyDescriptor("transaction",
                                                  ELIncludeTag.class,
                                                  null, "setTransactionExpr");
  
  
  
  1.4       +202 -26   jakarta-struts/contrib/struts-el/src/share/org/apache/strutsel/taglib/bean/ELMessageTag.java
  
  Index: ELMessageTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/contrib/struts-el/src/share/org/apache/strutsel/taglib/bean/ELMessageTag.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ELMessageTag.java	1 Oct 2002 04:25:49 -0000	1.3
  +++ ELMessageTag.java	19 Feb 2003 03:49:50 -0000	1.4
  @@ -84,6 +84,193 @@
   public class ELMessageTag extends MessageTag {
   
       /**
  +     * Instance variable mapped to "arg0" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    private String arg0Expr;
  +    /**
  +     * Instance variable mapped to "arg1" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    private String arg1Expr;
  +    /**
  +     * Instance variable mapped to "arg2" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    private String arg2Expr;
  +    /**
  +     * Instance variable mapped to "arg3" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    private String arg3Expr;
  +    /**
  +     * Instance variable mapped to "arg4" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    private String arg4Expr;
  +    /**
  +     * Instance variable mapped to "bundle" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    private String bundleExpr;
  +    /**
  +     * Instance variable mapped to "key" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    private String keyExpr;
  +    /**
  +     * Instance variable mapped to "locale" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    private String localeExpr;
  +    /**
  +     * Instance variable mapped to "name" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    private String nameExpr;
  +    /**
  +     * Instance variable mapped to "property" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    private String propertyExpr;
  +    /**
  +     * Instance variable mapped to "scope" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    private String scopeExpr;
  +
  +    /**
  +     * Getter method for "arg0" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    public String getArg0Expr() { return (arg0Expr); }
  +    /**
  +     * Getter method for "arg1" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    public String getArg1Expr() { return (arg1Expr); }
  +    /**
  +     * Getter method for "arg2" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    public String getArg2Expr() { return (arg2Expr); }
  +    /**
  +     * Getter method for "arg3" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    public String getArg3Expr() { return (arg3Expr); }
  +    /**
  +     * Getter method for "arg4" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    public String getArg4Expr() { return (arg4Expr); }
  +    /**
  +     * Getter method for "bundle" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    public String getBundleExpr() { return (bundleExpr); }
  +    /**
  +     * Getter method for "key" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    public String getKeyExpr() { return (keyExpr); }
  +    /**
  +     * Getter method for "locale" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    public String getLocaleExpr() { return (localeExpr); }
  +    /**
  +     * Getter method for "name" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    public String getNameExpr() { return (nameExpr); }
  +    /**
  +     * Getter method for "property" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    public String getPropertyExpr() { return (propertyExpr); }
  +    /**
  +     * Getter method for "scope" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    public String getScopeExpr() { return (scopeExpr); }
  +
  +    /**
  +     * Setter method for "arg0" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    public void setArg0Expr(String arg0Expr) { this.arg0Expr = arg0Expr; }
  +    /**
  +     * Setter method for "arg1" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    public void setArg1Expr(String arg1Expr) { this.arg1Expr = arg1Expr; }
  +    /**
  +     * Setter method for "arg2" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    public void setArg2Expr(String arg2Expr) { this.arg2Expr = arg2Expr; }
  +    /**
  +     * Setter method for "arg3" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    public void setArg3Expr(String arg3Expr) { this.arg3Expr = arg3Expr; }
  +    /**
  +     * Setter method for "arg4" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    public void setArg4Expr(String arg4Expr) { this.arg4Expr = arg4Expr; }
  +    /**
  +     * Setter method for "bundle" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    public void setBundleExpr(String bundleExpr) { this.bundleExpr = bundleExpr; }
  +    /**
  +     * Setter method for "key" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    public void setKeyExpr(String keyExpr) { this.keyExpr = keyExpr; }
  +    /**
  +     * Setter method for "locale" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    public void setLocaleExpr(String localeExpr) { this.localeExpr = localeExpr; }
  +    /**
  +     * Setter method for "name" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    public void setNameExpr(String nameExpr) { this.nameExpr = nameExpr; }
  +    /**
  +     * Setter method for "property" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    public void setPropertyExpr(String propertyExpr) { this.propertyExpr = propertyExpr; }
  +    /**
  +     * Setter method for "scope" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    public void setScopeExpr(String scopeExpr) { this.scopeExpr = scopeExpr; }
  +
  +    /**
  +     * Resets attribute values for tag reuse.
  +     */
  +    public void release()
  +    {
  +        super.release();
  +        setArg0Expr(null);
  +        setArg1Expr(null);
  +        setArg2Expr(null);
  +        setArg3Expr(null);
  +        setArg4Expr(null);
  +        setBundleExpr(null);
  +        setKeyExpr(null);
  +        setLocaleExpr(null);
  +        setNameExpr(null);
  +        setPropertyExpr(null);
  +        setScopeExpr(null);
  +    }
  +    
  +    /**
        * Process the start tag.
        *
        * @exception JspException if a JSP exception has occurred
  @@ -125,70 +312,59 @@
       private void evaluateExpressions() throws JspException {
   
           try {
  -            setArg0((String) evalAttr("arg0", getArg0(), String.class));
  +            setArg0((String) evalAttr("arg0", getArg0Expr(), String.class));
           } catch (NullAttributeException ex) {
  -            setArg0(null);
           }
   
           try {
  -            setArg1((String) evalAttr("arg1", getArg1(), String.class));
  +            setArg1((String) evalAttr("arg1", getArg1Expr(), String.class));
           } catch (NullAttributeException ex) {
  -            setArg1(null);
           }
   
           try {
  -            setArg2((String) evalAttr("arg2", getArg2(), String.class));
  +            setArg2((String) evalAttr("arg2", getArg2Expr(), String.class));
           } catch (NullAttributeException ex) {
  -            setArg2(null);
           }
   
           try {
  -            setArg3((String) evalAttr("arg3", getArg3(), String.class));
  +            setArg3((String) evalAttr("arg3", getArg3Expr(), String.class));
           } catch (NullAttributeException ex) {
  -            setArg3(null);
           }
   
           try {
  -            setArg4((String) evalAttr("arg4", getArg4(), String.class));
  +            setArg4((String) evalAttr("arg4", getArg4Expr(), String.class));
           } catch (NullAttributeException ex) {
  -            setArg4(null);
           }
   
           try {
  -            setBundle((String) evalAttr("bundle", getBundle(), String.class));
  +            setBundle((String) evalAttr("bundle", getBundleExpr(), String.class));
           } catch (NullAttributeException ex) {
  -            setBundle(null);
           }
   
           try {
  -            setKey((String) evalAttr("key", getKey(), String.class));
  +            setKey((String) evalAttr("key", getKeyExpr(), String.class));
           } catch (NullAttributeException ex) {
  -            setKey(null);
           }
   
           try {
  -            setLocale((String) evalAttr("locale", getLocale(), String.class));
  +            setLocale((String) evalAttr("locale", getLocaleExpr(), String.class));
           } catch (NullAttributeException ex) {
  -            setLocale(null);
           }
   
           try {
  -            setName((String) evalAttr("name", getName(), String.class));
  +            setName((String) evalAttr("name", getNameExpr(), String.class));
           } catch (NullAttributeException ex) {
  -            setName(null);
           }
   
           try {
  -            setProperty((String) evalAttr("property", getProperty(),
  +            setProperty((String) evalAttr("property", getPropertyExpr(),
                                             String.class));
           } catch (NullAttributeException ex) {
  -            setProperty(null);
           }
   
           try {
  -            setScope((String) evalAttr("scope", getScope(), String.class));
  +            setScope((String) evalAttr("scope", getScopeExpr(), String.class));
           } catch (NullAttributeException ex) {
  -            setScope(null);
           }
       }
   }
  
  
  
  1.4       +49 -8     jakarta-struts/contrib/struts-el/src/share/org/apache/strutsel/taglib/bean/ELPageTag.java
  
  Index: ELPageTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/contrib/struts-el/src/share/org/apache/strutsel/taglib/bean/ELPageTag.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ELPageTag.java	1 Oct 2002 04:25:49 -0000	1.3
  +++ ELPageTag.java	19 Feb 2003 03:49:50 -0000	1.4
  @@ -81,6 +81,49 @@
   public class ELPageTag extends PageTag {
   
       /**
  +     * Instance variable mapped to "id" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    private String idExpr;
  +    /**
  +     * Instance variable mapped to "property" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    private String propertyExpr;
  +
  +    /**
  +     * Getter method for "id" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    public String getIdExpr() { return (idExpr); }
  +    /**
  +     * Getter method for "property" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    public String getPropertyExpr() { return (propertyExpr); }
  +
  +    /**
  +     * Setter method for "id" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    public void setIdExpr(String idExpr) { this.idExpr = idExpr; }
  +    /**
  +     * Setter method for "property" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    public void setPropertyExpr(String propertyExpr) { this.propertyExpr = propertyExpr; }
  +
  +    /**
  +     * Resets attribute values for tag reuse.
  +     */
  +    public void release()
  +    {
  +        super.release();
  +        setIdExpr(null);
  +        setPropertyExpr(null);
  +    }
  +    
  +    /**
        * Process the start tag.
        *
        * @exception JspException if a JSP exception has occurred
  @@ -120,16 +163,14 @@
       private void evaluateExpressions() throws JspException {
   
           try {
  -            setId((String) evalAttr("id", getId(), String.class));
  +            setId((String) evalAttr("id", getIdExpr(), String.class));
           } catch (NullAttributeException ex) {
  -            setId(null);
           }
   
           try {
  -            setProperty((String) evalAttr("property", getProperty(),
  +            setProperty((String) evalAttr("property", getPropertyExpr(),
                                             String.class));
           } catch (NullAttributeException ex) {
  -            setProperty(null);
           }
       }
   }
  
  
  
  1.4       +66 -10    jakarta-struts/contrib/struts-el/src/share/org/apache/strutsel/taglib/bean/ELResourceTag.java
  
  Index: ELResourceTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/contrib/struts-el/src/share/org/apache/strutsel/taglib/bean/ELResourceTag.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ELResourceTag.java	1 Oct 2002 04:25:49 -0000	1.3
  +++ ELResourceTag.java	19 Feb 2003 03:49:50 -0000	1.4
  @@ -81,6 +81,65 @@
   public class ELResourceTag extends ResourceTag {
   
       /**
  +     * Instance variable mapped to "id" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    private String idExpr;
  +    /**
  +     * Instance variable mapped to "input" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    private String inputExpr;
  +    /**
  +     * Instance variable mapped to "name" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    private String nameExpr;
  +
  +    /**
  +     * Getter method for "id" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    public String getIdExpr() { return (idExpr); }
  +    /**
  +     * Getter method for "input" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    public String getInputExpr() { return (inputExpr); }
  +    /**
  +     * Getter method for "name" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    public String getNameExpr() { return (nameExpr); }
  +
  +    /**
  +     * Setter method for "id" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    public void setIdExpr(String idExpr) { this.idExpr = idExpr; }
  +    /**
  +     * Setter method for "input" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    public void setInputExpr(String inputExpr) { this.inputExpr = inputExpr; }
  +    /**
  +     * Setter method for "name" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    public void setNameExpr(String nameExpr) { this.nameExpr = nameExpr; }
  +
  +    /**
  +     * Resets attribute values for tag reuse.
  +     */
  +    public void release()
  +    {
  +        super.release();
  +        setIdExpr(null);
  +        setInputExpr(null);
  +        setNameExpr(null);
  +    }
  +    
  +    /**
        * Process the start tag.
        *
        * @exception JspException if a JSP exception has occurred
  @@ -122,21 +181,18 @@
       private void evaluateExpressions() throws JspException {
   
           try {
  -            setId((String) evalAttr("id", getId(), String.class));
  +            setId((String) evalAttr("id", getIdExpr(), String.class));
           } catch (NullAttributeException ex) {
  -            setId(null);
           }
   
           try {
  -            setInput((String) evalAttr("input", getInput(), String.class));
  +            setInput((String) evalAttr("input", getInputExpr(), String.class));
           } catch (NullAttributeException ex) {
  -            setInput(null);
           }
   
           try {
  -            setName((String) evalAttr("name", getName(), String.class));
  +            setName((String) evalAttr("name", getNameExpr(), String.class));
           } catch (NullAttributeException ex) {
  -            setName(null);
           }
       }
   }
  
  
  
  1.4       +82 -27    jakarta-struts/contrib/struts-el/src/share/org/apache/strutsel/taglib/bean/ELSizeTag.java
  
  Index: ELSizeTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/contrib/struts-el/src/share/org/apache/strutsel/taglib/bean/ELSizeTag.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ELSizeTag.java	1 Oct 2002 04:25:49 -0000	1.3
  +++ ELSizeTag.java	19 Feb 2003 03:49:50 -0000	1.4
  @@ -81,26 +81,82 @@
   public class ELSizeTag extends SizeTag {
   
       /**
  -     * String value of expression to be evaluated to result in a Collection.
  +     * Instance variable mapped to "collection" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
        */
  -    private String   collectionExpr;
  +    private String collectionExpr;
  +    /**
  +     * Instance variable mapped to "id" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    private String idExpr;
  +    /**
  +     * Instance variable mapped to "name" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    private String nameExpr;
  +    /**
  +     * Instance variable mapped to "property" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    private String propertyExpr;
  +    /**
  +     * Instance variable mapped to "scope" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    private String scopeExpr;
   
       /**
  -     * Returns the string value of the Collection expression.  This value will
  -     * be evaluated by the JSTL EL engine.
  -     *<p>
  -     * Note that this value is associated with the <code>collection</code>
  -     * attribute of the custom tag.  The class <code>ELSizeTagBeanInfo</code>
  -     * maps the <code>collection</code> attribute of the custom tag to the
  -     * <code>collectionExpr</code> attribute of this class.
  +     * Getter method for "collection" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    public String getCollectionExpr() { return (collectionExpr); }
  +    /**
  +     * Getter method for "id" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    public String getIdExpr() { return (idExpr); }
  +    /**
  +     * Getter method for "name" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    public String getNameExpr() { return (nameExpr); }
  +    /**
  +     * Getter method for "property" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    public String getPropertyExpr() { return (propertyExpr); }
  +    /**
  +     * Getter method for "scope" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    public String getScopeExpr() { return (scopeExpr); }
  +
  +    /**
  +     * Setter method for "collection" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    public void setCollectionExpr(String collectionExpr) { this.collectionExpr = collectionExpr; }
  +    /**
  +     * Setter method for "id" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    public void setIdExpr(String idExpr) { this.idExpr = idExpr; }
  +    /**
  +     * Setter method for "name" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    public void setNameExpr(String nameExpr) { this.nameExpr = nameExpr; }
  +    /**
  +     * Setter method for "property" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
        */
  -    public  String   getCollectionExpr() { return (collectionExpr); }
  +    public void setPropertyExpr(String propertyExpr) { this.propertyExpr = propertyExpr; }
       /**
  -     * Sets the string value of the Collection expression.  This expression
  -     * will be evaluated by the JSTL EL engine.
  +     * Setter method for "scope" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
        */
  -    public  void     setCollectionExpr(String collectionExpr)
  -    { this.collectionExpr   = collectionExpr; }
  +    public void setScopeExpr(String scopeExpr) { this.scopeExpr = scopeExpr; }
   
       /**
        * Releases state of custom tag so this instance can be reused.
  @@ -109,6 +165,10 @@
       {
           super.release();
           setCollectionExpr(null);
  +        setIdExpr(null);
  +        setNameExpr(null);
  +        setPropertyExpr(null);
  +        setScopeExpr(null);
       }
       
       /**
  @@ -156,32 +216,27 @@
               setCollection(evalAttr("collection", getCollectionExpr(),
                                      Object.class));
           } catch (NullAttributeException ex) {
  -            setCollection(null);
           }
   
           try {
  -            setId((String) evalAttr("id", getId(), String.class));
  +            setId((String) evalAttr("id", getIdExpr(), String.class));
           } catch (NullAttributeException ex) {
  -            setId(null);
           }
   
           try {
  -            setName((String) evalAttr("name", getName(), String.class));
  +            setName((String) evalAttr("name", getNameExpr(), String.class));
           } catch (NullAttributeException ex) {
  -            setName(null);
           }
   
           try {
  -            setProperty((String) evalAttr("property", getProperty(),
  +            setProperty((String) evalAttr("property", getPropertyExpr(),
                                             String.class));
           } catch (NullAttributeException ex) {
  -            setProperty(null);
           }
   
           try {
  -            setScope((String) evalAttr("scope", getScope(), String.class));
  +            setScope((String) evalAttr("scope", getScopeExpr(), String.class));
           } catch (NullAttributeException ex) {
  -            setScope(null);
           }
       }
   }
  
  
  
  1.4       +13 -20    jakarta-struts/contrib/struts-el/src/share/org/apache/strutsel/taglib/bean/ELSizeTagBeanInfo.java
  
  Index: ELSizeTagBeanInfo.java
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/contrib/struts-el/src/share/org/apache/strutsel/taglib/bean/ELSizeTagBeanInfo.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ELSizeTagBeanInfo.java	1 Oct 2002 04:25:49 -0000	1.3
  +++ ELSizeTagBeanInfo.java	19 Feb 2003 03:49:50 -0000	1.4
  @@ -89,23 +89,16 @@
           PropertyDescriptor[]  result   = new PropertyDescriptor[5];
   
           try {
  -            Method collectionGetter  =
  -                ELSizeTag.class.getMethod("getCollectionExpr", new Class[0]);
  -            Method collectionSetter  =
  -                ELSizeTag.class.getMethod("setCollectionExpr",
  -                                          new Class[]{String.class});
  -
  -            result[0] =
  -                new PropertyDescriptor("collection",
  -                                       collectionGetter, collectionSetter);
  -
  -            result[1] = new PropertyDescriptor("id", ELSizeTag.class);
  -            result[2] = new PropertyDescriptor("name", ELSizeTag.class);
  -            result[3] = new PropertyDescriptor("property", ELSizeTag.class);
  -            result[4] = new PropertyDescriptor("scope", ELSizeTag.class);
  -        }
  -        catch (NoSuchMethodException ex) {
  -            ex.printStackTrace();
  +            result[0] = new PropertyDescriptor("collection", ELSizeTag.class,
  +                                               null, "setCollectionExpr");
  +            result[1] = new PropertyDescriptor("id", ELSizeTag.class,
  +                                               null, "setIdExpr");
  +            result[2] = new PropertyDescriptor("name", ELSizeTag.class,
  +                                               null, "setNameExpr");
  +            result[3] = new PropertyDescriptor("property", ELSizeTag.class,
  +                                               null, "setPropertyExpr");
  +            result[4] = new PropertyDescriptor("scope", ELSizeTag.class,
  +                                               null, "setScopeExpr");
           }
           catch (IntrospectionException ex) {
               ex.printStackTrace();
  
  
  
  1.4       +83 -12    jakarta-struts/contrib/struts-el/src/share/org/apache/strutsel/taglib/bean/ELStrutsTag.java
  
  Index: ELStrutsTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/contrib/struts-el/src/share/org/apache/strutsel/taglib/bean/ELStrutsTag.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ELStrutsTag.java	1 Oct 2002 04:25:49 -0000	1.3
  +++ ELStrutsTag.java	19 Feb 2003 03:49:50 -0000	1.4
  @@ -81,6 +81,81 @@
   public class ELStrutsTag extends StrutsTag {
   
       /**
  +     * Instance variable mapped to "id" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    private String idExpr;
  +    /**
  +     * Instance variable mapped to "formBean" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    private String formBeanExpr;
  +    /**
  +     * Instance variable mapped to "forward" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    private String forwardExpr;
  +    /**
  +     * Instance variable mapped to "mapping" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    private String mappingExpr;
  +
  +    /**
  +     * Getter method for "id" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    public String getIdExpr() { return (idExpr); }
  +    /**
  +     * Getter method for "formBean" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    public String getFormBeanExpr() { return (formBeanExpr); }
  +    /**
  +     * Getter method for "forward" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    public String getForwardExpr() { return (forwardExpr); }
  +    /**
  +     * Getter method for "mapping" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    public String getMappingExpr() { return (mappingExpr); }
  +
  +    /**
  +     * Setter method for "id" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    public void setIdExpr(String idExpr) { this.idExpr = idExpr; }
  +    /**
  +     * Setter method for "formBean" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    public void setFormBeanExpr(String formBeanExpr) { this.formBeanExpr = formBeanExpr; }
  +    /**
  +     * Setter method for "forward" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    public void setForwardExpr(String forwardExpr) { this.forwardExpr = forwardExpr; }
  +    /**
  +     * Setter method for "mapping" tag attribute.
  +     * (Mapping set in associated BeanInfo class.)
  +     */
  +    public void setMappingExpr(String mappingExpr) { this.mappingExpr = mappingExpr; }
  +
  +    /**
  +     * Resets attribute values for tag reuse.
  +     */
  +    public void release()
  +    {
  +        super.release();
  +        setIdExpr(null);
  +        setFormBeanExpr(null);
  +        setForwardExpr(null);
  +        setMappingExpr(null);
  +    }
  +    
  +    /**
        * Process the start tag.
        *
        * @exception JspException if a JSP exception has occurred
  @@ -122,30 +197,26 @@
       private void evaluateExpressions() throws JspException {
   
           try {
  -            setId((String) evalAttr("id", getId(), String.class));
  +            setId((String) evalAttr("id", getIdExpr(), String.class));
           } catch (NullAttributeException ex) {
  -            setId(null);
           }
   
           try {
  -            setFormBean((String) evalAttr("formBean", getFormBean(),
  +            setFormBean((String) evalAttr("formBean", getFormBeanExpr(),
                                             String.class));
           } catch (NullAttributeException ex) {
  -            setFormBean(null);
           }
   
           try {
  -            setForward((String) evalAttr("forward", getForward(),
  +            setForward((String) evalAttr("forward", getForwardExpr(),
                                            String.class));
           } catch (NullAttributeException ex) {
  -            setForward(null);
           }
   
           try {
  -            setMapping((String) evalAttr("mapping", getMapping(),
  +            setMapping((String) evalAttr("mapping", getMappingExpr(),
                                            String.class));
           } catch (NullAttributeException ex) {
  -            setMapping(null);
           }
       }
   }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org