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

ajax javascript checks for existence of triggering html element

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.0-beta-2
    • None
    • JSR-314
    • None
    • Javascript

    Description

      This one is a bit special. I remove the triggering element from the DOM, afterwards I trigger it's onchange method. Works with Mojarra, but MyFaces insists, that the triggering element must exist in the DOM, though this isn't necessary from the spec.

      <h:form id="testForm">
      <h:inputText id="test" value="#

      {myBean.test}" >
      <f:ajax render="test2"/>
      </h:inputText>
      <h:inputText id="test2" value="#{myBean.test}

      " />
      <script type="text/javascript">
      //<![CDATA[
      var myTest = document.getElementById("testForm:test");
      var test_onchange = myTest.onchange;
      myTest.parentNode.removeChild(myTest);
      test_onchange();
      //]]>
      </script>
      </h:form>

      Attachments

        Activity

          People

            Unassigned Unassigned
            ganesh.jung Ganesh Jung
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: