0 Replies Latest reply: Jun 1, 2008 6:42 AM by 807591 RSS

    facing problem in Richfaces data scroller (jsf)

    807591
      Hi
      I am new to JSF
      i am trying to use <rich:datascroller> but it is giving following problem,
      exception 
      
      javax.servlet.ServletException: could not find dataTable with id 'historicaldatadetail'
           javax.faces.webapp.FacesServlet.service(FacesServlet.java:154)
           org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
           org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
           org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
      
      
      root cause 
      
      javax.faces.FacesException: could not find dataTable with id 'historicaldatadetail'
           org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:425)
           org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:211)
           org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
           org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:216)
           org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)
           org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:132)
           javax.faces.webapp.FacesServlet.service(FacesServlet.java:140)
           org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
           org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
           org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
      here is my code
      <%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
      <rich:datascroller for="historicaldatadetail" align="left" pageIndexVar="pageIndex" pagesVar="pages" maxPages="5" />
                                                             <rich:dataTable id="historicaldatadetail" width="100%" border="0"
                                                             cellspacing="1" cellpadding="0"
                                                             binding="#{adminBean.dataTable}"
                                                             value="#{adminBean.historicaldatalist}"
                                                             headerClass="form_title_th"
                                                             rowClasses="form_title_td,form_title_td_white" var="store"
                                                             rows="#{adminBean.numberOfRecord}" rendered="#{! empty adminBean.historicaldatalist}">
                                                             <h:column>
                                                                  <f:facet name="header">
                                                                       <h:commandLink id="contractnumber"
                                                                            actionListener="#">
                                                                            <f:attribute name="sortField" value="getContract" />
                                                                            <h:outputText value="ContractNumber" />
                                                                       </h:commandLink>
                                                                  </f:facet>
                                                                  <h:outputText value="#{store.order}" />
      
                                                             </h:column>
                                                             <h:column>
                                                                  <f:facet name="header">
                                                                       <h:commandLink id="ssonumber"
                                                                            actionListener="#">
                                                                            <f:attribute name="sortField" value="getSso" />
                                                                            <h:outputText value="SSO" />
                                                                       </h:commandLink>
                                                                  </f:facet>
                                                                  <h:outputText value="#{store.sso}" />
                                                             </h:column>
                                                             <h:column>
                                                                  <f:facet name="header">
                                                                       <h:commandLink id="name"
                                                                            actionListener="#">
                                                                            <f:attribute name="sortField" value="getName" />
                                                                            <h:outputText value="Name" />
                                                                       </h:commandLink>
                                                                  </f:facet>
                                                                  <h:outputText value="#{store.name}" />
                                                             </h:column>
                                                             <h:column>
                                                                  <f:facet name="header">
                                                                       <h:commandLink id="updatedate"
                                                                            actionListener="#">
                                                                            <f:attribute name="sortField" value="getUpdatedate" />
                                                                            <h:outputText value="UpdateDate" />
                                                                       </h:commandLink>
                                                                  </f:facet>
                                                                  <h:outputText value="#{store.updatedate}" />
                                                             </h:column>
                                                             <h:column>
                                                                  <f:facet name="header">
                                                                       <h:commandLink id="sitename"
                                                                            actionListener="#">
                                                                            <f:attribute name="sortField" value="getSitename" />
                                                                            <h:outputText value="SiteName" />
                                                                       </h:commandLink>
                                                                  </f:facet>
                                                                  <h:outputText value="#{store.sitename}" />
                                                             </h:column>
                                                             <h:column>
                                                                  <f:facet name="header">
                                                                       <h:commandLink id="eam"
                                                                            actionListener="#">
                                                                            <f:attribute name="sortField" value="getEam" />
                                                                            <h:outputText value="EAM" />
                                                                       </h:commandLink>
                                                                  </f:facet>
                                                                  <h:outputText value="#{store.eam}" />
                                                             </h:column>
                                                             <h:column>
                                                                  <f:facet name="header">
                                                                       <h:commandLink id="area"
                                                                            actionListener="#">
                                                                            <f:attribute name="sortField" value="getArea" />
                                                                            <h:outputText value="Area" />
                                                                       </h:commandLink>
                                                                  </f:facet>
                                                                  <h:outputText value="#{store.area}" />
                                                             </h:column>
                                                             <h:column>
                                                                  <f:facet name="header">
                                                                       <h:commandLink id="info"
                                                                            actionListener="#">
                                                                            <f:attribute name="sortField" value="getNotes" />
                                                                            <h:outputText value="Additional Info" />
                                                                       </h:commandLink>
                                                                  </f:facet>
                                                                  <h:outputText value="#{store.notes}" />
                                                             </h:column>
                                                             <!-- -For Pagination -->
                                                             <f:facet name="footer">
                                                                  <rich:datascroller align="left" pageIndexVar="pageIndex" pagesVar="pages" maxPages="5" />
                                                             </f:facet>
                                                             <!-- -For Pagination END-->
                                                        </rich:dataTable>     
      data scroller in the footer is working but the one above one is giving the exception

      can somebody help

      thansks in advance.

      jars used

      richfaces-api-3.1.4.GA.jar
      richfaces-impl-3.1.4.GA.jar
      richfaces-ui-3.1.4.GA.jar