MyFaces Core
  1. MyFaces Core
  2. MYFACES-1981

outputLink does not render onfocus and onblur

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.1.7-SNAPSHOT
    • Fix Version/s: 1.1.7
    • Component/s: None
    • Labels:
      None
    • Environment:
      tomcat 6.0.16
      java 1.6.0
      myfaces 1.1.7-snapshot

      Description

      onfocus and onblur are not rendered in outputLink. Although, these attributes are declared in the tld for the outputLink tag. Here's my jsf snippet:

      <f:view>
      <h:outputLink value="http://SomeURL" onfocus="myfunc();" onblur="myfunc();" onmouseover="myfunc();" >
      <h:outputText value="Click Me"/>
      </h:outputLink>
      </f:view>

      And this is what gets rendered:
      <a id="_idJsp0" name="_idJsp0" href="http://SomeURL" onmouseover="myfunc();">Click Me</a>

        Activity

        Hide
        Leonardo Uribe added a comment -

        Thanks to Paul Rivera for provide us this patch

        Show
        Leonardo Uribe added a comment - Thanks to Paul Rivera for provide us this patch
        Hide
        Paul Rivera added a comment -

        This bug does not happen on myfaces core 1.2 or sandbox 1.2 because of MYFACES-1608.

        But we have to rollback changes made by MYFACES-1608 due to bugs introduced (see discussion in TOMAHAWK-1183).

        The patches above corrects the bugs introduced by MYFACES-1608 and fixes:

        • outputLink (both myfaces core 1.1 and 1.2)
        • outputLinkDynamic (both sandbox 1.1 and 1.2)
        • commandLink (both myfaces core 1.1 and 1.2. commandLink was the main issue of myfaces-1608. So, commandLink has to stay fixed, although in a different way.)

        I will be uploading a more comprehensive set of testcases in TOMAHAWK-1183 that covers renderers in:

        • myfaces core 1.1
        • myfaces core 1.2
        • tomahawk 1.1
        • tomahawk 1.2
        • tomahawk sandbox 1.1
        • tomahawk sandbox 1.2
          to ensure no bugs were introduced by this patch.
        Show
        Paul Rivera added a comment - This bug does not happen on myfaces core 1.2 or sandbox 1.2 because of MYFACES-1608 . But we have to rollback changes made by MYFACES-1608 due to bugs introduced (see discussion in TOMAHAWK-1183 ). The patches above corrects the bugs introduced by MYFACES-1608 and fixes: outputLink (both myfaces core 1.1 and 1.2) outputLinkDynamic (both sandbox 1.1 and 1.2) commandLink (both myfaces core 1.1 and 1.2. commandLink was the main issue of myfaces-1608. So, commandLink has to stay fixed, although in a different way.) I will be uploading a more comprehensive set of testcases in TOMAHAWK-1183 that covers renderers in: myfaces core 1.1 myfaces core 1.2 tomahawk 1.1 tomahawk 1.2 tomahawk sandbox 1.1 tomahawk sandbox 1.2 to ensure no bugs were introduced by this patch.
        Hide
        Paul Rivera added a comment -

        On a similar case, outputLinkDynamic is also not rendering onfocus and onblur.

        given:
        <s:outputLinkDynamic
        resourceRendererClass="#

        {testLinkBean.resourceRenderer}

        "
        value="Click Here"
        onfocus="myfunc();"
        onblur="myfunc();"
        onmouseover="myfunc();">
        <h:outputText value="click here"/>
        </s:outputLinkDynamic>

        the rendered html is:
        <a onmouseover="myfunc();" href="/MYFACES11-Playground/faces/myFacesExtensionResource/org.apache.myfaces.custom.outputlinkdynamic.OutputLinkDynamicRenderer/12223178/?_renderer=org.apache.myfaces.playground.TestResourceRenderer">click here</a>

        I'm putting this here since the fix for both is the same. (i.e. if you fix one, the other one gets fixed as well)

        Show
        Paul Rivera added a comment - On a similar case, outputLinkDynamic is also not rendering onfocus and onblur. given: <s:outputLinkDynamic resourceRendererClass="# {testLinkBean.resourceRenderer} " value="Click Here" onfocus="myfunc();" onblur="myfunc();" onmouseover="myfunc();"> <h:outputText value="click here"/> </s:outputLinkDynamic> the rendered html is: <a onmouseover="myfunc();" href="/MYFACES11-Playground/faces/myFacesExtensionResource/org.apache.myfaces.custom.outputlinkdynamic.OutputLinkDynamicRenderer/12223178/?_renderer=org.apache.myfaces.playground.TestResourceRenderer">click here</a> I'm putting this here since the fix for both is the same. (i.e. if you fix one, the other one gets fixed as well)

          People

          • Assignee:
            Leonardo Uribe
            Reporter:
            Paul Rivera
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development