How to call the super ._super() in javascript widgets.

I wanted to modify the start method of the Advanced Search Javascript Controller (, particularly I just wanted to edit the callback function of the fields_get method, which is passed to $.when as a deferred.

The problem is that the start method calls ._super() but if I overwrite extend it (using .include() or .extend()) the ._super() function will refer to the AdvancedSearch start method at not to the start method the original ._super() calls (which is the one of I tried directly setting = function() { ... } copying the whole function with the little addition in the callback, but it won't work.


Here is a little scheme to make things clearer:

search.Input:start <- search.Advanced:start <- search.MyCustomAdvanced:start

MyCustomAdvanced:start should be identical to Advanced:start except for an extra test in the callback (.done()) of the fields_get method. Advanced:start calls ._super(), which refers to Input:start. But if I just copy that ._super() in MyCustomAdvanced:start, it will refer to Advanced:start (which I don't need because I'm copying it anyway) and not to Input:start

1 Comment
Chandni Gandhi

If answer helped you, please give up-vote and click on right tick mark.

1 Answer
Chandni Gandhi
Best Answer

Hi Leonardo,

If argument contains function hand, it will be called Expired Expired Expired like this:

init: function (view, node) {

this._super (view, node);



this._super ();

if yes goal widget is there, you-have function to overwrite whole, I did la même: Refer this link:


https: //

Hope this will help you.


C h andni