How to render a button depending on the state list?
I have a button, which should be disabled if a particular list is empty开发者_运维技巧. And, accordingly, active, if list not empty. When the initial page load button is disabled, because list is empty. And then the list is filled, but the button is still disabled and does not react to this. I put it in a panelGroup, but I do not know where to render it again. In what place I must to insert the attribute "render" or "rendered". And what they should be equal? Any help would be greatly appreciated. Thanks in Advance. This is my code:
<h:panelGroup id="buttonSave">
<h:commandButton value="#{bean.value}"
action="mypage"
actionListener="#{bean.onSave}"
disabled="#{empty bean.list}"/>
</h:panelGroup>
精彩评论