• Post Reply Bookmark Topic Watch Topic
  • New Topic

JSF - How to filter data

 
Gregg Wachter
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here's my JSF question.
I have a Model connected to my jsp via value="#{getAlerts} but also have buttons which allow the user to set the viewType to either "Watch List", "Raised" or "All". When, the viewType changes via a button push the displayed results don't change. Instead, it requires two button pushes to get the results I'm expecting. Note: the data filtering occurs inside the getAlerts() method as it checks for viewType and returns a filtered list.
Is this due to LifeCycle processing in JSF or is there a bug? Is the approach for filtering in the getXXX() correct or would it be better to set some indicator on the UIData rows and modify a renderer to skip rows with isFiltered() = true? Seems like messing with a renderer for such a simple task mught be overkill.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!