开发者

Render h:panelGrid on dataTable row select?

I have a dataTable that when a user selects a row a number of fields are populated so they can see more detail. of that particular item. However, at the moment the page loads with the unpopulated panelgrid and populates on selecting of a row. How 开发者_JAVA技巧can I hide this panelgrid and get it to show once the row has been selected??

Thanks


Use the rendered attribute and let it evaluate true if anything has been selected.

E.g.

<h:panelGrid rendered="#{not empty bean.selectedRow}">
    <h:outputText value="#{bean.selectedRow.foo}" />
    <h:outputText value="#{bean.selectedRow.bar}" />
    ...
</h:panelGrid>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜