cmlenz      2002/08/04 10:59:40

  Modified:    src/taglib/jstl/org/apache/slide/taglib/tag/jstl
                        ContentTag.java
  Log:
  - Add a 'revision' attribute for specifying the RevisionBean scoped variable
     to use
  
  Revision  Changes    Path
  1.5       +34 -5     
jakarta-slide/src/taglib/jstl/org/apache/slide/taglib/tag/jstl/ContentTag.java
  
  Index: ContentTag.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/src/taglib/jstl/org/apache/slide/taglib/tag/jstl/ContentTag.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ContentTag.java   1 Aug 2002 15:43:52 -0000       1.4
  +++ ContentTag.java   4 Aug 2002 17:59:40 -0000       1.5
  @@ -80,6 +80,15 @@
       extends ContentTagSupport {
       
       
  +    // ----------------------------------------------------- Instance Variables
  +    
  +    
  +    /**
  +     * Value of the 'revision' attribute.
  +     */
  +    private String revisionAttr;
  +    
  +    
       // ------------------------------------------------------------ Tag Methods
       
       
  @@ -92,13 +101,33 @@
           throws JspException {
           super.doStartTag();
           
  -        revision = JstlTagUtils.findRevision(this, pageContext);
  +        if (revisionAttr != null) {
  +            // evaluate the 'revision' attribute
  +            revision = (RevisionBean)
  +                JstlTagUtils.evaluateOptionalAttribute("content", "revision",
  +                                                       revisionAttr,
  +                                                       RevisionBean.class,
  +                                                       this, pageContext);
  +        } else {
  +            revision = JstlTagUtils.findRevision(this, pageContext);
  +        }
           
           return super.doStartTag();
       }
       
       
       // ------------------------------------------------------------- Properties
  +    
  +    
  +    /**
  +     * Set the 'revision' attribute.
  +     *
  +     * @param revisionAttr the attribute value
  +     */
  +    public void setRevision(String revisionAttr) {
  +        
  +        this.revisionAttr = revisionAttr;
  +    }
       
       
       /**
  
  
  

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

Reply via email to