jquery - Ajax response from spring webflow -
after ajax call response contains whole jsp page. how can part of page or when use swf how can result evaluate block ? have next ajax call in js file:
var url = $('#srccurrencyspace').attr('resource'); $.ajax({ type : "post", url : url, cache:false, data: $('#form').serialize(), datatype: "text", success : function(response) { //write success logic here var newhtml = $('#srccurrencyspace', response).html(); $('#srccurrencyspace').html(newhtml); }, error : function(xmlhttprequest, textstatus, errorthrown) { //write error-handling logic here alert("error!"); } });
and request go to:
<transition on="updateamountsrccurrency" validate="false"> <evaluate expression="retrieverfactory.getsrccurrency(application)" result="flowscope.amountsrccurrency"/> <render fragments="srccurrencyspace"></render> </transition>
and snippet jsp:
<span id="srccurrencyspace" resource="${updateurl}"> <c:out value="${amountsrccurrency}" default="lvl" /> </span>
Comments
Post a Comment