Are you sure that the phaseListener is not more than one time configured?

Put a log statement in the Constructor to see how many instances are created.

2006/9/26, Iordanov, Borislav (GIC) <[EMAIL PROTECTED]>:




Are you using this in portlets?



 ________________________________


From: a k [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 26, 2006 4:29 PM
 To: MyFaces Discussion
 Subject: Re: PhaseListener getting called multiple times





 I have this in my Listener impl class:

     public PhaseId getPhaseId() {
         return PhaseId.RENDER_RESPONSE;
     }

 Not sure why it is getting called exactly 4 times. Also, there are more
phases than 4.




On 9/26/06, John <[EMAIL PROTECTED]> wrote:


It sounds like it's getting called for each phase.



Be sure and define a getPhaseId() so it knows what phase to pay attention
to.





public PhaseId getPhaseId() {
         return PhaseId.RESTORE_VIEW;
  }


 ________________________________


From: a k [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 26, 2006 1:21 PM
 To: MyFaces Discussion
 Subject: PhaseListener getting called multiple times


Hi,

 I followed this article to show more meaningful validation messages at the
top of the page.
http://www.oracle.com/technology/pub/articles/masterj2ee/j2ee_wk7.html

 What I am noticing is that the Phase Listener is getting called multiple
times (4 to be precise) per request. So instead of getting something like
 "Field Name: Please enter a valid value." I am getting "Field Name: Field
Name: Field Name: Field Name: Please enter a valid value."

 Could some one point me in the right direction?

 Thanks!




Reply via email to