fix issues config items are empty if validation error
This commit is contained in:
parent
e369570bb7
commit
f545945a98
5 changed files with 40 additions and 49 deletions
|
@ -146,16 +146,10 @@ public class AdminFileauthAction extends FessAdminAction {
|
|||
if (form.crudMode.intValue() == CrudMode.EDIT) {
|
||||
// back
|
||||
form.crudMode = CrudMode.DETAILS;
|
||||
return asDetailsHtml().renderWith(data -> {
|
||||
registerProtocolSchemeItems(data);
|
||||
registerFileConfigItems(data);
|
||||
});
|
||||
return asDetailsHtml();
|
||||
} else {
|
||||
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());
|
||||
});
|
||||
});
|
||||
}).renderWith(data -> {
|
||||
registerProtocolSchemeItems(data);
|
||||
registerFileConfigItems(data);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -315,10 +306,16 @@ public class AdminFileauthAction extends FessAdminAction {
|
|||
}
|
||||
|
||||
private HtmlResponse asEditHtml() {
|
||||
return asHtml(path_AdminFileauth_AdminFileauthEditJsp);
|
||||
return asHtml(path_AdminFileauth_AdminFileauthEditJsp).renderWith(data -> {
|
||||
registerProtocolSchemeItems(data);
|
||||
registerFileConfigItems(data);
|
||||
});
|
||||
}
|
||||
|
||||
private HtmlResponse asDetailsHtml() {
|
||||
return asHtml(path_AdminFileauth_AdminFileauthDetailsJsp);
|
||||
return asHtml(path_AdminFileauth_AdminFileauthDetailsJsp).renderWith(data -> {
|
||||
registerProtocolSchemeItems(data);
|
||||
registerFileConfigItems(data);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -147,16 +147,10 @@ public class AdminReqheaderAction extends FessAdminAction {
|
|||
if (form.crudMode.intValue() == CrudMode.EDIT) {
|
||||
// back
|
||||
form.crudMode = CrudMode.DETAILS;
|
||||
return asDetailsHtml().renderWith(data -> {
|
||||
registerProtocolSchemeItems(data);
|
||||
registerWebConfigItems(data);
|
||||
});
|
||||
return asDetailsHtml();
|
||||
} else {
|
||||
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());
|
||||
});
|
||||
});
|
||||
}).renderWith(data -> {
|
||||
registerProtocolSchemeItems(data);
|
||||
registerWebConfigItems(data);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -318,10 +309,16 @@ public class AdminReqheaderAction extends FessAdminAction {
|
|||
}
|
||||
|
||||
private HtmlResponse asEditHtml() {
|
||||
return asHtml(path_AdminReqheader_AdminReqheaderEditJsp);
|
||||
return asHtml(path_AdminReqheader_AdminReqheaderEditJsp).renderWith(data -> {
|
||||
registerProtocolSchemeItems(data);
|
||||
registerWebConfigItems(data);
|
||||
});
|
||||
}
|
||||
|
||||
private HtmlResponse asDetailsHtml() {
|
||||
return asHtml(path_AdminReqheader_AdminReqheaderDetailsJsp);
|
||||
return asHtml(path_AdminReqheader_AdminReqheaderDetailsJsp).renderWith(data -> {
|
||||
registerProtocolSchemeItems(data);
|
||||
registerWebConfigItems(data);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -146,16 +146,10 @@ public class AdminWebauthAction extends FessAdminAction {
|
|||
if (form.crudMode.intValue() == CrudMode.EDIT) {
|
||||
// back
|
||||
form.crudMode = CrudMode.DETAILS;
|
||||
return asDetailsHtml().renderWith(data -> {
|
||||
registerProtocolSchemeItems(data);
|
||||
registerWebConfigItems(data);
|
||||
});
|
||||
return asDetailsHtml();
|
||||
} else {
|
||||
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());
|
||||
});
|
||||
});
|
||||
}).renderWith(data -> {
|
||||
registerProtocolSchemeItems(data);
|
||||
registerWebConfigItems(data);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -317,10 +308,16 @@ public class AdminWebauthAction extends FessAdminAction {
|
|||
}
|
||||
|
||||
private HtmlResponse asEditHtml() {
|
||||
return asHtml(path_AdminWebauth_AdminWebauthEditJsp);
|
||||
return asHtml(path_AdminWebauth_AdminWebauthEditJsp).renderWith(data -> {
|
||||
registerProtocolSchemeItems(data);
|
||||
registerWebConfigItems(data);
|
||||
});
|
||||
}
|
||||
|
||||
private HtmlResponse asDetailsHtml() {
|
||||
return asHtml(path_AdminWebauth_AdminWebauthDetailsJsp);
|
||||
return asHtml(path_AdminWebauth_AdminWebauthDetailsJsp).renderWith(data -> {
|
||||
registerProtocolSchemeItems(data);
|
||||
registerWebConfigItems(data);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -266,10 +266,10 @@ public class FessLabels extends ActionMessages {
|
|||
/** The key of the message: Failure Count */
|
||||
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}";
|
||||
|
||||
/** 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}";
|
||||
|
||||
/** The key of the message: File name */
|
||||
|
@ -419,10 +419,10 @@ public class FessLabels extends ActionMessages {
|
|||
/** The key of the message: XML Response */
|
||||
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}";
|
||||
|
||||
/** 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}";
|
||||
|
||||
/** The key of the message: All Languages */
|
||||
|
|
|
@ -36,7 +36,7 @@ labels.userAgent=User Agent
|
|||
labels.username=Username
|
||||
labels.value=Value
|
||||
labels.versionNo=Version No.
|
||||
labels.webConfigId=Web Config Name
|
||||
labels.webConfigId=Web Config Id
|
||||
labels.logFileName=Log File Name
|
||||
labels.cronExpression=Schedule
|
||||
labels.dayForCleanup=Remove Index Before Days
|
||||
|
@ -80,9 +80,9 @@ labels.errorLog=Error Log
|
|||
labels.errorName=Error Name
|
||||
labels.expiredTime=Expired
|
||||
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.groupName=Solr Group
|
||||
labels.handlerName=Handler Name
|
||||
|
@ -132,8 +132,8 @@ labels.userInfo=User Info
|
|||
labels.userSessionId=User ID
|
||||
labels.webApiJson=JSON 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.dictId=Dictionary ID
|
||||
labels.docId=Document ID
|
||||
|
|
Loading…
Add table
Reference in a new issue