Results 1 to 4 of 4

Thread: rich dataTable sort not working

  1. #1
    Join Date
    Mar 2007
    Posts
    113

    Default rich dataTable sort not working

    hi all...

    I have a rich faces datatable. The table is displayed fine, but when I click on an arrow to perform sorting, nothing happens.

    here's my web.xml

    Code:
    <filter>
    		<display-name>RichFaces Filter</display-name>
    		<filter-name>richfaces</filter-name>
    		<filter-class>org.ajax4jsf.Filter</filter-class>
    	</filter>
    
    	<filter-mapping>
    		<filter-name>richfaces</filter-name>
    		<servlet-name>Faces Servlet</servlet-name>
    		<dispatcher>REQUEST</dispatcher>
    		<dispatcher>FORWARD</dispatcher>
    		<dispatcher>INCLUDE</dispatcher>
    	</filter-mapping>
    
           <servlet>
    		<servlet-name>Faces Servlet</servlet-name>
    		<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    		<load-on-startup>1</load-on-startup>
    	</servlet>
    
    	<!-- Just here so the JSF implementation can initialize -->
    	<servlet-mapping>
    		<servlet-name>Faces Servlet</servlet-name>
    		<url-pattern>*.faces</url-pattern>
    	</servlet-mapping>
    here's my xhtml:

    Code:
    <ui:define name="searchtableresults">
    		<h:form id="dataTableForm">
    		<div id="organiztionsSection" class="section">
    		<rich:dataTable id="organizations" rendered="#{!empty organizations}" styleClass="data" rows="5" value="#{organizations}" var="row" width="775" columns="3" >
    			
    			
    			<rich:column sortBy="#{row.id}">
    				<f:facet name="header">
    					<h:outputText value="ID"/>
    				</f:facet>
    				<h:outputText value="#{row.id}"/>
    			</rich:column>
    			
    			<rich:column sortBy="#{row.name}">
    				<f:facet name="header">
    					<h:outputText value="Name"/>
    				</f:facet>
    				<h:outputText value="#{row.name}"/>
    			</rich:column>
    			
    			<rich:column sortBy="#{row.description}">
    				<f:facet name="header">
    					<h:outputText value="Description"/>
    				</f:facet>
    				<h:outputText value="#{row.description}"/>
    			</rich:column>
    			
    		</rich:dataTable>
    		</div>
    		</h:form>
    	</ui:define>
    ideas ?

    thanks in adv....

  2. #2
    Join Date
    Mar 2007
    Posts
    113

    Default

    Sorry...

    I'm using:

    SWF 2.0.8
    Rich Faces: 3.3.0

    thanks

  3. #3
    Join Date
    Mar 2007
    Posts
    113

    Default

    I tried changing my web.xml to be:

    Code:
    <filter-mapping>
    		<filter-name>richfaces</filter-name>
    		<servlet-name>Spring MVC Dispatcher Servlet</servlet-name>
    		<dispatcher>REQUEST</dispatcher>
    		<dispatcher>FORWARD</dispatcher>
    		<dispatcher>INCLUDE</dispatcher>
    	</filter-mapping>
    But that causes my page navigation to break and throws an exception...

    thanks

  4. #4
    Join Date
    Oct 2006
    Posts
    6

    Default

    the problem is with the rich:datatable. the ui shows the sorting stuff, but the model doesnt support it. switch to rich:extendeddatatable, implement the model and *tada* it works.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •