swapImage renders onmouseover and onmouseout twice
--------------------------------------------------
Key: TOMAHAWK-1337
URL: https://issues.apache.org/jira/browse/TOMAHAWK-1337
Project: MyFaces Tomahawk
Issue Type: Bug
Affects Versions: 1.1.8-SNAPSHOT
Environment: tomcat 6.0.16
java 1.6.0
tomahawk 1.1.8-SNAPSHOT
Reporter: Paul Rivera
Priority: Minor
Here's what my page rendered for my swapImage:
<img id="_idJsp0:foo" src="/MYFACES11-Playground/images/MyFaces_logo.jpg"
onmouseover="SI_MM_swapImage('_idJsp0:foo','','/MYFACES11-Playground/images/feather.gif',1);"
onmouseout="SI_MM_swapImgRestore();" border="Integer.MIN_VALUE"
onmouseover="alert('onmouseover2');" onmouseout="alert('onmouseout2');" />
As you can see, onmouseover and onmouseout are rendered twice. In this case,
alert('onmouseover2') and alert('onmouseout2') never get executed.
Both onmouseover and onmouseout attributes are not declared as attributes of
swapImage tag in tomahawk.tld. You can only replicate this bug if you bind
your swapImage object to a bean. Here's my bean:
public class SwapImageBean
{
private HtmlSwapImage swapImage;
public SwapImageBean() {
swapImage = new HtmlSwapImage();
swapImage.getAttributes().put(HTML.ONMOUSEOVER_ATTR,
"alert('onmouseover2');");
swapImage.getAttributes().put(HTML.ONMOUSEOUT_ATTR,
"alert('onmouseout2');");
}
public HtmlSwapImage getSwapImage()
{
return swapImage;
}
public void setSwapImage(HtmlSwapImage swapImage)
{
this.swapImage = swapImage;
}
}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.