Search in sources :

Example 1 with JspHtmlRenderingProvider

use of org.lastaflute.web.ruts.renderer.JspHtmlRenderingProvider in project fess by codelibs.

the class FessFwAssistantDirector method prepareWebDirection.

// ===================================================================================
//                                                                                Web
//                                                                               =====
@Override
protected void prepareWebDirection(final FwWebDirection direction) {
    direction.directRequest(createUserLocaleProcessProvider(), createUserTimeZoneProcessProvider());
    direction.directCookie(createCookieResourceProvider());
    direction.directAdjustment(createActionAdjustmentProvider());
    direction.directMessage(createMessageNameList(), "fess_label");
    direction.directApiCall(createApiFailureHook());
    direction.directMultipart(() -> new FessMultipartRequestHandler());
    direction.directHtmlRendering(new JspHtmlRenderingProvider() {

        @Override
        protected String getShowErrorsForwardPath(final ActionRuntime runtime) {
            if (FessAdminAction.class.isAssignableFrom(runtime.getActionType())) {
                return "/admin/error/error.jsp";
            } else {
                return "/error/system.jsp";
            }
        }

        ;
    });
}
Also used : JspHtmlRenderingProvider(org.lastaflute.web.ruts.renderer.JspHtmlRenderingProvider) FessAdminAction(org.codelibs.fess.app.web.base.FessAdminAction) ActionRuntime(org.lastaflute.web.ruts.process.ActionRuntime) FessMultipartRequestHandler(org.codelibs.fess.mylasta.direction.sponsor.FessMultipartRequestHandler)

Aggregations

FessAdminAction (org.codelibs.fess.app.web.base.FessAdminAction)1 FessMultipartRequestHandler (org.codelibs.fess.mylasta.direction.sponsor.FessMultipartRequestHandler)1 ActionRuntime (org.lastaflute.web.ruts.process.ActionRuntime)1 JspHtmlRenderingProvider (org.lastaflute.web.ruts.renderer.JspHtmlRenderingProvider)1