I am using Ajax in my JavaScript and that sets an array of objects of following class in a response:
public class RetrieveTempSecVersions {
private String templateName;
private int[] versionNumber;
public String getTemplateName() {
return templateName;
}
public void setTemplateName(String templateName) {
this.templateName = templateName;
}
public int[] getVersionNumber() {
return versionNumber;
}
public void setVersionNumber(int[] i) {
this.versionNumber = i;
}
}
using:
aoRes.setContentType("text/xml");
aoRes.setHeader("Cache-Control", "no-cache");
aoRes.getWriter().write(template[]);
Now I want to read all the elements from template array and its details into my JavaScript.
Can anyone help me in how to do that?