Hello All ,
I was able to invoke java servlet from the Data Capture Template (DCT).
But my servlet will fetch some data from the database using that needs
to be displayed on load of the DCT.
But i am not able figure how do i pass data from the servlet to the DCT.
Here is the piece of code i used to invoke servlet from the DCT.
Also attached is the DCT file. Please provide some sample code snippet.
Sample DCT code :
IWEventRegistry.addFormHandler("onFormInit", init);
function init() {
var parameters = new Object();
IWDatacapture.callServer("
http://wit31250325:7001/login/myservlet", parameters, true);
# Here i need to access the data retrieved from the database,and display those to the item elements.
# i need to code something like this
IWDatacapture.getItem("/Header-Page/head/title").setValue("value from the database ");
}
Regards,
Sachin