Package javax.faces.context

Examples of javax.faces.context.FacesContext.renderResponse()


        NavigationHandler navigationHandler = application.getNavigationHandler();
        navigationHandler.handleNavigation(facesContext,
                                           fromAction,
                                           outcome);
    //Render Response if needed
    facesContext.renderResponse();

    }
}
View Full Code Here


      Object isImmediate = comp.getAttributes().get(immediateAttr);
      if (Boolean.TRUE.equals(isImmediate))
      {
        event.setPhaseId(PhaseId.ANY_PHASE);
        FacesContext context = FacesContext.getCurrentInstance();
        context.renderResponse();
      }
      else
      {
        // the event should not execute before model updates are done.
        // otherwise, the updates will be done to the wrong rows.
View Full Code Here

        }
       
        NavigationHandler navigationHandler = application.getNavigationHandler();
        navigationHandler.handleNavigation(facesContext, fromAction, outcome);
        //Render Response if needed
        facesContext.renderResponse();

    }
}
View Full Code Here

    if (event.getPhaseId() == PhaseId.RESTORE_VIEW)
    {
      FacesContext context = event.getFacesContext();
      // Now restore the Faces Messages
      restoreFacesMessageState(context);
      context.renderResponse();
    }
  }

  private final class LRUMap
    extends LinkedHashMap<String, Map<String, Object>>
View Full Code Here

          LOG.error("", e);
          FacesContext facesContext = facesContextFactory.getFacesContext(context, request, response, lifecycle);
          // TODO  better Message i18n Message?
          FacesMessage facesMessage = new FacesMessage(e.getCause().getMessage());
          facesContext.addMessage(null, facesMessage);
          facesContext.renderResponse();
          return facesContext;
        }
      }
    }
    return facesContextFactory.getFacesContext(context, request, response, lifecycle);
View Full Code Here

      logger.debug("No action event detected");
      context.getExternalContext().getRequestMap().remove(JsfView.EVENT_KEY);
    }
    // tells JSF lifecycle that rendering should now happen and any subsequent phases should be skipped
    // required in the case of this action listener firing immediately (immediate=true) before validation
    context.renderResponse();
  }

  // internal helpers

  private boolean validateModel(FacesContext facesContext, String eventId) {
View Full Code Here

    facesContext.setViewRoot(viewRoot);

    JsfUtils.notifyAfterListeners(PhaseId.RESTORE_VIEW, facesLifecycle, facesContext);

    facesContext.setViewRoot(viewRoot);
    facesContext.renderResponse();
    try {
      JsfUtils.notifyBeforeListeners(PhaseId.RENDER_RESPONSE, facesLifecycle, facesContext);
      logger.debug("Asking view handler to render view");
      facesContext.getApplication().getViewHandler().renderView(facesContext, viewRoot);
      JsfUtils.notifyAfterListeners(PhaseId.RENDER_RESPONSE, facesLifecycle, facesContext);
View Full Code Here

      String navBinding =
          (null != binding) ? binding.getExpressionString() : null;
      navHandler.handleNavigation(facesContext, navBinding,
          errorOutcome);
      // Trigger a switch to Render Response if needed
      facesContext.renderResponse();
    }
  }

  public String getErrorOutcome() {
    return errorOutcome;
View Full Code Here

               messageStr,
               messageStr);
         }
         context.getExternalContext().log(message.getSummary(), result);
         context.addMessage(getClientId(context), message);
         context.renderResponse();
       } catch (IllegalArgumentException e) {
         FacesMessage message =
           MessageUtil.getMessage(context, UIInput.UPDATE_MESSAGE_ID,
               new Object[] { MessageUtil.getLabel(
                   context, this) });
View Full Code Here

           MessageUtil.getMessage(context, UIInput.UPDATE_MESSAGE_ID,
               new Object[] { MessageUtil.getLabel(
                   context, this) });
         context.getExternalContext().log(message.getSummary(), e);
         context.addMessage(getClientId(context), message);
         context.renderResponse();
       } catch (Exception e) {
         FacesMessage message =
           MessageUtil.getMessage(context, UIInput.UPDATE_MESSAGE_ID,
               new Object[] { MessageUtil.getLabel(
                   context, this) });
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.