我正在尝试添加一个primefaces滑块元素,但是它根本不会出现/显示/显示。就像,我把它放在<h:body>
内的<h:head>
(<h:form>
也存在)中:
<h:inputHidden id="R"/>
<p:slider for="R" minValue="2" maxValue="5" step="1" id="Rslider"/>
在我放置的位置html中没有任何内容(几乎没有标签)。
控制台记录以下内容:
jquery-3.3.1.min.js:2 jQuery.Deferred exception: this.jq.slider is not a function TypeError: this.jq.slider is not a function
at c.init (http://localhost:8080/helloworld/javax.faces.resource/components.js.xhtml?ln=primefaces&v=3_3_0_130419&v=6.0:33:471)
at c.e.(anonymous function) [as init] (http://localhost:8080/helloworld/javax.faces.resource/core.js.xhtml?ln=primefaces&v=3_3_0_130419&v=6.0:5:335)
at new c (http://localhost:8080/helloworld/javax.faces.resource/core.js.xhtml?ln=primefaces&v=3_3_0_130419&v=6.0:5:437)
at Object.createWidget (http://localhost:8080/helloworld/javax.faces.resource/core.js.xhtml?ln=primefaces&v=3_3_0_130419&v=6.0:1:4706)
at Object.cw (http://localhost:8080/helloworld/javax.faces.resource/core.js.xhtml?ln=primefaces&v=3_3_0_130419&v=6.0:1:4527)
at HTMLDocument.<anonymous> (http://localhost:8080/helloworld/lab.xhtml:44:147)
at l (http://localhost:8080/helloworld/jquery-3.3.1.min.js:2:29375)
at c (http://localhost:8080/helloworld/jquery-3.3.1.min.js:2:29677)
和
Uncaught TypeError: this.jq.slider is not a function
at c.init (components.js.xhtml?ln=primefaces&v=3_3_0_130419&v=6.0:33)
at c.e.(anonymous function) [as init] (http://localhost:8080/helloworld/javax.faces.resource/core.js.xhtml?ln=primefaces&v=3_3_0_130419&v=6.0:5:335)
at new c (core.js.xhtml?ln=primefaces&v=3_3_0_130419&v=6.0:5)
at Object.createWidget (core.js.xhtml?ln=primefaces&v=3_3_0_130419&v=6.0:1)
at Object.cw (core.js.xhtml?ln=primefaces&v=3_3_0_130419&v=6.0:1)
at HTMLDocument.<anonymous> (lab.xhtml:44)
at l (jquery-3.3.1.min.js:2)
at c (jquery-3.3.1.min.js:2)
试图下载不同的版本和主题,但没有结果。
<p:inputText>
和<p:spinner>
可以正常工作。