9 Replies Latest reply on Jun 30, 2009 6:00 AM by Nick Belaevski

    Could not find datatable with id 'dataTableList'

    jegan Newbie

      Hello
      I am using richfaces 3.3.0 with jsf 1.2.

      I am getting error "Could not find datatable with id 'dataTableList' wnenever i opened the same page next time from my menu.

      When i checked the generated html code the datatable itself is missing.
      I tried with richfaces 3.3.1 also but still the same.
      I also tried like keeping the datatable inside the <a4j:outputpanel> as per
      jira issue jira.jboss.org/jira/browse/RF-177
      but not solved.

      please tell me where i am going wrong in my code?

      Thanks in Advance.
      jegan

      jspx code for menu

      <rich:menuItem submitMode="ajax" value="Screen" onclick="location.href='#facesContext.externalContext.requestContextPath}/faces/pages/mypage.jspx'" />
      


      jspx code for mypage
      <div class="divCSS" style="height:600px; width:1200px;" >
      <rich:dataTable id="dataTableList" rows="100"
      var="myVar" reRender="sc2"
      value="#{myController.mypageTableModel}"
      binding="#{myController.selectedRow}">
       <f:facet name="header">
       <rich:columnGroup styleClass="noScroll">
       <rich:column styleClass="printhide">
       <h:outputText value="Actions"></h:outputText>
       </rich:column>
       </rich:columnGroup>
       </f:facet>
      
      <rich:column style="white-space: no-wrap;" styleClass="printhide">
      <a4j:commandLink action="#{myController.deActivateAction}">
       <h:graphicImage id="image" alt="DeActivate"
       url="/pages/static/images/Icon_DeActivate.png"/>
      </a4j:commandLink>
      </rich:column>
      <rich:column>
       <h:outputText value="#{myVar.name}"/>
      </rich:column>
      
      </rich:dataTable></div>
      
       <rich:spacer height="5px" />
      <rich:datascroller align="left" for="dataTableList"
       maxPages="10" page="0" id="sc2" />
      
      
      [/url]

        • 1. Re: Could not find datatable with id 'dataTableList'
          Ilya Shaikovsky Master

          paste full snippets of template and details page. Seems datascroller could not find dataTAble for some reason.

          • 2. Re: Could not find datatable with id 'dataTableList'
            jegan Newbie

            My Template code is

            
            <!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:h="http://java.sun.com/jsf/html"
             xmlns:f="http://java.sun.com/jsf/core"
             xmlns:ui="http://java.sun.com/jsf/facelets"
             xmlns:a4j="http://richfaces.org/a4j"
             xmlns:rich="http://richfaces.org/rich">
            
            <body style="overflow:hidden;" onload="runBodyLoadScript()" >
            <f:view>
            <ui:include src="/pages/static/js/script.jspx" />
            <span class="printhide">
            
            <!-- MENU -->
             <h:form>
             <rich:toolBar height="10px">
             <!-- REFERENTIAL Menu -->
            <rich:dropDownMenu horizontalOffset="0" verticalOffset="0" styleClass="DisableMenuReferential" style="align:left;">
             <f:facet name="label">
            <h:panelGroup><h:graphicImage value="/pages/static/images/menu/menu_icon.gif" /><h:outputText value=" Referential" /></h:panelGroup>
             </f:facet>
             <rich:menuSeparator />
             <rich:menuItem submitMode="ajax" value="Family"
             onclick="location.href='#{facesContext.externalContext.requestContextPath}/faces/pages/referential/listFamily.jspx'" />
             <rich:menuSeparator />
            </rich:dropDownMenu>
            </rich:toolBar>
            </h:form>
             </span>
            <table class="Main" width="100%" summary="">
             <tr>
            <td class="MainContents">
            <div class="MainBordersSub">
            <ui:insert name="body"></ui:insert></div>
             </td>
            </tr>
            </table>
            </f:view>
            </body>
            </html>
            




            and my detail page is

            
            <!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:h="http://java.sun.com/jsf/html"
             xmlns:f="http://java.sun.com/jsf/core"
             xmlns:ui="http://java.sun.com/jsf/facelets"
             xmlns:a4j="http://richfaces.org/a4j"
             xmlns:rich="http://richfaces.org/rich"
             xmlns:tr="http://myfaces.apache.org/trinidad">
            
            <head>
            </head>
            <ui:composition template="/pages/static/layout/template.jspx">
             <ui:define name="body">
             <h:form id="frmSearch">
             <rich:panel >
             <div class="divCSS" style="height:600px; width:1200px;" >
             <rich:dataTable
             id="dataTableFamilyList" rows="100" onRowMouseOver="this.style.backgroundColor='#F1F1F1'"
             onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'"
             cellpadding="0" cellspacing="0" border="0" var="varFamily"
             reRender="sc2" styleClass="GDSSearchResult"
             value="#{familyController.familyTableModel}"
             binding="#{familyController.selectedRow}">
            
             <f:facet name="header">
             <rich:columnGroup styleClass="noScroll">
             <rich:column >
             <h:outputText value="name"></h:outputText>
             </rich:column>
             </rich:columnGroup>
             </f:facet>
            
             <rich:column>
             <h:outputText value="#{varFamily.mnemonic}"/>
             </rich:column>
            
             </rich:dataTable></div>
             <rich:spacer height="5px" />
             <rich:datascroller align="left" for="dataTableFamilyList" maxPages="10" page="0" id="sc2" />
             </rich:panel>
             </h:form>
             </ui:define>
            </ui:composition>
            </html>
            
            



            Yes. When i remove the datatascroller it is working fine. pls let me know where i am going wrong?

            • 3. Re: Could not find datatable with id 'dataTableList'
              Ilya Shaikovsky Master

              try to check with for = "frmSearch:dataTableFamilyList" at datascroller.

              • 4. Re: Could not find datatable with id 'dataTableList'
                jegan Newbie

                Still the same. now i am getting error Like
                could not find dataTable with id 'frmSearch:dataTableFamilyList'

                • 5. Re: Could not find datatable with id 'dataTableList'
                  Ilya Shaikovsky Master

                  b.t.w. If something changed if you will change the submitMode from ajax to none on the menu?

                  • 6. Re: Could not find datatable with id 'dataTableList'
                    jegan Newbie

                    Hello,
                    My template file is like a constant. I am not changing that at any point.
                    Is it the problem with submitMode?

                    • 7. Re: Could not find datatable with id 'dataTableList'
                      Nick Belaevski Master

                      So, there are two parallel requests running in your case. This can be the cause of this issue.

                      • 8. Re: Could not find datatable with id 'dataTableList'
                        jegan Newbie

                        pls tell me how to resolve this issue?

                        • 9. Re: Could not find datatable with id 'dataTableList'
                          Nick Belaevski Master

                          Try this please:

                          "ilya_shaikovsky" wrote:
                          b.t.w. If something changed if you will change the submitMode from ajax to none on the menu?