4 Replies Latest reply on Mar 22, 2011 8:22 AM by langer123

    rich:scrollableDataTable causing infinite posting loop

    langer123

      Hi

      I'm getting some very strange behavior from a new scrollableDataTable component I'm trying to add. I have stripped its attributes and content down to the bare minimum and the odd behavior continues.

      So the problem is: When I hit the page that includes the file with my scrollable data table (Which is in a Modal window), the page seems to go on an endless submitting/re-rendering loop. As if it just keeps re-rendering the entire page or submitting the page.

      My code is attached.

      I'm using Richfaces 3.3.1 and JSF 2.0.4.

       

       

      main.xhtml:

       

       

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <html xmlns="http://www.w3.org/1999/xhtml"
          xmlns:ui="http://java.sun.com/jsf/facelets"
          xmlns:h="http://java.sun.com/jsf/html"
          xmlns:f="http://java.sun.com/jsf/core"
          xmlns:rich="http://richfaces.org/rich"
          xmlns:a4j="http://richfaces.org/a4j"
          xmlns:t="http://myfaces.apache.org/tomahawk">
          <ui:composition template="/templates/mclayout.xhtml">
      
      <ui:define name="body">
          <rich:modalPanel id="mpDetail" minHeight="550" minWidth="480" zindex="2000">
              <a4j:form id="detail">
                  <ui:include src="includeFile1.xhtml">
                      <ui:param name="show1" value="#{myBean.struct.item.value}" />

       

      includeFile1.xhtml:

       

       

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <html xmlns="http://www.w3.org/1999/xhtml"
          xmlns:ui="http://java.sun.com/jsf/facelets"
          xmlns:h="http://java.sun.com/jsf/html"
          xmlns:f="http://java.sun.com/jsf/core"
          xmlns:rich="http://richfaces.org/rich"
          xmlns:a4j="http://richfaces.org/a4j"
          xmlns:t="http://myfaces.apache.org/tomahawk">
      
          <rich:tabPanel id="my_tabpanel" value="#{myBean.selectedTab}" selectedTab="#{myBean.selectedTab}" switchType="client">
      
          <rich:tab id="hTest" label="test">
              <ui:include src="test-details-tab.xhtml">
                  <ui:param name="testBean" value="#{myBean}" />
              </ui:include>
          </rich:tab>
      

       

      test-details-tab.xhtml

       

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <html xmlns="http://www.w3.org/1999/xhtml"
          xmlns:ui="http://java.sun.com/jsf/facelets"
          xmlns:h="http://java.sun.com/jsf/html"
          xmlns:f="http://java.sun.com/jsf/core"
          xmlns:rich="http://richfaces.org/rich"
          xmlns:a4j="http://richfaces.org/a4j"
          xmlns:t="http://myfaces.apache.org/tomahawk">
      
          <rich:scrollableDataTable id="testID">
      
          </rich:scrollableDataTable>
      
      </html>
      

       

       

      Looking at my eclipse tomcat logs I can see that it is in fact re-rendering the page 2 times per second on average.

       

      I also took it the scrollableDataTable out and put it outside the ModalPanel in main.xhtml to test. There was no more infinite loop this when I done this. Does anyone have any ideas what is going wrong here?

       

      Thanks

        • 1. rich:scrollableDataTable causing infinite posting loop
          langer123

          Anyone? Is there an issue with scrollableDataTable inside modal panels?

          • 2. rich:scrollableDataTable causing infinite posting loop
            boy18nj

            How about if you exlude test-details-tab.xhtml and add rich:scrollableDataTable directly to includeFile1.xhtml, does this issue  happens then?

            • 3. rich:scrollableDataTable causing infinite posting loop
              langer123

              Yes, it still occurs when I do this Aman

              • 4. Re: rich:scrollableDataTable causing infinite posting loop
                langer123

                Ok, so I've tried a very simple example in its own single seperate page. It is still not working, the endless resubmitting/looping is still occuring.

                I also put an editor component in, just to make sure it was not Richfaces 3.3 on my system....the editor works fine.

                 

                <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

                <html xmlns="http://www.w3.org/1999/xhtml"

                          xmlns:ui="http://java.sun.com/jsf/facelets"

                          xmlns:h="http://java.sun.com/jsf/html"

                          xmlns:f="http://java.sun.com/jsf/core"

                          xmlns:rich="http://richfaces.org/rich"

                          xmlns:a4j="http://richfaces.org/a4j"

                          xmlns:t="http://myfaces.apache.org/tomahawk">

                          <ui:composition template="/templates/mclayout.xhtml">

                 

                 

                 

                 

                                    <ui:define name="pageTitle">

                                              <h:outputFormat value="#{messages['page_title']}" />

                                    </ui:define>

                 

                 

                                    <ui:define name="heading">

                                              #{messages[componentNavigator.currentComponent.id]}

                                    </ui:define>

                 

                 

                                    <ui:define name="body">

                                         <h:form id="form">

                                              <h:panelGroup style="height:320px;width:400px;" layout="block">

                                                   <rich:editor id="editor" width="400" height="300"></rich:editor>

                                              </h:panelGroup>

                                         </h:form>

                 

                                         <h:form id="form2">

                                              <rich:spacer height="30" />

                                              <h:panelGroup style="height:320px;width:400px;" layout="block">

                                                   <rich:scrollableDataTable height="400px" width="700px" id="carList">

                                                        <rich:column id="make">

                                                             <f:facet name="header"><h:outputText styleClass="headerText" value="Make" /></f:facet>

                                                             <h:outputText value="" />

                                                        </rich:column>

                                                        <rich:column id="model">

                                                             <f:facet name="header"><h:outputText styleClass="headerText" value="Model" /></f:facet>

                                                             <h:outputText value="" />

                                                        </rich:column>

                                                    </rich:scrollableDataTable>

                                                </h:panelGroup>

                                                <rich:spacer height="20px"/>

                                          </h:form>

                 

                                    </ui:define>

                 

                 

                          </ui:composition>

                </html>