Package org.springframework.springfaces.mvc.context

Examples of org.springframework.springfaces.mvc.context.SpringFacesContext


    return this.delegate;
  }

  @Override
  public UIViewRoot createView(FacesContext context, String viewId) {
    SpringFacesContext springFacesContext = SpringFacesContext.getCurrentInstance();
    if (springFacesContext == null) {
      return super.createView(context, viewId);
    }
    UIViewRoot viewRoot = createViewIfInResponseToNavigation(context, viewId);
    if (viewRoot == null) {
View Full Code Here


  public Object convert(final Object source, final TypeDescriptor sourceType, final TypeDescriptor targetType) {
    if (source == null) {
      return null;
    }
    SpringFacesContext springFacesContext = SpringFacesContext.getCurrentInstance();
    FacesContext facesContext = springFacesContext.getFacesContext();
    try {
      Converter facesConverter = createFacesConverter(facesContext, targetType);
      return facesConverter.getAsObject(facesContext, null, source.toString());
    } finally {
      facesContext.release();
View Full Code Here

  private int order = -2;

  private Dispatcher dispatcher;

  public boolean handle(Exception exception, ExceptionQueuedEvent event) throws Exception {
    SpringFacesContext context = SpringFacesContext.getCurrentInstance();
    if (context != null) {
      return handle(exception, context);
    }
    return false;
  }
View Full Code Here

   * Returns the {@link DefaultSpringFacesContext}.
   * @param required if the context is required
   * @return the {@link DefaultSpringFacesContext}
   */
  private DefaultSpringFacesContext getSpringFacesContext(boolean required) {
    SpringFacesContext springFacesContext = SpringFacesContext.getCurrentInstance(required);
    if (springFacesContext == null) {
      return null;
    }
    Assert.isInstanceOf(DefaultSpringFacesContext.class, springFacesContext, "Unable to access SpringFacesContext ");
    return (DefaultSpringFacesContext) springFacesContext;
View Full Code Here

*/
public class FacesResourceRequestHandler extends WebApplicationObjectSupport implements HttpRequestHandler {

  public void handleRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException,
      IOException {
    SpringFacesContext springFacesContext = SpringFacesContext.getCurrentInstance(false);
    if (springFacesContext != null) {
      FacesContext facesContext = springFacesContext.getFacesContext();
      try {
        ResourceHandler resourceHandler = facesContext.getApplication().getResourceHandler();
        resourceHandler.handleResourceRequest(facesContext);
      } finally {
        facesContext.release();
View Full Code Here

TOP

Related Classes of org.springframework.springfaces.mvc.context.SpringFacesContext

Copyright © 2018 www.massapicom. 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.