I need show the mask in InputText field after click in hiperlink for Edit information in my FORM. When I access the form in first time the inputext fields show me the masks correctly.
Follow my code:
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.mask/1.14.11/jquery.mask.min.js"></script>
<label for="inputcpf">CPF</label>
<h:inputText class="form-control" required="false" value="#{clienteBean.cliente.cpf}" id="inputcpf" requiredMessage="Informe o CPF do cliente." pl:placeholder="Informe o CPF" />
<script type="text/javascript">
$("#inputcpf").mask("999.999.999-99");
</script>
And the EDIT part of code:
<p:column style="width:260px;" headerText="Nome" >
<f:ajax event="click" execute="@this" render="@form" listener="#{clienteBean.preparaAlteracao}">
<h:commandLink value="#{dados.nome}">
<f:param name="id" value="#{dados.id}" />
</h:commandLink>
</f:ajax>
</p:column>
After clicking on the link the data is loaded in the fields but the field with mask does not display the mask