스프링 웹 플로우를 사용하고 뷰 상태 페이지의 포털 렌더링에 문제가 있습니다. 나는 항상 $ ('# form')을 얻는다. ajax 호출 후 serialize() = "". 나는 다음 Ajax 호출이 있습니다Ajax 호출 후 비어있는 직렬화 양식
var bindContinueButton = function() {
$('#continueBtn').bind('click', function() {
var url = $('#form').attr('action') + setFlowEvent('continue');
$.ajax({
type : "POST",
url : url,
cache:false,
data: $('#form').serialize(),
dataType: "text",
success : function(response) {
var newContent = $('#ajax-content', response).html();
$('#ajax-content').html(newContent);
},
error : function(XMLHttpRequest, textStatus, errorThrown) {
alert("error!");
}
});
});
};
을 그리고 렌더링 JSP 다음 냈다가 : 내가보기 자동 내 서버 유효성 검사기를 실행 양식을 제출할 때
<div id="ajax-content">
<jsp:include page="../../jsp/common/head.jsp"/>
<table class="t1">
<tbody>
<portlet:actionURL var="actionURL" portletMode="view">
<portlet:param name="execution" value="${flowExecutionKey}"/>
</portlet:actionURL>
<form:form id="form" modelAttribute="model" action="${actionURL}" method="post">
<jsp:include page="../../jsp/creation/popup-save-as.jsp"/>
<jsp:include page="../../jsp/creation/documentNumber.jsp"/>
<jsp:include page="../../jsp/creation/initialAmount.jsp"/>
<jsp:include page="../../jsp/creation/currentAccount.jsp"/>
<jsp:include page="../../jsp/creation/addRegularPayment.jsp"/>
<jsp:include page="../../jsp/creation/regularPaymentFields.jsp"/>
<jsp:include page="../../jsp/creation/otherConditions.jsp"/>
<jsp:include page="../../jsp/creation/certification.jsp"/>
</form:form>
<%-- BUTTONS --%>
<jsp:include page="../../jsp/creation/actionButtons.jsp"/>
</tbody>
</table>
</div>
그래서 나는 아약스 콜백 성공 기능으로 이동보다 이후 $ ('# ajax-content') .html (newContent)이 (가) $ ('# form')이됩니다. serialize(). 이 문제를 해결하도록 도와주세요. 성공 콜백에서 콘텐츠를 교체 한 후 감사