if you run this code:
Code: Select all
<p:commandButton value="test" process="@this" update="@this prova">
<f:setPropertyActionListener value="#{not sessionScope.visibile}" target="#{sessionScope.visibile}" />
</p:commandButton>
<p:outputPanel id="prova">
<p:inputText rendered="#{sessionScope.visibile}">
<p:keyFilter mask="email" />
</p:inputText>
</p:outputPanel>
Now, do this:
Code: Select all
<p:commandButton value="test" process="@this" update="@this prova">
<f:setPropertyActionListener value="#{not sessionScope.visibile}" target="#{sessionScope.visibile}" />
</p:commandButton>
<p:outputPanel id="prova">
<c:if test="#{sessionScope.visibile}">
<p:inputText>
<p:keyFilter mask="email" />
</p:inputText>
</c:if>
</p:outputPanel>
core.js.xhtml?ln=primefaces&v=6.2:1 Widget not available: KeyFilter
This is because in core.js, the function named PrimeFaces.getScript sends an asynchronous request to get the keyFilter script. By changing it to make a synchronous request, it solves the problem.
In PF 6.1 the request was synchronous; in PF 6.2 it has been changed to asynchronous, generating the problem.
If I change the code to make the request synchronous again, could it cause other kinds of problems?
Thanks so much.
Max