我得到一个包含很多内容的数据表。对于每一行,我在最后一列得到一个 iFrame-Link。基于这些链接,页面需要很长时间才能加载。
现在我想隐藏此列以获得更快的加载。用户应该能够显示带有按钮的列。但我怎么能意识到这一点?以下是专栏内容:
<p:commandButton value="Show book">
<f:setPropertyActionListener value="true" target="#{rollCommunityBean.renderPhoneColumn}" />
</p:commandButton>
<p:column exportable="false" rendered="#{rollCommunityBean.renderPhoneColumn}">
<f:facet name="header">
<h:outputText value="Link" />
</f:facet>
<p:lightBox iframe="true" width="750pt" height="650pt">
<h:outputLink rendered="#{member.username.length() > 0}" value="url" title="#{member.username} - #{member.name} #{member.vorname}">
<h:outputText icon="ui-icon-person" value="Telefonbuch" />
</h:outputLink>
</p:lightBox>
</p:column>
滚动社区豆
public class RollCommunityBean {
/*
* All rendering Booleans
*/
// For the Phonebook iFrame Column
private boolean renderPhoneColumn;
/*
* All Getter and Setter for the rendering Booleans
*/
public boolean getRenderPhoneColumn() {
return renderPhoneColumn;
}
public void setRenderPhoneColumn(boolean renderPhoneColumn) {
this.renderPhoneColumn = renderPhoneColumn;
}
}