p:commandButton action and f:setpropertyactionlistener not invoked in p:columngroup

守給你的承諾、 提交于 2019-12-01 23:26:56

PrimeFaces has a bug wherein a commandButton or commandLink doesn't fire the action listener if it is located in the header (source - see second defect). I have a hunch you've encountered the same problem in the footer.

This was fixed in a recent release, but it's not yet available to the public. If you want to use a PrimeFaces button (rather than a standard HTML button), you will have to buy a PrimeFaces Elite subscription or compile the source from scratch.

I thing you can put the setPropertyActionListener inside the commandButton like this:

<p:commandButton ...> 
 <f:setPropertyActionListener value="#{otherBean.id}" target="#{anotherBean.selectedBackId}"/>
</p:commandButton>
 <p:commandButton 
                action="#{customerBean.remove}" 
                value="Delte" 
                title="Delete"
                update="customer_table">
                    <f:setPropertyActionListener 
                    target="#{customerBean.customer}"
                    value="#{cursomer}" />
                    <p:confirm 
                        header="Confirmation" 
                        message="Are you sure?" 
                        icon="ui-icon-alert" />
        </p:commandButton>

         <p:confirmDialog global="true" showEffect="fade" hideEffect="fade">
            <p:commandButton value="Yes" type="button" styleClass="ui-confirmdialog-yes" icon="ui-icon-check" />
            <p:commandButton value="No" type="button" styleClass="ui-confirmdialog-no" icon="ui-icon-close" />
        </p:confirmDialog>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!