1 Reply Latest reply on Dec 5, 2007 6:22 PM by neilac333

    Presenting a


      I am attempting to use RichFaces and Seam to do something quite common. I have a search page where I want to present the results of the search on the same page as the search form itself. When the user first comes to the page, there is nothing but the form of course. When the user hits the button, if there are results, you get a scrollable table. Otherwise, you get a message informing you that the search returned no results.

      The trick is that we are coming back to the same page. I am aware of the "rendered" attribute for conditionally rendering components, but I also need to be aware of whether this is the first access of the page or not. In ASP .Net, you check this with an isPostBack() method call in the code-behind. What is the best way to accomplish that here? Simply set a managed bean property when the user submits for the first time? That just seems so inelegant and unnecessary.

      My question is simply if there is a "best practice" for accomplishing this. Or if there is an outside-the-box way for accomplishing the same concept that's more consistent with the JSF and/or RichFaces paradigm.