Primefaces 6.0 and 6.1 - Jquery error

Asked

Viewed 80 times

0

When including any Primefaces component in my HTML body, it raises this error: Uncaught Typeerror: N.delegate is not a Function.

You know what would be?

The error is in this second line of jquery-plugins generated by Primefaces

 function g(N) {
        var M = "button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";
        return N.delegate(M, "mouseout", function() {
            y(this).removeClass("ui-state-hover");
            if (this.className.indexOf("ui-datepicker-prev") !== -1) {
                y(this).removeClass("ui-datepicker-prev-hover")
            }
            if (this.className.indexOf("ui-datepicker-next") !== -1) {
                y(this).removeClass("ui-datepicker-next-hover")
            }
        }).delegate(M, "mouseover", function() {
            if (!y.datepicker._isDisabledDatepicker(j.inline ? N.parent()[0] : j.input[0])) {
                y(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");
                y(this).addClass("ui-state-hover");
                if (this.className.indexOf("ui-datepicker-prev") !== -1) {
                    y(this).addClass("ui-datepicker-prev-hover")
                }
                if (this.className.indexOf("ui-datepicker-next") !== -1) {
                    y(this).addClass("ui-datepicker-next-hover")
                }
            }
        })
    }

  • N which is being sent as argument does not have the function delegate. Give a console.log in N to see what’s coming, maybe undefined.

1 answer

0

The function . delegate() was discontinued in Jquery, but the Primefaces class used it in version 6.1 RC1, but now in version 6.1 RC2, this error has been corrected! More obituated to all.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.