myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From janw <>
Subject Re: Render Response phase is skipped
Date Thu, 05 Oct 2006 16:06:59 GMT

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
But I defined PhaseID = RENDER_RESPONSE (it didn't work for me with

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.


  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:"+
      else {
View this message in context:
Sent from the MyFaces - Users mailing list archive at

View raw message