Here is my java code
public HashMap<Integer, Integer> getNoOfWidgetsFromUsername(final String username) //vikas- method to get pid from db.
{
HashMap<Integer, Integer> obMap = new HashMap<Integer, Integer>();
int numwidgets=getTotalWidgetsOfUser(PartnerID);
obMap.put(new Integer(1),PartnerID);
obMap.put(new Integer(2),numwidgets);
return obMap;
}
I put the above code in a function. I am calling that function from Javascript and returning values to Javascript.
Here is my Javascript code.
JSClientService.getNoOfWidgetsFromUsername(username, {
callback : function(data) {
//here i want to print hashmap values.
}
});
How can I access the data on the Javascript side?
JSCLientService? Which library you are using for that. Please add tag.