Win a copy of Escape Velocity: Better Metrics for Agile Teams this week in the Agile and Other Processes forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

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

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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">

<h:outputText 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">

<h:outputText 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">

<h:outputText 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">

<h:outputText 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">

<h:outputText 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">

<h:outputText value="Timestamp"/>

</f:facet>

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

</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
 
If tomatoes are a fruit, then ketchup must be a jam. Taste this tiny ad:
Garden Master Course kickstarter
https://coderanch.com/t/754577/Garden-Master-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic