0

I have a PF's input text with ajax blur event and a command button that executes some action. If I enter some text in inputText and click on a commandButton, an ajax blur listener is executed, not a commandButton action, which is pretty much expected.

Example code:

<p:inputText id="inTest" value="#{bean.input}" >
    <p:ajax event="blur" listener="#{bean.doOnBlur}" />
</p:inputText>

<p:commandButton id="btnTest" action="#{bean.doBtnClick}" />

Is there any way to execute both methods sequentially (first doOnBlur and then doBtnClick) and how do I achieve that?

Using PF 5.3 (also tried with 6.0), MyFaces 2.0.17, runnino on WebSphere Portal 7 (it's a portlet).

peterremec
  • 488
  • 1
  • 15
  • 46
  • Please provide version information. Tested with PF 6.0 and Mojarra 2.1.7 on JBoss AS 7.1.1. Behaves as you ask for: first `doOnBlur` and after that `doBtnClick` is called. – irieill Aug 23 '16 at 14:28
  • @irieill I also tried with PF 6.0, MyFaces 2.0.17, running on WebSphere Portal 7 (it's a portlet). It's just a `doOnBlur` method being called. Maybe you held a mouse button down too long - that way both methods are called, but holding down a mouse button longer is not really a solution :) – peterremec Aug 24 '16 at 06:41

0 Answers0