Package org.mojavemvc.views

Examples of org.mojavemvc.views.View


        Injector injector = (Injector) ctx.getAttribute(GuiceInitializer.KEY);
        AppProperties properties = (AppProperties) ctx.getAttribute(AppProperties.KEY);

        ServletResourceModule.set(req, res);

        View view;
        try {
           
            RequestRouter router = new HttpRequestRouter(path,
                    new HttpParameterMapSource(req), controllerDb.getRouter());
           
            RoutedRequest routed = router.route();
           
            ActionResolver resolver = new HttpActionResolver(ctx, req, httpMethod, controllerDb, injector);
   
            ActionInvoker invoker = new HttpActionInvoker(req, res, controllerDb, routed, injector);
   
            RequestProcessor requestProcessor = new RequestProcessor(resolver, invoker, errorHandler);
           
            view = requestProcessor.process(routed.getController(), routed.getAction(), properties);
   
            logger.debug("processed request for " + requestProcessor.getControllerClassName() + "; rendering...");

            view.render(req, res, properties);

        } catch (Throwable e) {

            logger.error("error processing request: ", e);
            view = errorHandler.handleError(e, properties);
            if (view != null) {
                /*
                 * we're not catching any exceptions thrown from rendering the
                 * error view
                 */
                view.render(req, res, properties);
            }
           
        } finally {
           
            ServletResourceModule.unset();
View Full Code Here

TOP

Related Classes of org.mojavemvc.views.View

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.