瀏覽代碼

fix issues config items are empty if validation error

Kaoru FUZITA 9 年之前
父節點
當前提交
f545945a98

+ 10 - 13
src/main/java/org/codelibs/fess/app/web/admin/fileauth/AdminFileauthAction.java

@@ -146,16 +146,10 @@ public class AdminFileauthAction extends FessAdminAction {
         if (form.crudMode.intValue() == CrudMode.EDIT) {
         if (form.crudMode.intValue() == CrudMode.EDIT) {
             // back
             // back
             form.crudMode = CrudMode.DETAILS;
             form.crudMode = CrudMode.DETAILS;
-            return asDetailsHtml().renderWith(data -> {
-                registerProtocolSchemeItems(data);
-                registerFileConfigItems(data);
-            });
+            return asDetailsHtml();
         } else {
         } else {
             form.crudMode = CrudMode.EDIT;
             form.crudMode = CrudMode.EDIT;
-            return asEditHtml().renderWith(data -> {
-                registerProtocolSchemeItems(data);
-                registerFileConfigItems(data);
-            });
+            return asEditHtml();
         }
         }
     }
     }
 
 
@@ -177,9 +171,6 @@ public class AdminFileauthAction extends FessAdminAction {
                     throwValidationError(messages -> messages.addErrorsCrudCouldNotFindCrudTable(GLOBAL, id), () -> asListHtml());
                     throwValidationError(messages -> messages.addErrorsCrudCouldNotFindCrudTable(GLOBAL, id), () -> asListHtml());
                 });
                 });
             });
             });
-        }).renderWith(data -> {
-            registerProtocolSchemeItems(data);
-            registerFileConfigItems(data);
         });
         });
     }
     }
 
 
@@ -315,10 +306,16 @@ public class AdminFileauthAction extends FessAdminAction {
     }
     }
 
 
     private HtmlResponse asEditHtml() {
     private HtmlResponse asEditHtml() {
-        return asHtml(path_AdminFileauth_AdminFileauthEditJsp);
+        return asHtml(path_AdminFileauth_AdminFileauthEditJsp).renderWith(data -> {
+            registerProtocolSchemeItems(data);
+            registerFileConfigItems(data);
+        });
     }
     }
 
 
     private HtmlResponse asDetailsHtml() {
     private HtmlResponse asDetailsHtml() {
-        return asHtml(path_AdminFileauth_AdminFileauthDetailsJsp);
+        return asHtml(path_AdminFileauth_AdminFileauthDetailsJsp).renderWith(data -> {
+            registerProtocolSchemeItems(data);
+            registerFileConfigItems(data);
+        });
     }
     }
 }
 }

+ 10 - 13
src/main/java/org/codelibs/fess/app/web/admin/reqheader/AdminReqheaderAction.java

@@ -147,16 +147,10 @@ public class AdminReqheaderAction extends FessAdminAction {
         if (form.crudMode.intValue() == CrudMode.EDIT) {
         if (form.crudMode.intValue() == CrudMode.EDIT) {
             // back
             // back
             form.crudMode = CrudMode.DETAILS;
             form.crudMode = CrudMode.DETAILS;
-            return asDetailsHtml().renderWith(data -> {
-                registerProtocolSchemeItems(data);
-                registerWebConfigItems(data);
-            });
+            return asDetailsHtml();
         } else {
         } else {
             form.crudMode = CrudMode.EDIT;
             form.crudMode = CrudMode.EDIT;
-            return asEditHtml().renderWith(data -> {
-                registerProtocolSchemeItems(data);
-                registerWebConfigItems(data);
-            });
+            return asEditHtml();
         }
         }
     }
     }
 
 
@@ -178,9 +172,6 @@ public class AdminReqheaderAction extends FessAdminAction {
                     throwValidationError(messages -> messages.addErrorsCrudCouldNotFindCrudTable(GLOBAL, id), () -> asListHtml());
                     throwValidationError(messages -> messages.addErrorsCrudCouldNotFindCrudTable(GLOBAL, id), () -> asListHtml());
                 });
                 });
             });
             });
-        }).renderWith(data -> {
-            registerProtocolSchemeItems(data);
-            registerWebConfigItems(data);
         });
         });
     }
     }
 
 
@@ -318,10 +309,16 @@ public class AdminReqheaderAction extends FessAdminAction {
     }
     }
 
 
     private HtmlResponse asEditHtml() {
     private HtmlResponse asEditHtml() {
-        return asHtml(path_AdminReqheader_AdminReqheaderEditJsp);
+        return asHtml(path_AdminReqheader_AdminReqheaderEditJsp).renderWith(data -> {
+            registerProtocolSchemeItems(data);
+            registerWebConfigItems(data);
+        });
     }
     }
 
 
     private HtmlResponse asDetailsHtml() {
     private HtmlResponse asDetailsHtml() {
-        return asHtml(path_AdminReqheader_AdminReqheaderDetailsJsp);
+        return asHtml(path_AdminReqheader_AdminReqheaderDetailsJsp).renderWith(data -> {
+            registerProtocolSchemeItems(data);
+            registerWebConfigItems(data);
+        });
     }
     }
 }
 }

+ 10 - 13
src/main/java/org/codelibs/fess/app/web/admin/webauth/AdminWebauthAction.java

@@ -146,16 +146,10 @@ public class AdminWebauthAction extends FessAdminAction {
         if (form.crudMode.intValue() == CrudMode.EDIT) {
         if (form.crudMode.intValue() == CrudMode.EDIT) {
             // back
             // back
             form.crudMode = CrudMode.DETAILS;
             form.crudMode = CrudMode.DETAILS;
-            return asDetailsHtml().renderWith(data -> {
-                registerProtocolSchemeItems(data);
-                registerWebConfigItems(data);
-            });
+            return asDetailsHtml();
         } else {
         } else {
             form.crudMode = CrudMode.EDIT;
             form.crudMode = CrudMode.EDIT;
-            return asEditHtml().renderWith(data -> {
-                registerProtocolSchemeItems(data);
-                registerWebConfigItems(data);
-            });
+            return asEditHtml();
         }
         }
     }
     }
 
 
@@ -177,9 +171,6 @@ public class AdminWebauthAction extends FessAdminAction {
                     throwValidationError(messages -> messages.addErrorsCrudCouldNotFindCrudTable(GLOBAL, id), () -> asListHtml());
                     throwValidationError(messages -> messages.addErrorsCrudCouldNotFindCrudTable(GLOBAL, id), () -> asListHtml());
                 });
                 });
             });
             });
-        }).renderWith(data -> {
-            registerProtocolSchemeItems(data);
-            registerWebConfigItems(data);
         });
         });
     }
     }
 
 
@@ -317,10 +308,16 @@ public class AdminWebauthAction extends FessAdminAction {
     }
     }
 
 
     private HtmlResponse asEditHtml() {
     private HtmlResponse asEditHtml() {
-        return asHtml(path_AdminWebauth_AdminWebauthEditJsp);
+        return asHtml(path_AdminWebauth_AdminWebauthEditJsp).renderWith(data -> {
+            registerProtocolSchemeItems(data);
+            registerWebConfigItems(data);
+        });
     }
     }
 
 
     private HtmlResponse asDetailsHtml() {
     private HtmlResponse asDetailsHtml() {
-        return asHtml(path_AdminWebauth_AdminWebauthDetailsJsp);
+        return asHtml(path_AdminWebauth_AdminWebauthDetailsJsp).renderWith(data -> {
+            registerProtocolSchemeItems(data);
+            registerWebConfigItems(data);
+        });
     }
     }
 }
 }

+ 4 - 4
src/main/java/org/codelibs/fess/mylasta/action/FessLabels.java

@@ -266,10 +266,10 @@ public class FessLabels extends ActionMessages {
     /** The key of the message: Failure Count */
     /** The key of the message: Failure Count */
     public static final String LABELS_FAILURE_COUNT_THRESHOLD = "{labels.failureCountThreshold}";
     public static final String LABELS_FAILURE_COUNT_THRESHOLD = "{labels.failureCountThreshold}";
 
 
-    /** The key of the message: Config Name */
+    /** The key of the message: FS Config Name */
     public static final String LABELS_FILE_CONFIG_NAME = "{labels.fileConfigName}";
     public static final String LABELS_FILE_CONFIG_NAME = "{labels.fileConfigName}";
 
 
-    /** The key of the message: FS Config Name */
+    /** The key of the message: FS Config ID */
     public static final String LABELS_FILE_CONFIG_ID = "{labels.fileConfigId}";
     public static final String LABELS_FILE_CONFIG_ID = "{labels.fileConfigId}";
 
 
     /** The key of the message: File name */
     /** The key of the message: File name */
@@ -419,10 +419,10 @@ public class FessLabels extends ActionMessages {
     /** The key of the message: XML Response */
     /** The key of the message: XML Response */
     public static final String LABELS_WEB_API_XML = "{labels.webApiXml}";
     public static final String LABELS_WEB_API_XML = "{labels.webApiXml}";
 
 
-    /** The key of the message: ID */
+    /** The key of the message: Web Config ID */
     public static final String LABELS_WEB_CONFIG_ID = "{labels.webConfigId}";
     public static final String LABELS_WEB_CONFIG_ID = "{labels.webConfigId}";
 
 
-    /** The key of the message: Config Name */
+    /** The key of the message: Web Config Name */
     public static final String LABELS_WEB_CONFIG_NAME = "{labels.webConfigName}";
     public static final String LABELS_WEB_CONFIG_NAME = "{labels.webConfigName}";
 
 
     /** The key of the message: All Languages */
     /** The key of the message: All Languages */

+ 6 - 6
src/main/resources/fess_label.properties

@@ -36,7 +36,7 @@ labels.userAgent=User Agent
 labels.username=Username
 labels.username=Username
 labels.value=Value
 labels.value=Value
 labels.versionNo=Version No.
 labels.versionNo=Version No.
-labels.webConfigId=Web Config Name
+labels.webConfigId=Web Config Id
 labels.logFileName=Log File Name
 labels.logFileName=Log File Name
 labels.cronExpression=Schedule
 labels.cronExpression=Schedule
 labels.dayForCleanup=Remove Index Before Days
 labels.dayForCleanup=Remove Index Before Days
@@ -80,9 +80,9 @@ labels.errorLog=Error Log
 labels.errorName=Error Name
 labels.errorName=Error Name
 labels.expiredTime=Expired
 labels.expiredTime=Expired
 labels.failureCountThreshold=Failure Count
 labels.failureCountThreshold=Failure Count
-labels.fileConfigId=ID
-labels.fileConfigName=Config Name
-labels.fileConfigId=FS Config Name
+labels.fileConfigId=FS Config ID
+labels.fileConfigName=FS Config Name
+labels.fileConfigId=FS Config ID
 labels.fileName=File name
 labels.fileName=File name
 labels.groupName=Solr Group
 labels.groupName=Solr Group
 labels.handlerName=Handler Name
 labels.handlerName=Handler Name
@@ -132,8 +132,8 @@ labels.userInfo=User Info
 labels.userSessionId=User ID
 labels.userSessionId=User ID
 labels.webApiJson=JSON Response
 labels.webApiJson=JSON Response
 labels.webApiXml=XML Response
 labels.webApiXml=XML Response
-labels.webConfigId=ID
-labels.webConfigName=Config Name
+labels.webConfigId=Web Config ID
+labels.webConfigName=Web Config Name
 labels.allLanguages=All Languages
 labels.allLanguages=All Languages
 labels.dictId=Dictionary ID
 labels.dictId=Dictionary ID
 labels.docId=Document ID
 labels.docId=Document ID