You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by cr...@apache.org on 2001/05/03 03:13:55 UTC

cvs commit: jakarta-struts/src/share/org/apache/struts/taglib/html LinkTag.java

craigmcc    01/05/02 18:13:55

  Modified:    src/share/org/apache/struts/taglib/html LinkTag.java
  Log:
  Correct the previous patch for generating <a name="..."/> elements.  The
  tests should really be for the "linkName" attribute, not the "name"
  attribute.
  
  PR: Bugzilla #1581
  Submitted by:	curt@hagenlocher.org
  
  Revision  Changes    Path
  1.11      +7 -7      jakarta-struts/src/share/org/apache/struts/taglib/html/LinkTag.java
  
  Index: LinkTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/LinkTag.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- LinkTag.java	2001/04/29 00:38:04	1.10
  +++ LinkTag.java	2001/05/03 01:13:54	1.11
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/LinkTag.java,v 1.10 2001/04/29 00:38:04 craigmcc Exp $
  - * $Revision: 1.10 $
  - * $Date: 2001/04/29 00:38:04 $
  + * $Header: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/LinkTag.java,v 1.11 2001/05/03 01:13:54 craigmcc Exp $
  + * $Revision: 1.11 $
  + * $Date: 2001/05/03 01:13:54 $
    *
    * ====================================================================
    *
  @@ -86,7 +86,7 @@
    * Generate a URL-encoded hyperlink to the specified URI.
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.10 $ $Date: 2001/04/29 00:38:04 $
  + * @version $Revision: 1.11 $ $Date: 2001/05/03 01:13:54 $
    */
   
   public class LinkTag extends BaseHandlerTag {
  @@ -438,7 +438,7 @@
               n++;
           if (href != null)
               n++;
  -        if (name != null)
  +        if (linkName != null)
               n++;
           if (page != null)
               n++;
  @@ -480,8 +480,8 @@
               href = RequestUtils.absoluteURL(request, forward.getPath());
   	}
   
  -        // If "name" was specified, return null
  -        else if (name != null) {
  +        // If "linkName" was specified, return null (not making an href)
  +        else if (linkName != null) {
               return (null);
           }