2

When I use <p:inputMask> with a mask, then the <p:ajax listener> attached to blur event is not invoked. There are no errors in the JS console. I've also tried <f:ajax listener>.

This works:

<p:inputMask required="true" value="#{bean.value}">
    <p:ajax event="blur" listener="#{bean.test}" />
</p:inputMask>
public void test() {
    System.out.println("Test");
}

Once I set the mask attribute, the listener is not invoked:

<p:inputMask required="true" value="#{bean.value}" mask="99.999-999">
    <p:ajax event="blur" listener="#{bean.test}" />
</p:inputMask>

I'm using Mojarra 2.2.3 and PrimeFaces 4.0.

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
Rodrigo
  • 385
  • 3
  • 12
  • My p:inputText was an p:inputMask. I changed it because with p:inputMask the ajax's listener is never called. – Rodrigo Sep 11 '14 at 20:18
  • Works fine for me. Are you getting any script errors in console? which version of Primefaces and Mojarra are u using? – Kishor Prakash Sep 12 '14 at 07:05
  • Works fine for me in Mojarra 2.2.8 + PrimeFaces 5.0 and 4.0. Try upgrading or otherwise post a MCVE if that piece of code of you was actually not tested in a completely blank playground project with everything set to default unless otherwise mentioned. – BalusC Sep 13 '14 at 14:53
  • It works in the new blank project I created. Now, on the main project, might it be a lib conflict? Do you have any suggestion where should I take a look at? – Rodrigo Sep 15 '14 at 13:28

0 Answers0