开发者

How to render a button depending on the state list?

开发者 https://www.devze.com 2023-04-08 23:13 出处:网络
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 empt

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>
0

精彩评论

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