[ http://issues.apache.org/jira/browse/BEEHIVE-163?page=history ]
     
Daryl Olander resolved BEEHIVE-163:
-----------------------------------

     Assign To: Julie Zhuo  (was: Daryl Olander)
    Resolution: Fixed

There were actually two issues in this bug.  There are two types of anchors 
that allow for navigation within a page.  The first is an anchor that only sets 
the tagId.  This type of anchor acts as a location for other anchors.  The 
second is an anchor that sets the linkName attribute.  This is converted into 
an anchor with an href that is a fragment identifier.

In this bug, the location anchors didn't cause the JavaScript lookup code to be 
written out.  This bug resolves that.  For location anchors we write out the 
name attribute, but we will not output the name lookup table or the legacy 
lookup tables.  The reason for this is that the name is written out for legacy 
browser support.  The only JavaScript written out is the tagId to Id lookup.

The second issue fixed is the fact that linkName must also be qualified as if 
it was a tagId. [This is the same as the Label for attribute.]  In the case of 
navigation, you may want to either fully qualify the linkName or you may want 
to specify it fully.  To enable this, I did the following:  If the linkName 
starts with the '#' character, then we treat this as a fully qualified fragment 
indentifier and don't apply additional qualification.  If the linkName doesn't 
start with the '#' character, when the fragment identifier is constructed, then 
we will qualify the linkName.

There were two DRTs checked in to verify these issues:
coreweb/bug/j163 -- Verify this bug
coreweb/idmap/anchorLink -- Verify the linkName behavior

> Basic anchor does not output id lookup scripts when tagId is set
> ----------------------------------------------------------------
>
>          Key: BEEHIVE-163
>          URL: http://issues.apache.org/jira/browse/BEEHIVE-163
>      Project: Beehive
>         Type: Bug
>   Components: NetUI
>     Versions: V1
>     Reporter: Julie Zhuo
>     Assignee: Julie Zhuo

>
> The following is the JSP file used for this test
> ***************** anchor-basic.jsp *************
> <%@ page language="java" contentType="text/html;charset=UTF-8"%>
> <%@ taglib prefix="netui" 
> uri="http://beehive.apache.org/netui/tags-html-1.0"%>
> <%@ taglib prefix="netui-data" 
> uri="http://beehive.apache.org/netui/tags-databinding-1.0"%>
> <%@ taglib prefix="netui-template" 
> uri="http://beehive.apache.org/netui/tags-template-1.0"%>
> <netui:html>
>     <head>
>         <netui:base/>
>     </head>
>     <netui:body>
>             <netui:scriptContainer scopeId="one" >
>               Basic Anchor JS Output Test
>               <br/>
>               <netui:anchor action="back" >Back</netui:anchor><br/>
>               <netui:anchor tagId="a5">Basic Anchor</netui:anchor>
>               <br/>
>          <p id="javaOut"></p>
>         </netui:scriptContainer>
>     </netui:body>
>     <script language="JavaScript" type="text/JavaScript">
>     var p = document.getElementById("javaOut");
>     var val = "<b>Document Access</b><br>";
>     //var anchorTag = document.getElementById(lookupIdByTagId("a5",p));
>     //val = val + "Anchor Scope Id: <b>" + getScopeId(anchorTag) + 
> "</b><br/>";
>     //val = val + "Anchor Name: <b>" + getNetuiTagName("a5", anchorTag) + 
> "</b><br/>";
>     //val = val + "Anchor ID: <b>" + lookupIdByTagId("a5",anchorTag) + 
> "</b><br/>";
>     //val = val + "Anchor Name By Lookup: <b>" + 
> lookupNameByTagId("a5",anchorTag) + "</b><br/>";
>     p.innerHTML = val;
>     </script>
> </netui:html>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira

Reply via email to