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

     Assign To: Alejandro Ramirez  (was: Daryl Olander)
    Resolution: Fixed

I've removed the special case logic.  No all of the HTML tags should be using 
the double quote for output of JavaScript.  I also removed the special case 
handling of onclick in the AnchorTag.Renderer.  There was a todo to remove this 
and it is now gone.  

The affected generated javascript includes:
FormSubmit from an Anchor
Popup Support with an Anchor
Client action on the anchor (coreWeb/Templates/DivTreePanel)

I tested all of these and they seem to work.  I update the test results based 
upon the change to using double quote.

Revision: 154717

> netui:anchor Event Attribute syntax can cause java script error
> ---------------------------------------------------------------
>
>          Key: BEEHIVE-299
>          URL: http://issues.apache.org/jira/browse/BEEHIVE-299
>      Project: Beehive
>         Type: Bug
>   Components: NetUI
>     Versions: V1
>     Reporter: Krista Baker
>     Assignee: Alejandro Ramirez
>     Priority: Minor

>
> Repro:
> Using the following jsp note the tag error on the first <netui:anchor> in the 
> Browser window.
> <%@ 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> 
>         Causes Script error <br />        
>         <netui:anchor onMouseDown="alert('OnMOUSEDOWN')" 
> href="index.jsp">Script Error For onmousedown when formatted this 
> way.</netui:anchor>
>     <br />
>         The following generate valid javascript:
>     <br />
>         <netui:anchor onMouseDown='alert("onmousedown")' href="index.jsp>No 
> script error when double quotes switched with single quotes</netui:anchor>
>         <a href="index.jsp" onmousedown="alert('onmousedown')">No script 
> error when html anchor tag is used with the same formatting as netui:anchor 
> which returns a script error</a>
>         <a href="index.jsp" onmousedown='alert("onmousedown")'>No script 
> error</a>
>     </netui:body>
> </netui:html>
> Config:
> Mozilla 1.4 and Firefox 1.0 only display the script error when the anchor is 
> clicked and the javascript executed.  Internet Explorer recognizes the error 
> when the page is opened.
> Workaround - Use one of the other three possible tag configs to perform event 
> attributes on the anchor tag.

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