<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 champ texte réutilisable (WOU/DRY)
        Usage: <ui:include src="/templates/components/forms/form-field-text.xhtml">
                  <ui:param name="id" value="fieldId" />
                  <ui:param name="label" value="Label du champ" />
                  <ui:param name="value" value="#{bean.property}" />
                  <ui:param name="required" value="true" />
                  <ui:param name="placeholder" value="Placeholder" />
                </ui:include>
    -->
    
    <div class="field">
        <p:outputLabel for="#{id}" value="#{label}" />
        <p:inputText id="#{id}" 
                    value="#{value}" 
                    required="#{not empty required and required}"
                    placeholder="#{placeholder}"
                    readonly="#{not empty readonly and readonly}"
                    styleClass="w-full" />
    </div>
</ui:composition>

