|
@@ -19,11 +19,11 @@ import javax.annotation.Resource;
|
|
|
|
|
|
import org.codelibs.fess.app.web.base.login.FessLoginAssist;
|
|
|
import org.codelibs.fess.helper.ActivityHelper;
|
|
|
+import org.codelibs.fess.helper.ViewHelper;
|
|
|
import org.codelibs.fess.mylasta.action.FessHtmlPath;
|
|
|
import org.codelibs.fess.mylasta.action.FessMessages;
|
|
|
import org.codelibs.fess.mylasta.action.FessUserBean;
|
|
|
import org.codelibs.fess.mylasta.direction.FessConfig;
|
|
|
-import org.codelibs.fess.util.ComponentUtil;
|
|
|
import org.dbflute.hook.AccessContext;
|
|
|
import org.dbflute.optional.OptionalThing;
|
|
|
import org.lastaflute.core.time.TimeManager;
|
|
@@ -73,6 +73,9 @@ public abstract class FessBaseAction extends TypicalAction // has several interf
|
|
|
@Resource
|
|
|
protected TimeManager timeManager;
|
|
|
|
|
|
+ @Resource
|
|
|
+ protected ViewHelper viewHelper;
|
|
|
+
|
|
|
// ===================================================================================
|
|
|
// Hook
|
|
|
// ======
|
|
@@ -80,31 +83,28 @@ public abstract class FessBaseAction extends TypicalAction // has several interf
|
|
|
// you should remove the 'final' if you need to override this
|
|
|
@Override
|
|
|
public ActionResponse godHandPrologue(final ActionRuntime runtime) {
|
|
|
- return super.godHandPrologue(runtime);
|
|
|
+ return viewHelper.getActionHook().godHandPrologue(runtime, r -> super.godHandPrologue(r));
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public final ActionResponse godHandMonologue(final ActionRuntime runtime) {
|
|
|
- return super.godHandMonologue(runtime);
|
|
|
+ return viewHelper.getActionHook().godHandMonologue(runtime, r -> super.godHandMonologue(r));
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public final void godHandEpilogue(final ActionRuntime runtime) {
|
|
|
- super.godHandEpilogue(runtime);
|
|
|
+ viewHelper.getActionHook().godHandEpilogue(runtime, r -> super.godHandEpilogue(r));
|
|
|
}
|
|
|
|
|
|
// #app_customize you can customize the action hook
|
|
|
@Override
|
|
|
public ActionResponse hookBefore(final ActionRuntime runtime) { // application may override
|
|
|
- return super.hookBefore(runtime);
|
|
|
+ return viewHelper.getActionHook().hookBefore(runtime, r -> super.hookBefore(r));
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public void hookFinally(final ActionRuntime runtime) {
|
|
|
- if (runtime.getActionType().asSubclass(FessBaseAction.class) != null) {
|
|
|
- ComponentUtil.getViewHelper().registerUserData(runtime);
|
|
|
- }
|
|
|
- super.hookFinally(runtime);
|
|
|
+ viewHelper.getActionHook().hookFinally(runtime, r -> super.hookFinally(r));
|
|
|
}
|
|
|
|
|
|
// ===================================================================================
|