Hello All, I have recently run into an issue that i cannot seem to surpass. I have implemented a custom task inbox inside of a base portlet using a custom made search service. The service works wonderfully, after searching, I click on a task (which goes to a portlet in a different project) and when I click back I have used persisted managed beans to persist the previous search filters(I wish to show the same results as before they clicked on the task) and re-search which also works perfectly. My problem here is that if the user sorts the columns(clicks on the header) before I search, I have no way of A) persisting the column sort filters B) Manually setting the column sort when the user clicks back and the search page re-initializes.
What I have tried so far:
I have added a new object to the session map(when the user searches) with a key of “persistedSort” and the value is the sortInfo object which is returned by using this line of code:
ISortInfo tableSort = this.getAsyncTable1().getSortInfo(true);
The data is persisted(once the user clicks a task and goes back I can get the values from the session map), the Ordinals are correct and the key for each column shows as: com.webMethods.caf.faces.application.CAFValueBinding@322a56f
Here is where I am currently stuck. I can cast the persisted object to SortInfo, but when I call the setSort() method for the task provider and pass the new sort info no tasks are shown in the provider. I have tried calling this method both before and after I search (in the initialize method) but I still recieve the same results. Does anyone have any ideas on how I can re-sort the table using the persisted data? Or if there is a way to take the above value binding and call a method which returns the client side ID so I can manually iterate through the table?
Any help/insight would be greatly appreciated!