Uploaded image for project: 'MyFaces Tomahawk'
  1. MyFaces Tomahawk
  2. TOMAHAWK-1337

swapImage renders onmouseover and onmouseout twice

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.1.8-SNAPSHOT
    • 1.1.8
    • None
    • None
    • tomcat 6.0.16
      java 1.6.0
      tomahawk 1.1.8-SNAPSHOT

    Description

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

      }

      Attachments

        1. shared-3.0.5-SNAPSHOT.patch
          2 kB
          Paul Rivera
        2. shared-2.0.9-SNAPSHOT.patch
          2 kB
          Paul Rivera
        3. HtmlSwapImageRenderer.patch
          0.6 kB
          Paul Rivera

        Activity

          People

            lu4242 Leonardo Uribe
            paulr1984 Paul Rivera
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: