[jboss-user] [JBoss Seam] - Presenting a No Results Message with an Empty Collection on
do-not-reply at jboss.com
Wed Dec 5 20:53:24 EST 2007
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 beneath the form. Otherwise, you get a message in that location 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. Perhaps with FacesMessages. Or if there is an outside-the-box way for accomplishing the same concept that's more consistent with the JSF and/or Seam/RichFaces paradigm.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4110708#4110708
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4110708
More information about the jboss-user