2 Replies Latest reply on Nov 19, 2015 3:25 AM by Daniel Filippov

    rich:popupPanel form submission issue

    Daniel Filippov Newbie


      I have modal rich:popupPanel within h:form. Something like this:

      <h:form id="popupForm">
          <rich:popupPanel id="popup"
              <h:inputText id="templateInput" value="#{foo.template}"/>
              <a4j:commandButton id="searchButton" value="search" action="#{foo.search}"/>

      When I type some text into input and press Enter to submit the form, full page reloading is invoked.

      It looks like RichFaces adds "firstHref" button tag to resulting html (for modal popups):

      <div id="popupForm:popup">
          <div class="rf-pp-shade" id="popup_shade">
              <button tabindex="-1" class="rf-pp-btn" id="popupForm:popupFirstHref" name="popupForm:popupfirstHref"></button>

      And when the popup is paced inside the form, this button forces full (I mean "not AJAX") form submission, that results in page reloading. When form is placed inside the popup everithing works like indended (without page reloading).

      So, what is the puprose of this "firstHref" button and is there any way to solve this issue?


      P.S.: The popup was placed inside the form to solve autosizing issues.