>>> This works but I wish it were cleaner.
I was just giving an alternate solution that doesn't deal with the FacesContext. and is much cleaner.(atleast in my opinion).
I didn't get your point overhere,
table needs to be rendered whenever this page is displayed, not just after carrying out a insert/save/delete.
The table will always be rendered, but the data will be loaded pretty lazily. I thought that was the requirement.
May be I was missing something ?
For example, there are lots of other pages that are linked to this page, and I don't know if its a good idea to require those pages to know about setting that flag. I'd like my backing bean to look after itself...
Yes, if all the pages need this particular lazy loading of the data, then you should be fine with the above solution. But in case if you want it to be customized for each different page, then you might need to have some more code for conditional checking using the viewId of the request page.
YMMV...