[ad_1]
public class student implements Serializable{
private static final long serialVersionUID = 547610808289645609L;
private String strStudentNum;
private String strStudentName;
private String strStudentclass;
private String strCity;
}
JSP page:
<c:set var="StudentList" value="${bmfSession.selectedProperty.STUDENTDetails.StudentStartStudentList}"></c:set>
function downloadCSTdetailsWithFileName()
{
var stid = '${StudentList}';
var reportType="confirmList";
var startclassDate="${param.startclassDate}";
var pririotyadmission = '${param.pririotyadmission}';
debugger;
downloadconfirmCSV(stid, reportType,startclassDate,pririotyadmission);
}
JS:
function downloadconfirmCSV(stid, reportType,startServiceDate,priorityMoveIn){
if(reportType.match("confirmList") && !downloadFlag)
{
var k;
for(k=0;k<stid.length;k++)
{
stid[k].stid = "=\""+esiid[k].esiid+"\"";
}
downloadFlag = true;
}
var inpValues = {
"jsonData" : JSON.stringify(stid)+','+pririotyadmission+','+startclassDate+','+reportType}
var url1 = "/stsapp/am/Stdownload.htm";
var data1 = inpValues;
var method1 = "post";
//jquery plugin -Download defined in commonutil.js
$.download(url1,data1,method1);
}
when we do json stringify it is coming as a object not a json ..I need to pass json from the JS
iam not sure how do i get it. Inputs are as above
[ad_2]