The main goal is not to touch database for the data models whose components are not rendered on the page.
I'd like to show the page to the user and query an huge array of data from the database only when the user has activated specific tab.
One more pitfall - when you expect that attribute expressions in componens within inactive tab are't be evaluated it is not true. And you can get NPE or LIE or whatever you wrote in your expression. Such sort of problems not always can be predicted.
Now it doesn't make sense to apply ajax switching mode to rich:tabPanel.
AJAX tab panel should process content of two tabs only:
- previously rendered one for the case of postback request
- new tab being encoded right now
All tabs are processed in order to render headers.
Can this issue: https://jira.jboss.org/jira/browse/RF-3341 be the cause of the problem you are describing?