After this task is complete, the plotCity application will be able to populate the thisCity combobox widget with new data when the user selects a state from the thisState widget.
Open the glue.js file, located in plotCity/Web Pages, in the editor pane.
At the end of the glue.js file, add the following subscribe function:
jmaki.subscribe("/cb/getState/*", function(args) {
var message = args.value;
jmaki.doAjax({method: "POST",
url: "Service?message=" + encodeURIComponent(message),
callback: function(_req) {
var tmp = _req.responseText;
var obj = eval("(" + tmp + ")");
jmaki.publish('/cb/setValues', obj);
// handle any errors
}
});
});