3.2.0

Override A Function In UI Widget


What's the best way to override a function in a control? For example, I would like to create a subclass of AW.UI.Combo that strips out HTML tags out of items in the popup. (Items added to the popup via setItemText() will have HTML tags for visual styling, for example, within the dropdown.)

Initially, I copied AW.UI.Combo and renamed the class, but I thought I'd do it the "right way" via subclassing the Combo control.

So, I have a file where I added:

AW.UI.HTMLStripCombo = AW.UI.List.subclass();

AW.UI.HTMLStripCombo.create = function(){
     AW.UI.Combo.create.call(this);
     var obj = this.prototype;	
};


I need to override functions like getItemText() such that it removes HTML tags. What's the best approach to this? Thanks

- alphadog
Paul Tiseo
November 22,
Really need some help here, if anyone can supply an answer...
Paul Tiseo
November 27,

This topic is archived.

See also:


Back to support forum