[richfaces-issues] [JBoss JIRA] Created: (RF-7016) <rich:jQuery> usage example with <h:graphicImage>, uses conflicting mouseOver handlers.

Scott Langley (JIRA) jira-events at lists.jboss.org
Mon May 4 16:48:47 EDT 2009


<rich:jQuery> usage example with <h:graphicImage>, uses conflicting mouseOver handlers.
---------------------------------------------------------------------------------------

                 Key: RF-7016
                 URL: https://jira.jboss.org/jira/browse/RF-7016
             Project: RichFaces
          Issue Type: Bug
          Components: doc
    Affects Versions: 3.3.0
            Reporter: Scott Langley
            Priority: Minor


In the RichFaces Reference Guide, in the section 6.66.5. Details of Usage for the <rich:jQuery> component, one suggested usage is:

...
<h:graphicImage onmouseover="enlargePic(this)" width="50" value="/images/price.png"
onmouseover="enlargePic(this, {pwidth:'60px'})" onmouseover="releasePic(this)" />
<h:graphicImage onmouseover="enlargePic(this)" width="50" value="/images/discount.png"
onmouseover="enlargePic(this, {pwidth:'100px'})" onmouseover="releasePic(this)" />
...
<rich:jQuery name="enlargePic" timing="onJScall" query="animate({width:param.pwidth})" />
<rich:jQuery name="releasePic" timing="onJScall" query="animate({width:'50px'})"/>
...

If you try to run something resembling this, you get errors like:

  Attribute "onmouseover" was already specified for element "h:graphicImage".

because they are assigning three times to the 'onmouseover' handler function.  I assume that the author meant to use this code:

...
<h:graphicImage  width="50" value="/images/price.png"
onmouseover="enlargePic(this, {pwidth:'60px'})" onmouseout="releasePic(this)" />
<h:graphicImage  width="50" value="/images/discount.png"
onmouseover="enlargePic(this, {pwidth:'100px'})" onmouseout="releasePic(this)" />



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the richfaces-issues mailing list