portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject cvs commit: jakarta-jetspeed-2/cps/src/java/org/apache/jetspeed/cps/rewriter RulesetRewriterImpl.java
Date Fri, 03 Oct 2003 17:05:29 GMT
taylor      2003/10/03 10:05:29

  Modified:    cps/src/java/org/apache/jetspeed/cps/rewriter
                        RulesetRewriterImpl.java
  Log:
  Changed RulesetRewriter to return null to indicate "don't rewrite"
  
  Revision  Changes    Path
  1.2       +14 -10    jakarta-jetspeed-2/cps/src/java/org/apache/jetspeed/cps/rewriter/RulesetRewriterImpl.java
  
  Index: RulesetRewriterImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/cps/src/java/org/apache/jetspeed/cps/rewriter/RulesetRewriterImpl.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- RulesetRewriterImpl.java	2 Oct 2003 05:30:28 -0000	1.1
  +++ RulesetRewriterImpl.java	3 Oct 2003 17:05:29 -0000	1.2
  @@ -176,17 +176,21 @@
                   {
                       continue;
                   }                                        
  -                String rewritten = this.rewriteUrl(value, tag.getId(), name);
  -                if (rule.getSuffix() != null)
  -                {
  -                    rewritten = rewritten.concat(rule.getSuffix());
  -                }
                   
  -                attributes.addAttribute(name, rewritten);
  -                                    
  -                if (rule.getPopup())
  +                String rewritten = this.rewriteUrl(value, tag.getId(), name);
  +                if (null != rewritten) // return null indicates "don't rewrite" 
                   {
  -                    attributes.addAttribute("TARGET", "_BLANK");                      
 
  +                    if (rule.getSuffix() != null)
  +                    {
  +                        rewritten = rewritten.concat(rule.getSuffix());
  +                    }
  +                    
  +                    attributes.addAttribute(name, rewritten);
  +                                        
  +                    if (rule.getPopup())
  +                    {
  +                        attributes.addAttribute("TARGET", "_BLANK");                  
     
  +                    }
                   }
               }            
           }
  
  
  

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


Mime
View raw message