Conditionally use of f:setPropertyActionListener

672 Views Asked by At

Is it possible to conditionally use the f:setPropertyActionListener inside a commandButton?

<p:commandButton value="button" process="@this" update=":someForm" action="#{someMB.someAction}">
    <f:setPropertyActionListener target="#{someMB.someAttr}" value="#{someValue}" disabled="#{someCondition}"/> 
</p:commandButton>

like the disabled attr in the f:setPropertyActionListener.

What I usually do is make 2 different buttons with rendered properties.

0

There are 0 best solutions below