I\'m currently using (it\'s working fine)
PrimeFaces.widget.OverlayPanel.prototype._old_init = PrimeFaces.widget.OverlayPanel.prototype.init;
PrimeFaces.widg
I had the same problem, but you're solution was not 100% efficient to my problem (See here https://github.com/primefaces/primefaces/issues/1928)) since you're willing to call _super()
from OverlayPanel
, and I'm trying to avoid it (it does few things I did not want to). So what I did is this:
/* Quick fix so layout might be handled in dialog component PF #1928 */
if(PrimeFaces.widget.Layout) {
PrimeFaces.widget.Layout.prototype.init = function(cfg) {
// skip calling PrimeFaces.widget.Layout.init() on purpose
PrimeFaces.widget.DeferredWidget.prototype.init.call(this, cfg);
this.cfg = cfg;
this.id = this.cfg.id;
this.jqId = PrimeFaces.escapeClientId(this.id);
if(this.cfg.full) { //full
var dialog = $(this.cfg.center.paneSelector).parents('.ui-dialog-content');
if(dialog) { // full + dialog
this.jq = dialog;
} else {
this.jq = $('body');
}
} else if(this.cfg.parent) { //nested
this.jq = $(PrimeFaces.escapeClientId(this.cfg.parent));
} else { //element
this.jq = $(this.jqId);
}
this.renderDeferred();
}
}
That way init()
is completely overrided. I hope it will help few folks out there in this atypical case ;)