I have data loaded from DB, when click a command button:
<h:commandButton value="Show article content and comments" action="#{dataBean.activateArticleContentView}" actionListener="#{dataBean.loadCurrentArticle}">
<f:attribute name="articleId" value="#{article.id}"></f:attribute>
</h:commandButton>
@ManagedBean
@ViewScoped
public class DataBean implements Serializable {
...
...