It's clear that there are many scenarios where users would want to employ and maybe even extend these two widgets. For instance, check out the demonstration below for one such scenario.
There are a few things to note about the sample as far as the extensions go. First of all, I did a very simple extension to the ClickToCall widget along the same lines of my previous posts, so I won't go into much detail about that particular piece.
Other than the ClickToCall extension, I extended both the Cobrowse (cea.widget.Cobrowse) and CollaborationDialog (cea.widget.CollaborationDialog) widgets to provide the function you see in the sample. With the Cobrowse widget, I added functionality such that when the customer service representative creates the collaboration link, a resource representing that link and the customer it is intended for is created on the backend. That was easy to do by overriding the Cobrowse widget's _convertToWaitingState method and providing custom function to create the necessary resource.
dojo.withDoc(iframeDoc,The dojo.withDoc method allowed me to update the DOM of the source HTML page for the content pane, and in this case it was extremely helpful.
var data = this.receivedPolicyData;
dojo.style(dojo.byId("policyTable"), "display", "block");
dojo.byId("policyNumText").innerHTML = data['policyNum'];
dojo.byId("policyHolderText").innerHTML = data['policyHolder'];
dojo.byId("policyTypeText").innerHTML = data['policyType'];
dojo.byId("policyAmountText").innerHTML = data['policyAmount'];
dojo.byId("policyPremiumText").innerHTML = data['policyPremium'];