41 lines
1.8 KiB
HTML
41 lines
1.8 KiB
HTML
<html xmlns="http://www.w3.org/1999/xhtml"
|
|
xmlns:composite="http://xmlns.jcp.org/jsf/composite"
|
|
xmlns:h="http://xmlns.jcp.org/jsf/html"
|
|
xmlns:p="http://primefaces.org/ui">
|
|
|
|
<!--
|
|
Composant Composite pour champ texte réutilisable avec binding bidirectionnel
|
|
Usage: <uf:inputText id="nom" label="Nom" value="#{bean.nom}" required="true" />
|
|
-->
|
|
|
|
<composite:interface>
|
|
<composite:attribute name="id" required="true" type="java.lang.String" />
|
|
<composite:attribute name="label" required="true" type="java.lang.String" />
|
|
<composite:attribute name="value" required="true" />
|
|
<composite:attribute name="required" type="java.lang.Boolean" default="false" />
|
|
<composite:attribute name="placeholder" type="java.lang.String" default="" />
|
|
<composite:attribute name="disabled" type="java.lang.Boolean" default="false" />
|
|
<composite:attribute name="readonly" type="java.lang.Boolean" default="false" />
|
|
<composite:attribute name="styleClass" type="java.lang.String" default="" />
|
|
<composite:attribute name="maxlength" type="java.lang.Integer" />
|
|
</composite:interface>
|
|
|
|
<composite:implementation>
|
|
<div class="field">
|
|
<p:outputLabel for="#{cc.clientId}:input" value="#{cc.attrs.label}" />
|
|
<p:inputText id="input"
|
|
value="#{cc.attrs.value}"
|
|
required="#{cc.attrs.required}"
|
|
requiredMessage="#{cc.attrs.label} est obligatoire"
|
|
placeholder="#{cc.attrs.placeholder}"
|
|
disabled="#{cc.attrs.disabled}"
|
|
readonly="#{cc.attrs.readonly}"
|
|
maxlength="#{cc.attrs.maxlength}"
|
|
styleClass="w-full #{cc.attrs.styleClass}" />
|
|
<p:message for="#{cc.clientId}:input" />
|
|
</div>
|
|
</composite:implementation>
|
|
|
|
</html>
|
|
|