I'm currently using (it's working fine)
PrimeFaces.widget.OverlayPanel.prototype._old_init = PrimeFaces.widget.OverlayPanel.prototype.init;
PrimeFaces.widget.OverlayPanel.prototype.init = function(cfg)
{
this._old_init(cfg);
this.align();
}
but I'd like to use something more readable and 'jQuery-ish' like this completely invented unrealistic code:
PrimeFaces.widget.OverlayPanel.patch(
{
init: function(cfg)
{
super.init(cfg);
this.align();
},
show: function()
{
console.log('blah blah blah');
super.show();
}
});
I tried PrimeFaces.widget.Xxx.extend({...})
but in this case I have no access to super
methods.
Please, keep in mind that I'm totally dumb with Javascript
Thanks