Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/85.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在JSF1.2中使用jQueryUI对话框_Jquery_Jsf - Fatal编程技术网

在JSF1.2中使用jQueryUI对话框

在JSF1.2中使用jQueryUI对话框,jquery,jsf,Jquery,Jsf,我正在尝试在jsf项目中使用jquery。我想开一家银行。对话框正在打开,可以执行我们想要的操作。但是当它关闭时,richfaces选项卡不工作。当我移除 <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.js"></script> <script type="text/javascript

我正在尝试在jsf项目中使用jquery。我想开一家银行。对话框正在打开,可以执行我们想要的操作。但是当它关闭时,richfaces选项卡不工作。当我移除

<script type="text/javascript"
            src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.js"></script>
        <script type="text/javascript"
            src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.14/jquery-ui.js"> </script>
这是我的
.xhtml
页面

<ui:define name="head">
        <script type="text/javascript"
            src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.js"></script>
        <script type="text/javascript"
            src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.14/jquery-ui.js"></script>
        <f:verbatim>
            <script type="text/javascript">

            function openStakeHolderPopUp(){
                //$('#stakeHolderPopUp').dialog('open');
                    var popUpWindow = document.getElementById("stakeHolderPopUp");
                    popUpWindow.setAttribute("style", "visibility:visible");
                    $(popUpWindow).dialog({
                        modal: true,
                        height: 100,
                        width: 200,
                        closeOnEscape: true,
                        close: function(ev, ui) { 
                            $(this).dialog("destroy");
                        }
                    });
                };
            </script>
        </f:verbatim>
    </ui:define>

    <ui:define name="body">
       <RF:tabPanel>
    <RF:tab label="Profil" id="tabProfil">
            <h:inputText id="value" readonly="true" onclick="openStakeHolderPopUp()"/>
            <h:inputText id="name" required="true" value="#{company.name}"/>
            </RF:tab>
    <RF:tab label="Detay" id="tabDetail">
            </RF:tab>


    <RF:panel id="stakeHolderPopUp">
    <ui:define name="label">Paydaş Adı</ui:define>
      <h:inputText id="value" required="true"/>
    </RF:panel>

    </ui:define>

函数openStakeHolderPopUp(){
//$('stakeHolderPopUp')。对话框('open');
var popUpWindow=document.getElementById(“stakeHolderPopUp”);
setAttribute(“样式”,“可见性:可见”);
$(popUpWindow).对话框({
莫代尔:是的,
身高:100,
宽度:200,
closeOnEscape:没错,
关闭:函数(ev,ui){
$(此).dialog(“销毁”);
}
});
};
佩达德

有什么想法吗?谢谢。

RichFaces 3.3.3附带了自己的jQuery版本,我相信是1.3.x。它可能与您手动包含的jQuery 1.6.2发生冲突。您可以尝试以下操作:

  • 不要包括jquery1.6.2,只使用jquerylib提供的RichFaces。如有必要,将jQuery UI更改为1.3.x兼容版本

  • 只需使用而不是jQuery UI对话框


RichFaces 3.3.3附带了自己的jQuery版本,我相信是1.3.x。它可能与您手动包含的jQuery 1.6.2发生冲突。您可以尝试以下操作:

  • 不要包括jquery1.6.2,只使用jquerylib提供的RichFaces。如有必要,将jQuery UI更改为1.3.x兼容版本

  • 只需使用而不是jQuery UI对话框


我刚刚解决了这个问题。我添加了
var JQ=jQuery.noConflict()在我编写的方法之上。这帮助我使用任何spesific javascript库。只是抬头看着莫达帕内尔,看起来很酷。谢谢你的回答。我刚刚解决了这个问题。我添加了
var JQ=jQuery.noConflict()在我编写的方法之上。这帮助我使用任何spesific javascript库。只是抬头看着莫达帕内尔,看起来很酷。谢谢你的回答。
<ui:define name="head">
        <script type="text/javascript"
            src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.js"></script>
        <script type="text/javascript"
            src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.14/jquery-ui.js"></script>
        <f:verbatim>
            <script type="text/javascript">

            function openStakeHolderPopUp(){
                //$('#stakeHolderPopUp').dialog('open');
                    var popUpWindow = document.getElementById("stakeHolderPopUp");
                    popUpWindow.setAttribute("style", "visibility:visible");
                    $(popUpWindow).dialog({
                        modal: true,
                        height: 100,
                        width: 200,
                        closeOnEscape: true,
                        close: function(ev, ui) { 
                            $(this).dialog("destroy");
                        }
                    });
                };
            </script>
        </f:verbatim>
    </ui:define>

    <ui:define name="body">
       <RF:tabPanel>
    <RF:tab label="Profil" id="tabProfil">
            <h:inputText id="value" readonly="true" onclick="openStakeHolderPopUp()"/>
            <h:inputText id="name" required="true" value="#{company.name}"/>
            </RF:tab>
    <RF:tab label="Detay" id="tabDetail">
            </RF:tab>


    <RF:panel id="stakeHolderPopUp">
    <ui:define name="label">Paydaş Adı</ui:define>
      <h:inputText id="value" required="true"/>
    </RF:panel>

    </ui:define>