Files

32 lines
1.5 KiB
HTML

<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 icône seule réutilisable (WOU/DRY)
Usage: <ui:include src="/templates/components/buttons/button-icon.xhtml">
<ui:param name="icon" value="pi pi-icon-name" />
<ui:param name="action" value="#{bean.method}" />
<ui:param name="update" value="componentId" />
<ui:param name="onclick" value="javascript" />
<ui:param name="severity" value="info|success|warning|danger" />
<ui:param name="rounded" value="true" />
<ui:param name="text" value="true" />
</ui:include>
-->
<ui:fragment rendered="#{empty rendered or rendered}">
<p:commandButton
icon="#{icon}"
update="#{update}"
onclick="#{onclick}"
type="button"
disabled="#{not empty disabled and disabled}"
styleClass="#{not empty rounded and rounded ? 'ui-button-rounded' : ''} #{not empty text and text ? 'ui-button-text' : ''} #{not empty severity ? 'ui-button-' += severity : ''} #{not empty styleClass ? styleClass : ''}"
title="#{title}" />
</ui:fragment>
</ui:composition>