1 Reply Latest reply on Jan 7, 2011 12:11 PM by placidcat

    Troubles with stale data in dataTable/extendedDataTable

    placidcat Newbie

      First, let me get this out of the way:

      My team is using WebSphere 6.1 and Tomcat 6.0 as deployment environments

      We are testing in Firefox 3.6+ and IE 7

      We are using JSF 1.2 with Facelets 1.1.13, Tomahawk 1.1.9, PrimeFaces 1.0.1, and RichFaces 3.3.3.

       

      We are trying to implement search functionality on a number of our pages - quite simple, really: the user enters criteria, hit search, and they expect results to appear in the data table below.  Except, that's not what is happening here.

       

      I've been using both rich:dataTable and rich:extendedDataTable and I've noticed odd behavior differences between WAS 6.1 and Tomcat 6.0.  Specifically, on WAS the user is happy - after clicking the "Search" button, a routine in our managed bean is called, the dataTable is reRendered and the results appear.  When serving this up in Tomcat, however, the user is unhappy because after clicking the "Search" button, the routine in the managed bean is called and the dataTable is reRendered only to see the previous search results.  Hitting "Search" a second time without changing criteria gives them the "correct" results (which are, in actuality, stale).

       

      When I do a trace I see a curious thing - the dataTable appears to fetch the results before the search routine is called.  I've been barking up a few trees internally at my institution but nobody has used RichFaces enough to know what might be wrong.  I'm hoping there is something simple (i.e. STUPID on my part) that is missing.

       

      Please peek at my attached page and code (sorry for the mess - we are in the midst of development and are nowhere near production).

       

      Just a note - I ripped the code nearly verbatim from one of the component samples within the RichFaces source (adding a couple null checks and so on) but that's it.  I'm not being innovative or introducing crazy techniques.  This should be easy stuff.

       

      Many thanks - I'll buy the first person who gives me a working explanation/soultion a latte ($4) if you have a PayPal account.

       

      Cheers,

       

      Dan