fix: Grid request error fix

main
minuk926 2 years ago
parent 4f78815ff2
commit 3d319b8c39

@ -40,6 +40,7 @@ public class AjaxExceptionViewResolver extends AbstractExceptionViewResolver {
String stackTraceString = "";
if(Globals.IS_SP_ALERT_MSG) stackTraceString = out.toString();
Map<String,Object> tempMap = AjaxMessageMapRenderer.error(errorCode, errorArguments);
tempMap.put("result", false);
if(Globals.IS_SP_ALERT_MSG) tempMap.put("message", tempMap.get("message")+"\n"+stackTraceString);
else tempMap.put("message", tempMap.get("message"));
return new ModelAndView(getView(), tempMap);

@ -4,7 +4,7 @@ import kr.xit.framework.support.util.PropertyHelper;
public class Globals {
//public static final boolean IS_SP_ALERT_MSG = PropertyHelper.getBoolean("Globals.error.isAlert");
public static final boolean IS_SP_ALERT_MSG = false;
public static final boolean IS_SP_ALERT_MSG = true;
public static final String JSON_RESULT_CODE= "code";
public static final String JSON_RESULT_MESSAGE= "message";

@ -199,6 +199,19 @@
======================== */
findData : function(){
console.log($('#frmSearch').serialize())
// grid 에러 발생 처리
GRID.reloadData();
},
/* ========================

@ -157,11 +157,13 @@ const TuiGrid = {
console.log(`failResponse >>>>>>>>>>>>>>>>>> `,ev);
try {
var msg = JSON.parse(ev.xhr.response).message; //tui-grid 기본 format 메시지
if(fnIsEmpty(msg))
if(!msg) {
msg = JSON.parse(ev.xhr.response).resp.message;
if(!fnIsEmpty(msg))
}else {
alert(msg);
}
} catch (e) {
console.error('TuiGrid::failResponse parsing error', e)
}
});
// 오류가 발생한 경우
@ -169,11 +171,13 @@ const TuiGrid = {
console.log(`errorResponse >>>>>>>>>>>>>>>>>> `,ev);
try {
var msg = JSON.parse(ev.xhr.response).message; //tui-grid 기본 format 메시지
if(fnIsEmpty(msg))
if(!msg) {
msg = JSON.parse(ev.xhr.response).resp.message;
if(!fnIsEmpty(msg))
}else {
alert(msg);
}
} catch (e) {
console.error('TuiGrid::errorResponse parsing error', e)
}
});

Loading…
Cancel
Save