Package org.apache.isis.viewer.html.request

Examples of org.apache.isis.viewer.html.request.Request


    }

    private void runAction(final Context context, final Request request, final Page page) {
        try {
            ACCESS_LOG.info("request " + request.toString());
            Request r = request;
            final DebugString debug = new DebugString();
            debug.startSection("Request");
            debug.appendln("http", request.toString());
            debug.endSection();
            do {
                final Action action = (Action) actions.get(r.getRequestType());
                try {
                    action.execute(r, context, page);
                } catch (final ObjectLookupException e) {
                    final String error = "The object/service you selected has timed out.  Please navigate to the object via the history bar.";
                    displayError(context, page, error);
                } catch (final TaskLookupException e) {
                    final String error = "The task you went back to has already been completed or cancelled.  Please start the task again.";
                    displayError(context, page, error);
                }
                r = r.getForward();
                if (r != null) {
                    LOG.debug("forward to " + r);
                }
            } while (r != null);
            if (LOG.isDebugEnabled()) {
View Full Code Here


            throw new ActionException("No task action: " + button);
        }
    }

    private void forwardCancel(final Request request, final Context context, final Task task) {
        final Request cancelTask = context.cancelTask(task);
        request.forward(cancelTask);
    }
View Full Code Here

    private void processRequest(final HttpServletRequest request, final HttpServletResponse response)
        throws ServletException, IOException {
        LOG.info("request: " + request.getServletPath() + "?" + request.getQueryString());

        final Request req = new ServletRequest(request);

        if (req.getRequestType() == null) {
            throw new ServletException("No action specified");
        } else if (!controller.actionExists(req)) {
            throw new ServletException("No such action " + req.getRequestType());
        } else {
            try {
                final Context context = getContextForRequest(request);
                processRequest(request, response, req, context);
            } catch (final Exception e) {
View Full Code Here

    }

    private void processRequest(final HttpServletRequest request, final HttpServletResponse response) throws ServletException, IOException {
        LOG.info("request: " + request.getServletPath() + "?" + request.getQueryString());

        final Request req = new ServletRequest(request);

        if (req.getRequestType() == null) {
            throw new ServletException("No action specified");
        } else if (!controller.actionExists(req)) {
            throw new ServletException("No such action " + req.getRequestType());
        } else {
            try {
                final Context context = getContextForRequest(request);
                processRequest(request, response, req, context);
            } catch (final Exception e) {
View Full Code Here

    }

    private void runAction(final Context context, final Request request, final Page page) {
        try {
            ACCESS_LOG.info("request " + request.toString());
            Request r = request;
            final DebugString debug = new DebugString();
            debug.startSection("Request");
            debug.appendln("http", request.toString());
            debug.endSection();
            do {
                final Action action = (Action) actions.get(r.getRequestType());
                try {
                    action.execute(r, context, page);
                } catch (final ObjectLookupException e) {
                    final String error = "The object/service you selected has timed out.  Please navigate to the object via the history bar.";
                    displayError(context, page, error);
                } catch (final TaskLookupException e) {
                    final String error = "The task you went back to has already been completed or cancelled.  Please start the task again.";
                    displayError(context, page, error);
                }
                r = r.getForward();
                if (r != null) {
                    LOG.debug("forward to " + r);
                }
            } while (r != null);
            if (LOG.isDebugEnabled()) {
View Full Code Here

    }

    private void runAction(final Context context, final Request request, final Page page) {
        try {
            ACCESS_LOG.info("request " + request.toString());
            Request r = request;
            final DebugString debug = new DebugString();
            debug.startSection("Request");
            debug.appendln("http", request.toString());
            debug.endSection();
            do {
                final Action action = (Action) actions.get(r.getRequestType());
                try {
                    action.execute(r, context, page);
                } catch (final ObjectLookupException e) {
                    final String error =
                        "The object/service you selected has timed out.  Please navigate to the object via the history bar.";
                    displayError(context, page, error);
                } catch (final TaskLookupException e) {
                    final String error =
                        "The task you went back to has already been completed or cancelled.  Please start the task again.";
                    displayError(context, page, error);
                }
                r = r.getForward();
                if (r != null) {
                    LOG.debug("forward to " + r);
                }
            } while (r != null);
            if (LOG.isDebugEnabled()) {
View Full Code Here

            throw new ActionException("No task action: " + button);
        }
    }

    private void forwardCancel(final Request request, final Context context, final Task task) {
        final Request cancelTask = context.cancelTask(task);
        request.forward(cancelTask);
    }
View Full Code Here

    private void processRequest(final HttpServletRequest request, final HttpServletResponse response)
        throws ServletException, IOException {
        LOG.info("request: " + request.getServletPath() + "?" + request.getQueryString());

        final Request req = new ServletRequest(request);

        if (req.getRequestType() == null) {
            throw new ServletException("No action specified");
        } else if (!controller.actionExists(req)) {
            throw new ServletException("No such action " + req.getRequestType());
        } else {
            try {
                final Context context = getContextForRequest(request);
                processRequest(request, response, req, context);
            } catch (final Exception e) {
View Full Code Here

TOP

Related Classes of org.apache.isis.viewer.html.request.Request

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.