Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Functions not being called in TFS 2012 Update 3 Web Access extension

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>
like image 212
Daniel Mann Avatar asked Jan 19 '26 21:01

Daniel Mann


1 Answers

I suggest you to access http://YourServer:8080/tfs/_diagnostics and activate debug mode by selecting Enabled link.

enter image description here

like image 165
Aghilas Yakoub Avatar answered Jan 22 '26 18:01

Aghilas Yakoub