2 Replies Latest reply on Dec 19, 2008 9:19 AM by joe Koch

    pages.xml can be overpowerd by a javascrip rerender

    joe Koch Newbie

      hello


      i found a little problem related with the pages.xml


      we have a web-site where we render a input field after the user did change a value


      5000000 - rerender - 5'000'000



      when we leave the page with an button a very short time after changing the value (5000000), the page stays on the same. (see the xhtml at the bottom)


      we could see that the exit code of the controller did the right thing, and sometimes it worked. but when we have done it to fast the error occured, or better the page did not changed as told in the pages.xml


      what do you think, should we open a jira entry?


      best regards


      a seam fan :-)




      <td class="prodTableCell">
                      <s:decorate id="issueSizeDecorator">
                          <h:inputText label="#{messages['issueSize']}"

                                       styleClass="numberInput"
                                       id="issueSize"
                                       required="true"
                                       value="#{product.issueSize}">
                              <f:convertNumber integerOnly="true" pattern="###,###,###" locale="de_CH"/>

                              <a4j:support event="onchange" reRender="selectUnderlyingForm"/>

                              <xxx:productRangeValidator/>
                              <f:attribute name="product" value="#{product}"/>
                              <f:attribute name="fieldName" value="issueSize"/>
                          </h:inputText>
                      </s:decorate>
                  </td>

        • 1. Re: pages.xml can be overpowerd by a javascrip rerender
          Ingo Jobling Master

          Hi Joe,


          Since you are using a4j:support you may find the following information helpful:


          5.4.2. Queue and Traffic Flood Protection in the Richface's reference.


          7.11. Concurrent calls to conversational components in the Seam reference.

          • 2. Re: pages.xml can be overpowerd by a javascrip rerender
            joe Koch Newbie

            hello ingo


            thanks for your replay.


            now i changed the line



            <a4j:support event="onchange" reRender="selectUnderlyingForm"/>



            to



            <a4j:support event="onchange" reRender="issueSizeDecorator"/>



            where issueSizeDecorator is the id of the td element  <s:decorate id="issueSizeDecorator">


            i still got the same problem.




            using the eventsQueue would be a solution but as click on the link below:
            <h:commandButton  styleClass="submit" value="#{messages['requestIndicativePrice']}" id="requestIndicativeButton" action="#{productCreationCtrl.requestIndicativePrice()}" />
            i have no chance to name a eventsQueue



            in my understanding seam should stop rendering the page (answer ajax requests) as soon as i come into the pages.xml


            i record with live http headers the traffic, there i saw that first the render goes to the server and the the button. i am pretty sure that the response of the first request is send back to the browser an causes the browser to stay.



            additional information:
            the input box has a box at the bottom with the old values i added earlier. as the focus stays on that box the value is not selected till i change the focus to the button to leave the page. this causes a very short delay of the two events.


            in the docu it says:
            Conversational components don't allow real concurrent access therefore Seam queues each request to process them serially. This allows each request to be executed in a deterministic fashion.


            if this is right i can't may self explain why we do have these problems...