Uploaded image for project: 'MyFaces Core'
  1. MyFaces Core
  2. MYFACES-204

onclick rendered twice in commandLink

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.1.0
    • 1.1.0
    • None
    • None

    Description

      A user defined onclick is both prepended to the JSF generated javascript and also passed through:

      <x:commandLink action="#

      {attachment.open}

      " onclick="myFunction();">
      <h:outputText value="#

      {attachment.filename}

      "/>
      </x:commandLink>

      Renders as:

      <a href="#" onclick="myFunction();;clear_emailview_3Amyform();document.forms['myview:myform'].elements['myview:myform:_link_hidden_'].value='myview:myform:attachments:0:_id180';if(document.forms['myview:myform'].onsubmit)

      {document.forms['myview:myform'].onsubmit();}

      document.forms['myview:myform'].submit();return false;" id="myview:myform:attachments:0:_id180" onclick="myFunction();">

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            pmahoney Peter Mahoney
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment