0

Does anyone know why when you try to render a JSF view executes a database query?

I am listing a large paged list, as I have seen on:

http://wiki.apache.org/myfaces/WorkingWithLargeTables

I return data list it correctly (with the number of items I want), but I noticed that the RenderView run a query that gets all the data.

pasteles
  • 15
  • 4

1 Answers1

1

JSF does not do that. It's your own wrong code who does that. You're executing a SQL query in a getter method. Just do not do business job in getter method. Do it in (post)constructor or (action)listener method instead.

See also:

Community
  • 1
  • 1
BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555