You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@beehive.apache.org by "Julie Zhuo (JIRA)" <be...@incubator.apache.org> on 2005/01/15 00:51:17 UTC

[jira] Commented: (BEEHIVE-173) netui body tag does not generate id with scopeId attached

     [ http://issues.apache.org/jira/browse/BEEHIVE-173?page=comments#action_57650 ]
     
Julie Zhuo commented on BEEHIVE-173:
------------------------------------

the named anchor has the same issue, here is the generated html for a named anchor. Notice id=a3, supposed to be id=one.a3.

    <body>
        Named Anchor JS Output Test -- JIRA162<br/>
        <div netui:scopeId="one" >
              <a id="a3" href="#javaOut">Named Anchor</a><br/>
              <a href="/JavaScriptWeb/outputTest/back.do">Back</a>
               <br/>
        <p id="javaOut"></p>
        </div>

    </body>

> netui body tag does not generate id with scopeId attached
> ---------------------------------------------------------
>
>          Key: BEEHIVE-173
>          URL: http://issues.apache.org/jira/browse/BEEHIVE-173
>      Project: Beehive
>         Type: Bug
>   Components: NetUI
>     Versions: V1
>     Reporter: Julie Zhuo
>     Assignee: Daryl Olander

>
> The lookupIdByTagId("tagId", tag) returns the correct id with scopeId in it. Therefore when use document.getElementById(lookupIdByTagId("tagId", tag) it returns null. Here is the JSP used and part of its generated html output.
> **************************** body.jsp ************************************
> <netui:html scopeId="one">
>     <head>
>         <netui:base/>
>     </head>
>     <netui:body tagId="body">
>         <netui:scriptContainer scopeId="two" >
>         <netui:form action="back">
>                 Body JS Output Test<br/>
>                 <netui:textBox dataSource="actionForm.text1" /><br/>
>                 <netui:button value="Submit"/><br/>
>        </netui:form>
>            </netui:scriptContainer>
>     </netui:body>
>     <p id="javaOut"></p>
>     <script language="JavaScript" type="text/JavaScript">
>     var p = document.getElementById("javaOut");
>     var val = "<b>Document Access</b><br/>";
>     var bodyTag = document.getElementById(lookupIdByTagId("body", p));
>     val = val + "Body Id is null: <b>" + lookupIdByTagId("body", p) + "</b><br/>";
>     val = val + "Body By Id is null: <b>" + (bodyTag == null) + "</b><br/>";
>     val = val + "Body Scope Id (Legacy Get): <b>" + getScopeId(bodyTag) + "</b><br/>";
>     val = val + "Body Scope Id (non-Legacy Lookup): <b>" + lookupScopeId(bodyTag) + "</b><br/>";
>     val = val + "Body Name: <b>" + getNetuiTagName("body", p) + "</b><br/>";
>     val = val + "Body ID: <b>" + lookupIdByTagId("body", bodyTag) + "</b><br/>";
>     val = val + "<b>Lookup by lookup*(\"tagId\") signature: </b><br/>";
>     val = val + "Body ID: <b>" + lookupIdByTagId("body") + "</b><br/>";
>     p.innerHTML = val;
>     </script>
> </netui:html>
> *************************** html output ***********************************
> <!DOCTYPE HTML PUBLIC "//W3C//DTD HTML 4.01 Transitional//EN"
> >
> <html lang="en" netui:scopeId="one">
>     <head>
>         <base href="http://localhost:7001/JavaScriptWeb/outputTest/body.jsp">
>     </head>
>     <body id="body">
>         <div netui:scopeId="two" >
>         <form name="bean" action="/JavaScriptWeb/outputTest/back.do" method="post">
>                 Body JS Output Test<br/>
>                 <input type="text" name="{actionForm.text1}"><br/>
>                 <input type="submit" value="Submit"><br/>
>        </form>
>            </div>
>     
> <script language="JavaScript" type="text/JavaScript">
> <!--

-- 
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