First Phase Listener doesn't get invoked
-----------------------------------------
Key: RF-1682
URL:
http://jira.jboss.com/jira/browse/RF-1682
Project: RichFaces
Issue Type: Bug
Affects Versions: 3.1.1
Reporter: dapeng wang
Priority: Critical
Hi,
I found the problem and it is a bug in the ajax4jsf in the class
org.ajax4jsf.resource.ResourceLifecycle. There in the method processPhaseListeners all
PhaseListener except the first 1 will be notified about the "after phase". The
loop end condition should definitely be i >= 0. Under this condition the first
listener, which is the SeamPhaseListener will not be notified.
Quote:
private void processPhaseListeners(PhaseListener[] phaseListeners,
PhaseEvent phaseEvent, boolean beforePhase) {
if (beforePhase) {
// Invoke before phase listeners
for (int i = 0; i < phaseListeners.length; i++) {
PhaseListener phaseListener = phaseListeners ;
invokePhaseListener(phaseListener, phaseEvent, beforePhase);
}
} else {
// Invoke after phase listeners, in reverse order.
for (int i = phaseListeners.length - 1; i > 0 ; i--) {
PhaseListener phaseListener = phaseListeners ;
invokePhaseListener(phaseListener, phaseEvent, beforePhase);
}
}
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira