|
@@ -15,6 +15,10 @@
|
|
|
*/
|
|
|
package org.codelibs.fess.app.web.admin.keymatch;
|
|
|
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
|
import org.codelibs.fess.Constants;
|
|
@@ -23,6 +27,7 @@ import org.codelibs.fess.app.service.KeyMatchService;
|
|
|
import org.codelibs.fess.app.web.CrudMode;
|
|
|
import org.codelibs.fess.app.web.base.FessAdminAction;
|
|
|
import org.codelibs.fess.es.config.exentity.KeyMatch;
|
|
|
+import org.codelibs.fess.helper.KeyMatchHelper;
|
|
|
import org.codelibs.fess.util.ComponentUtil;
|
|
|
import org.codelibs.fess.util.RenderDataUtil;
|
|
|
import org.dbflute.optional.OptionalEntity;
|
|
@@ -42,6 +47,8 @@ public class AdminKeymatchAction extends FessAdminAction {
|
|
|
// Attribute
|
|
|
// =========
|
|
|
@Resource
|
|
|
+ private KeyMatchHelper keyMatchHelper;
|
|
|
+ @Resource
|
|
|
private KeyMatchService keyMatchService;
|
|
|
@Resource
|
|
|
private KeyMatchPager keyMatchPager;
|
|
@@ -142,6 +149,7 @@ public class AdminKeymatchAction extends FessAdminAction {
|
|
|
public HtmlResponse details(final int crudMode, final String id) {
|
|
|
verifyCrudMode(crudMode, CrudMode.DETAILS);
|
|
|
saveToken();
|
|
|
+ final List<Map<String, Object>> docList = new ArrayList<>();
|
|
|
return asHtml(path_AdminKeymatch_AdminKeymatchDetailsJsp).useForm(EditForm.class, op -> {
|
|
|
op.setup(form -> {
|
|
|
keyMatchService.getKeyMatch(id).ifPresent(entity -> {
|
|
@@ -149,10 +157,13 @@ public class AdminKeymatchAction extends FessAdminAction {
|
|
|
copyOp.excludeNull();
|
|
|
});
|
|
|
form.crudMode = crudMode;
|
|
|
+ docList.addAll(keyMatchHelper.getBoostedDocumentList(entity.getTerm(), entity.getMaxSize()));
|
|
|
}).orElse(() -> {
|
|
|
throwValidationError(messages -> messages.addErrorsCrudCouldNotFindCrudTable(GLOBAL, id), () -> asListHtml());
|
|
|
});
|
|
|
});
|
|
|
+ }).renderWith(data -> {
|
|
|
+ data.register("docs", docList);
|
|
|
});
|
|
|
}
|
|
|
|