wood burning stoves 2.0*
The moose likes JSF and the fly likes rich:dataTable sorting issue (AJAX) + rich:datascroller does not go passed page 2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "rich:dataTable sorting issue (AJAX) + rich:datascroller does not go passed page 2" Watch "rich:dataTable sorting issue (AJAX) + rich:datascroller does not go passed page 2" New topic
Author

rich:dataTable sorting issue (AJAX) + rich:datascroller does not go passed page 2

odomitchi anikpo
Greenhorn

Joined: Jan 15, 2009
Posts: 5
Hello,



I am using Richfaces 3.3.0, Facelelts 1.1.14 and Seam 2.1.1.


I have an issue my rich:dataTable component and sorting. I noticed the very first click on the table on a column header has no effect then all subsequent clicks on any header actually perform the previously requested sort order. I would really appreciate some help.


The section of my .xhtml file that contains the table looks like this:



...



<a4j:status id="ajaxstatus" onstart="Richfaces.showModalPanel('statusPanel');" onstop="Richfaces.hideModalPanel('statusPanel');" />



...



<a4j:form id="myForm">



<rich:contextMenu attached="false" id="menu" submitMode="ajax">

<rich:menuItem ajaxSingle="true" action="#{myAction.openItem}" value="Open Report" >

<a4j:actionparam name="uri" assignTo="#{myAction.selectedItem.uri}" value="{uri}"/>

</rich:menuItem>

<rich:menuItem submitMode="server" action="#{myAction.openItem}" value="Open in new window" target="{uri}" onclick="window.open('', 'jsWinId', 'windth=200, height=200, resizable=0')">

<a4j:actionparam name="uri" assignTo="#{myAction.selectedItem.uri}" value="{uri}"/>

</rich:menuItem>

</rich:contextMenu>



<rich:dataTable id="myTable" var="_myItem" value="#{myAction.allItems}" selectionMode="single" sortMode="single" width="100%" rows="25" reRender="myForm:myTable,ds" rowClasses="cur"

onRowMouseOver="this.style.backgroundColor='#F1F1F1'" onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'" rendered="#{not empty myAction.allItems}" >

<rich:column id="col1" sortBy="#{_myItem.id}" sortOrder="#{myAction.sortOrder['col1']}" label="Transaction ID" width="15%">

<f:facet name="header">

<hutputText value="ID"/>

</f:facet>

#{_myItem.id}

</rich:column>

<rich:column id="col2" sortBy="#{_myItem.category}" sortOrder="#{myAction.sortOrder['col2']}" label="Category" width="17%">

<f:facet name="header">

<hutputText value="Category"/>

</f:facet>

#{_myItem.category}

</rich:column>

<rich:column id="col3" sortBy="#{_myItem.name}" sortOrder="#{myAction.sortOrder['col3']}" label="Name" width="17%">

<f:facet name="header">

<hutputText value="Name"/>

</f:facet>

#{_myItem.name}

</rich:column>

<rich:column id="col4" sortBy="#{_myItem.location}" sortOrder="#{myAction.sortOrder['col4']}" label="Location" width="21%">

<f:facet name="header">

<hutputText value="Location"/>

</f:facet>

#{_myItem.location}

</rich:column>

<rich:column id="col5" sortBy="#{_myItem.status}" sortOrder="#{myAction.sortOrder['col5']}" label="Status" width="15%">

<f:facet name="header">

<hutputText value="Status"/>

</f:facet>

#{myAction.statusDescription(_myItem.status)}

</rich:column>

<rich:column id="col6" sortBy="#{_myItem.timestamp}" sortOrder="#{myAction.sortOrder['col6']}" label="Timestamp" width="15%">

<f:facet name="header">

<hutputText value="Timestamp"/>

</f:facet>

<hutputText value="#{_myItem.timestamp}"><s:convertDateTime type="both" pattern="yyyy-MM-dd HH:mm:ss.ss"/></hutputText>

</rich:column>





<f:facet name="footer">

<rich:datascroller for="myTable" id="ds" renderIfSinglePage="false" ajaxSingle="false"></rich:datascroller>

</f:facet>





<rich:componentControl event="onRowClick" for="menu" operation="show">

<f:param name="uri" value="#{_myItem.uri}"/>

</rich:componentControl>


</rich:dataTable>

</a4j:form>


Thanks in advance!


Odomitchi A.
--------------
SCDJWS JEE5, SCWCD JEE5, SCJP 5.0, SCJP 1.4,
IBM Certified Application Developer
 
 
subject: rich:dataTable sorting issue (AJAX) + rich:datascroller does not go passed page 2
 
Similar Threads
richfaces:: richdatatable problem.
show "hourglass" during datatable sort
Can't reRender richfaces datatable from modal panel
Problem with headers in sorted rich:datatable with subtable
rich:contextMenu HOW TO RERENDER some sections!!