:: Forum >>

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
Wednesday, November 22, 2006
Really need some help here, if anyone can supply an answer...
Paul Tiseo
Monday, November 27, 2006

This topic is archived.


Back to support forum

Forum search