You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by mjovanov <mi...@jpmchase.com> on 2006/07/20 23:01:07 UTC

Yet Another dataTable Sorting Issue - setSort() not called?!

I am working with a very complex scenario using Tomahawk dataTable component,
requiring paging (through sub-selects), sorting, dynamic columns (number and
type)...  I originally had the managed bean scoped to session but am now
trying to change that to request since I am working with large data sets
(modeling my solution after the examples listed on Working With Large
Tables: http://wiki.apache.org/myfaces/WorkingWithLargeTables)  However now
that I finally got most of it to work, all of a sudden I can?t get it to
sort.  It looks like JSF in not calling the setSortColumn() method on the
managed bean with the correct argument (it is actually calling it only once
and with the default value; I noticed that before, when my managed bean had
session scope, setSortColumn() was actually called twice: once with the old
value and then again with the new value).  I am missing something?  Here is
short sample of my code:

  <t:dataTable id="dataTable"
  	styleClass="recordSetTable"
  	headerClass="resultSetTableHeader"
  	rowClasses="cellDataAltRow,cellDataFirstRow"
  	renderedIfEmpty="false"
  	value="#{workbenchForm.dataModel}"
  	preserveDataModel="false"
  	rows="25"
  	var="row" 
  	sortColumn="#{workbenchForm.sort}"
  	sortAscending="#{workbenchForm.ascending}"
  	preserveSort="true" >
  	<t:columns id="columns" value="#{workbenchForm.columns}" var="column"  >
  		<f:facet name="header">
  			<t:commandSortHeader columnName="#{column.label}" arrow="true"
styleClass="cellDataHeader">
  				<h:outputText value="#{column.label}" />
  			</t:commandSortHeader>
  		</f:facet>
  		<h:outputText value="#{workbenchForm.columnValue}" />
  	</t:columns>
  </t:dataTable>
  
Has anyone been able to figure this problem out?  Could it be a bug in the
Tomahawk component lib?
-- 
View this message in context: http://www.nabble.com/Yet-Another-dataTable-Sorting-Issue---setSort%28%29-not-called-%21-tf1977271.html#a5424427
Sent from the MyFaces - Users forum at Nabble.com.