<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://xmlns.jcp.org/jsf/html"
                xmlns:f="http://xmlns.jcp.org/jsf/core"
                xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
                xmlns:p="http://primefaces.org/ui">
    
    <!-- 
        Composant bouton de soumission de formulaire réutilisable (WOU/DRY)
        Usage: <ui:decorate template="/templates/components/buttons/button-form-submit.xhtml">
                  <ui:param name="value" value="Enregistrer" />
                  <ui:param name="icon" value="pi pi-check" />
                  <ui:param name="action" value="#{bean.method}" />
                  <ui:param name="update" value="componentId" />
                  <ui:param name="oncomplete" value="javascript" />
                  <ui:param name="severity" value="success|primary|info|warning|danger" />
                  <ui:param name="disabled" value="false" />
                  <ui:param name="styleClass" value="" />
                </ui:decorate>
    -->
    
    <ui:fragment rendered="#{empty rendered or rendered}">
        <p:commandButton 
            value="#{value}"
            icon="#{icon}"
            action="#{action}"
            update="#{update}"
            oncomplete="#{oncomplete}"
            disabled="#{not empty disabled and disabled}"
            styleClass="ui-button-#{empty severity ? 'primary' : severity} #{not empty styleClass ? styleClass : ''}"
            title="#{title}" />
    </ui:fragment>
</ui:composition>

