• Post Reply Bookmark Topic Watch Topic
  • New Topic

getter method called on APPLY_REQUEST_VALUES  RSS feed

 
Pinal N Patel
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everyone,

I have a getter method (getPictureList) that gets called during APPLY_REQUEST_VALUES phase. This method is called on the dataTable to retrieve pictures. There is no associated setter method.

My question is why should this method be called during APPLY_REQUEST_VALUES? I thought RENDER_RESPONSE phase would take care of calling this method for rendering the page. As a result, JSF is retreving the same information twice from the database which affects the performance.

Has anyone encountered this strange behavior? Any suggestion is appreciated. Thanks a bunch in advance!!
 
Marc Peabody
pie sneak
Sheriff
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This might help at least a little.

In my opinion, though, I think that resource/data retrieval should not be run from a getter. Such a strategy breaks MVC because it bypasses uses a formal Model.
[ March 20, 2007: Message edited by: Marc Peabody ]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!