I'm trying to add a link to the work item control in TFS 2012 Web Access. What I'm seeing, however, is that the functions I'm defining for bind
and _init
aren't getting called at any point in the page lifecycle.
Here's some pared down code:
TFS.module("TFS.WA.ProofOfConcept",
[
"TFS.WorkItemTracking.Controls",
"TFS.WorkItemTracking",
"TFS.Core"
],
function () {
var WITOM = TFS.WorkItemTracking,
WITCONTROLS = TFS.WorkItemTracking.Controls,
delegate = TFS.Core.delegate,
moduleBaseUrl = TFS.getModuleBase("TFS.WA.ProofOfConcept");
function ProofOfConcept(container, options, workItemType) {
this.baseConstructor.call(this, container, options, workItemType);
}
ProofOfConcept.inherit(WITCONTROLS.WorkItemControl, {
_control: null,
// Initialize the control UI without data (in "blank" state).
_init: function () {
this._base();
},
bind: function (workItem) {
this._base();
},
// Update the control data
invalidate: function (flushing) {
},
// Clear the control data
clear: function () {
}
});
WITCONTROLS.registerWorkItemControl("TFS.WA.ProofOfConcept", ProofOfConcept);
return {
ProofOfConcept: ProofOfConcept
};
});
The extension loads, and I can set a breakpoint on the module and see it getting constructed. I'm sure I'm missing something extremely silly, but I can't see it.
Here's the manifest.xml:
<WebAccess version="11.0">
<plugin name="POC" vendor="Acme" moreinfo="http://www.acme.com" version="1.0.0" >
<modules>
<module namespace="TFS.WA.ProofOfConcept" kind="TFS.WorkItem.CustomControl"/>
</modules>
</plugin>
</WebAccess>