json - spring web flow + ajax data transfer -
i have been using spring mvc while, have started spring web flow. , trying create apps using swf.
my doubt is:
i have jsp , have few textboxes populated user. want transfer user data spring controller via flow.xml.
so how do that..??
here jsp(ajax code)
var postdata = {}; postdata["school_name"] = $("#school_name").val(); postdata["borrower_address_zip_code"] = $("#borrower_address_zip_code").val(); postdata["student_enrollment"] = $("#student_enrollment").val(); $.ajax({ type : 'post', data : json.stringify(postdata), contenttype : 'application/json', url : '${flowexecutionurl}&_eventid=handel1&ajaxsource=true', cache : false, success : function(data) { alert('done'); }, error : function(jqxhr, textstatus, errorthrown) { alert('textstatus'+textstatus + 'errorthrown'+errorthrown); } });
and here flow.xml.
<transition on="handel1"> <!-- requestparameters --> <evaluate expression="studentloan.createproperty(*********)" result="flowscope.content123" /> </transition>
what should have in place of ***** can hold data, , invoke createproperty method, present in controller.
i have got turn around , using "requestparameters" in place of ****. , passing javascript array in query string . fine???? or if there other better way of doing same. please let me know.
i didn't response problem, preferred using spring mvc particular issue.
i realized spring webflow sits spring mvc , ok use mvc + webflow, based upon application requirement.
Comments
Post a Comment