Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

htmldatatable displays stale values?

Dez Max
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm using t:datatable myfaces extension implementation of JSF data table. The value of datatable is bound a request-scoped backing bean property (ArrayList of POJO). The business service class returns list of POJOs which I diplay them as rows in the table. The issues that I have with the datatable is, when the arraylist is empty or size == 0, the datatable renders stale data(old copy of the values of HTMLDataTable). I don't want to mixed the component and data logic, hence looking for cleaner approach and trying to avoid looking up the component from and setting the values of HTMLDataTable. I regenerate the list of POJOs when users selects an options from the combo box, so at times the list is empty based on the list returned from the service class, at times its not. It works fine when its not empty, but it still displays the previous list values(stale data) when the current list returned is empty.
The preserveDataModel is set to false;

Has anyone experienced similar problem? Your help would be greatly appreciated.
[ December 14, 2006: Message edited by: Dez Max ]
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic