Hi, We are using rich:tabPanel in our application and we are facing problem retaining the current selected tab after user clicks an commandButton pointing to an action in a Conversation. Everything seems to work fine during the normal post backs , but in case of errors and when seam redirects to my page to display errors, always the first tab is displayed.
I think one way to store the current tab is storing the current tab's name by using value binding to a property in the action, but that doesn't seem to be a good idea as I am mixing something related to GUI into my business logic.
Is there a way to retain this by only modifying the xhtml and probably pages.xml. I saw some code in seam forums , that uses <param name="selectTab"/> in pages.xml for that particular navigation case, I am not sure what is being achieved here.
In answer to your question about <param name="selectedTab"/> in the .page.xml file, this is a page parameter, which is Seam's way of propagating a value from page to page as you navigate (in lieu of a hidden form field). So you can bind this directly to the selectedTab attribute:
Remember, though that the selectedTab attribute can be a regular value binding to any Seam component property, so you can use a long-running conversation (or a page-scoped component) to continually update the selected tab. The value of this expression would be the label of the tag you want to select.
You might also be interested in the post below, which suggests a component-binding approach to manipulate the selected tab programmatically.
You might be interested to know that there is a book coming out soon about RichFaces. Such a book is desperately needed because while RichFaces is very powerful, there are many aspects of it that are either cryptic or just hard to grasp. [ October 10, 2008: Message edited by: Dan Allen ]