0

I have an inputText field like this:

<p:inputText value="#{backend.longAttribute}" converterMessage="Must be a number">
  <p:ajax event="blur" update="something" />
</p:inputText>

The inputText goes to an attribute of type Long. When I write something there, and click a button, then the message "Must be a number" is gonna show. In Chrome everything is fine. I write "abc", and the message shows up. In Internet explorer, I have to first click it one time, then another time for the message to show.

Any idea? Im using PrimeFaces 5.8 or something. Its not 6.

Edit:

So my problem was this: <p:ajax event="blur" update="something" /> When I write something in the inputText field, and click my commandButton without clicking or doing anything else, then then only the blur will activate. If I click out of the inputText field first, so the blur will finish first, then I only need to click the button once. Anyone have any idea for how to let commandButtons action be called right after blur, without clicking twise?

Example for when I need it:

I have an input field. The data in the field should have this format: 1:00. When a user write the number 1 then the ajax event will add the :00. But I also want the user to be able to write 1, and the click a button without first having to take focus away from the inputfield first.

Kims
  • 405
  • 1
  • 5
  • 15
  • ?????_Any idea? Im using PrimeFaces 5.8 or something. Its not 6._ Seriously... You don't know the version you are using or whether it exists at all??? And IE6 is not supported!an – Kukeltje Jul 27 '17 at 08:18
  • does it work with a plain jsf inputText and ajax tag? – Kukeltje Jul 27 '17 at 09:10
  • I changed to , and use , but the problem is still there. I have to click 2 times for the errormessage to show. And it is still only on internet explorer – Kims Jul 27 '17 at 10:23
  • So it is effectively not a PrimeFaces but already/also a plain jsf one... See https://stackoverflow.com/questions/24635536/different-behavior-of-blur-event-in-different-browsers and https://stackoverflow.com/questions/17769005/onclick-and-onblur-ordering-issue/28963938#28963938 – Kukeltje Jul 27 '17 at 12:18

0 Answers0