How to navigate between datatable and detail view?

UI Components for JSF
Post Reply
brazzy
Posts: 23
Joined: 23 Dec 2010, 12:55

10 Jan 2011, 19:56

Hi,

I have a (lazy loaded) datatable with sorting, filtering and pagination. Each row also has a button that links to a detail viel of that entity. My problem: I want to be able to go back from the detail view to the table and have it in the same state (in regard to sorting, filtering, paging) as before.

How can this be done? Right now, I am using a <p:button> for the link and a viewParam with the ID of the entity. If I don't do anything else and just use the browser "back button", I get a cached view of the table's first page, unsorted, unfiltered (but, strangely, with filters selected), since filtering and sorting is done via AJAX (and dynamic="false" apparently is ignored). If I disable caching via HTTP headers, the same is shown, but after a separate request.

The real problem is that while I could use the page attribute, there is no way to get/set the filtering/sorting state of the table from my code. I tried using the binding attribute to get the UI component, but that led straight into another nasty bug: http://primefaces.prime.com.tr/forum/vi ... =3&t=7069
  • Primefaces 2.2RC2 / 2.2 Final
  • Myfaces 2.0.2
  • Facelets
  • Tomcat 7.0.5

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 28 guests