Jsf 2 使用primefaces对话框框架时,this.jq.draggable不是函数
我正在尝试使用Primefaces对话框框架打开一个对话框,如: 我的jsf代码:Jsf 2 使用primefaces对话框框架时,this.jq.draggable不是函数,jsf-2,primefaces,Jsf 2,Primefaces,我正在尝试使用Primefaces对话框框架打开一个对话框,如: 我的jsf代码: <p:commandButton icon="ui-icon-extlink" actionListener="#{grabacionesServicios.verGrabacion}"></p:commandButton> Amd my dialog_playgrabacion.xhtml是一个简单的helloworld jsf页面 当我单击用于打开包含dialog_playgrab
<p:commandButton icon="ui-icon-extlink" actionListener="#{grabacionesServicios.verGrabacion}"></p:commandButton>
Amd my dialog_playgrabacion.xhtml是一个简单的helloworld jsf页面
当我单击用于打开包含dialog_playgrabacion.xhtml内容的对话框的按钮时,我会看到下一个javascript错误:
Uncaught TypeError: this.jq.draggable is not a function
在primefaces.js文件中
我已经阅读了其他一些帖子,并找到了一个解决方案,其中讨论了在head部分插入以下代码:
<h:outputScript library="primefaces" name="jquery/jquery-plugins.js"/>
我在不同的位置粘贴了这段代码,但总是得到相同的错误
当我在chrome中使用开发者工具并咨询网络活动时,我看到jquery-plugins.js是如何正确下载的,但它似乎是在primefaces.js之后下载的。也许这就是错误?如何强制在primefaces.js之前下载此文件
你能帮我吗
谢谢
My faces-config.xml:
<?xml version='1.0' encoding='UTF-8'?>
<faces-config version="2.2"
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd">
<navigation-rule>
<from-view-id>*</from-view-id>
<navigation-case>
<from-outcome>inicio</from-outcome>
<to-view-id>/admin/inicio.xhtml</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>misdatos</from-outcome>
<to-view-id>/admin/mis_datos.xhtml</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>logout</from-outcome>
<to-view-id>/index.xhtml</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>agente-atiende</from-outcome>
<to-view-id>/admin/atencion/index-agente.html</to-view-id>
</navigation-case>
</navigation-rule>
<application>
<action-listener>org.primefaces.application.DialogActionListener</action-listener>
<navigation-handler>org.primefaces.application.DialogNavigationHandler</navigation-handler>
<view-handler>org.primefaces.application.DialogViewHandler</view-handler>
</application>
</faces-config>
*
伊尼西奥
/admin/inicio.xhtml
米斯达托斯
/admin/mis_datos.xhtml
注销
/index.xhtml
阿蒂恩德酒店
/admin/atencion/index-agent.html
org.primefaces.application.DialogActionListener
org.primefaces.application.DialogNavigationHandler
org.primefaces.application.DialogViewHandler
您是否在JSF页面中手动添加了一个松散的jQuery(UI)脚本?我不这么认为,但我已经编辑了我的帖子并粘贴了所有JSF代码。“是”或“否”就足够了。不管怎样,在转储充满干扰噪音的怪物代码片段之前,请仔细阅读。抱歉,我粘贴了所有代码,因为我不确定响应。我再次编辑并删除了所有jsf代码。有什么建议吗?谢谢
<?xml version='1.0' encoding='UTF-8'?>
<faces-config version="2.2"
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd">
<navigation-rule>
<from-view-id>*</from-view-id>
<navigation-case>
<from-outcome>inicio</from-outcome>
<to-view-id>/admin/inicio.xhtml</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>misdatos</from-outcome>
<to-view-id>/admin/mis_datos.xhtml</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>logout</from-outcome>
<to-view-id>/index.xhtml</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>agente-atiende</from-outcome>
<to-view-id>/admin/atencion/index-agente.html</to-view-id>
</navigation-case>
</navigation-rule>
<application>
<action-listener>org.primefaces.application.DialogActionListener</action-listener>
<navigation-handler>org.primefaces.application.DialogNavigationHandler</navigation-handler>
<view-handler>org.primefaces.application.DialogViewHandler</view-handler>
</application>
</faces-config>