[ http://issues.apache.org/jira/browse/BEEHIVE-173?page=history ]
Julie Zhuo reassigned BEEHIVE-173:
----------------------------------
Assign To: Krista Baker (was: Julie Zhuo)
> 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: Krista Baker
>
> 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