Browse Source

add render info and minor fix

Shinsuke Sugaya 9 years ago
parent
commit
938a21425c

+ 10 - 4
src/main/java/org/codelibs/fess/app/web/admin/dataconfig/AdminDataconfigAction.java

@@ -43,7 +43,7 @@ import org.lastaflute.web.response.render.RenderData;
 import org.lastaflute.web.util.LaRequestUtil;
 import org.lastaflute.web.util.LaRequestUtil;
 
 
 /**
 /**
- * @author codelibs
+ * @author shinsuke
  * @author Keiichi Watanabe
  * @author Keiichi Watanabe
  */
  */
 public class AdminDataconfigAction extends FessAdminAction {
 public class AdminDataconfigAction extends FessAdminAction {
@@ -137,7 +137,6 @@ public class AdminDataconfigAction extends FessAdminAction {
     }
     }
 
 
     @Execute
     @Execute
-    //(token = TxToken.SAVE)
     public HtmlResponse edit(final EditForm form) {
     public HtmlResponse edit(final EditForm form) {
         validate(form, messages -> {}, () -> asListHtml());
         validate(form, messages -> {}, () -> asListHtml());
         final String id = form.id;
         final String id = form.id;
@@ -146,13 +145,20 @@ public class AdminDataconfigAction extends FessAdminAction {
         }).orElse(() -> {
         }).orElse(() -> {
             throwValidationError(messages -> messages.addErrorsCrudCouldNotFindCrudTable(GLOBAL, id), () -> asListHtml());
             throwValidationError(messages -> messages.addErrorsCrudCouldNotFindCrudTable(GLOBAL, id), () -> asListHtml());
         });
         });
+        saveToken();
         if (form.crudMode.intValue() == CrudMode.EDIT) {
         if (form.crudMode.intValue() == CrudMode.EDIT) {
             // back
             // back
             form.crudMode = CrudMode.DETAILS;
             form.crudMode = CrudMode.DETAILS;
-            return asDetailsHtml();
+            return asDetailsHtml().renderWith(data -> {
+                registerRolesAndLabels(data);
+                registerHandlerNames(data);
+            });
         } else {
         } else {
             form.crudMode = CrudMode.EDIT;
             form.crudMode = CrudMode.EDIT;
-            return asEditHtml();
+            return asEditHtml().renderWith(data -> {
+                registerRolesAndLabels(data);
+                registerHandlerNames(data);
+            });
         }
         }
     }
     }
 
 

+ 2 - 2
src/main/webapp/WEB-INF/view/admin/dataconfig/admin_dataconfig.jsp

@@ -52,8 +52,8 @@
 											<table class="table table-bordered table-striped">
 											<table class="table table-bordered table-striped">
 												<thead>
 												<thead>
 													<tr>
 													<tr>
-														<th><la:message key="labels.name" /></th>
-														<th><la:message key="labels.available" /></th>
+														<th class="col-md-8"><la:message key="labels.name" /></th>
+														<th class="col-md-4 text-center"><la:message key="labels.available" /></th>
 													</tr>
 													</tr>
 												</thead>
 												</thead>
 												<tbody>
 												<tbody>