<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://xmlns.jcp.org/jsf/html"
                xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
                xmlns:p="http://primefaces.org/ui">

    <!--
        Composant bouton "Modifier" réutilisable - DRY/WOU
        
        Usage avec ui:decorate pour passer l'action via ui:define :
        <ui:decorate template="/templates/components/buttons/action-button-edit.xhtml">
            <ui:param name="update" value=":formEdit"/>
            <ui:param name="dialogWidget" value="dlgEdit"/>
            <ui:param name="styleClass" value="mr-2"/>
            <ui:define name="action">
                #{bean.setItemSelected(item)}
            </ui:define>
        </ui:decorate>
    -->

    <p:commandButton icon="pi pi-pencil"
                   title="Modifier"
                   actionListener="#{action}"
                   oncomplete="PF('#{dialogWidget}').show();"
                   update="#{update}"
                   styleClass="ui-button-rounded ui-button-warning #{not empty styleClass ? styleClass : ''}"/>
</ui:composition>

