Skill/spring

jsp의 일부분 replace 방법

진열사랑 2024. 6. 11. 16:03

//JAVASCRIPT
var fnGoTransactionStatement = function(tid, partCancelTID, statusForView) {
var obj = {
tid: tid,
partCancelTID: partCancelTID,
searchStatusCode: statusForView
};

$.ajax({
url: _strMenuPath + "/selectTransactionStatement",
type: "POST",
data: JSON.stringify(obj),
contentType: "application/json; charset=utf-8",
})
.done(function (fragment) {
$("#divTIDStatementModal").replaceWith(fragment);
$("#divTIDStatementModal").modal("show");
});
};

// JAVA
@AuthMethod(hasAuth = CommonUtil.UserAuth.READONLY)
@PostMapping(value = "/selectTransactionStatement")
public ModelAndView selectTransactionStatement(@RequestBody TIDStatement tidStatement) {

ModelAndView mav = new ModelAndView("transaction/paymentStatement :: paymentStatement");
mav.addObject("tidStatement", paymentService.selectTransactionStatement(tidStatement));

return mav;
}