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

f:param not passed / Uncaught ReferenceError: myfaces is not defined

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 4.0.0-RC1
    • 4.0.0-RC2
    • None
    • None

    Description

      <h:form>
      <h:commandButton id = "submit"
      value = "Show Message">
      <f:param name = "test_name" value = "test_value" />
      </h:commandButton>
      ...

      produces the following html:

      <form id="j_id_3" name="j_id_3" method="post" action="/test/home.xhtml?jfwid=-x7udcvg7i" enctype="application/x-www-form-urlencoded">
      <input id="j_id_3:submit" name="j_id_3:submit" type="submit" value="Show Message" onclick="return myfaces.oam.submitForm('j_id_3','j_id_3:submit',null,[['username','JSF 2.0 User']]);">

      The  onclick="return myfaces.oam.." causes an error as the myfaces variable hasn't been defined.

      I compared the working 3.0 case to the failing 4.0 case, and I have a fix by backporting some removed code (minus the IE support) . However, I know there's been JavaScript discussion, so feel free post another fix if there's better way.

       

      Attachments

        Issue Links

          Activity

            People

              volosied Volodymyr Siedlecki
              volosied Volodymyr Siedlecki
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: