After your responses I thought the mistake must be on my side.
And I found the reason:
I used another PhaseListener (let it be listener_1), one that works like the
one from Cagatay
(http://www.jroller.com/page/cagataycivici?entry=managed_beans_aware_of_the).
But I defined PhaseID = RENDER_RESPONSE (it didn't work for me with
Restore_View).
So the mistake was in beforePhase() of listener_1.
The variable "managedBeanName" might be empty in my case.
When then calling createValueBinding("${}"), an exception was thrown (and
not caught).
I don't know why beforePhase() then is not called for further listeners, but
now I know the reason and could solve it.
Thanks for the hints.
Jan
public void beforePhase(PhaseEvent phaseEvent) {
String viewId = phaseEvent.getFacesContext().getViewRoot().getViewId();
if (viewId.endsWith(".jsf") || viewId.endsWith(".jsp")) {
String managedBeanName = getManagedBeanNameFromView(viewId);
// --- The next line could throw the exception ---
Object object = facesContext.getApplication().createValueBinding("#{"
+ managedBeanName + "}").getValue(facesContext);
if (object == null){
logger.error("OnPageLoad cannot be executed, no such managed bean:"+
managedBeanName);
}
else {
...
}
}
--
View this message in context:
http://www.nabble.com/Render-Response-phase-is-skipped-tf2388227.html#a6662527
Sent from the MyFaces - Users mailing list archive at Nabble.com.