0 Replies Latest reply on Aug 17, 2009 7:20 PM by Sarvotham pai

    rich:extendedDataTable after Sorting same query is getting fired

    Sarvotham pai Newbie
      I have a RichFaces UI which are having sidebar menu and sidebar had 8 links.
      I am using Seam @DataModel and @Factory and hibernate criteria to populate all the 8 pages.
      In all the pages i have sortby functionality which is working fine.
      I am able to get all data in all the 8 pages and I can freely navigate around all the links/xhtmls.
      But if in one of the xhtmlpages if I do sorting or groupby after that I am unable to navigate to other pages.If I select any other link the same last query which is executed for sorting is getting executed.
      Is this an issue? or do I need add any configuration.
      Please help me in solving this issue.
      Below is the codesnippet
      one of the 8 xhtml
                     <rich:extendedDataTable id="listRegion" rows="30"
                     value="#{regions}" var="p">
                     
                     <rich:column sortable="true"
                         sortBy="#{p.regionid}" width="100px" label="Region Id">
                     <f:facet name="header">
                     <h:outputText value="Region Id" />
                     </f:facet>
                     <h:outputText value="#{p.regionid}" />
                     </rich:column>
                     
                     <rich:column sortable="true"
                         sortBy="#{p.region}" width="100px" label="Region Name">
                     <f:facet name="header">
                     <h:outputText value="Region Name" />
                     </f:facet>
                     <h:outputText value="#{p.region}" />
                     </rich:column>
      </rich:extendedDataTable

      Sidebar
                <rich:panelMenuItem label="Region" action="/regionList.xhtml" />

      Action

           @DataModel("regions")
           private List<CoreRegion> listRegions;
           
           @Factory("regions")
           public void getRegions() {
                System.out.println("Inside get Regions");
                Session userDatabase = HibernateUtil.getSession();
                Criteria crit = userDatabase.createCriteria(CoreRegion.class);
                          listRegions = crit.list();