Twitter bootstrap 使用Bootstrap3Modal和JSF2.2

Twitter bootstrap 使用Bootstrap3Modal和JSF2.2,twitter-bootstrap,jsf,jsf-2.2,Twitter Bootstrap,Jsf,Jsf 2.2,我试图用h:commandLink打开一个模式引导对话框,但没有成功。让我们看看我的代码: 1-我有这个命令链接: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http:

我试图用h:commandLink打开一个模式引导对话框,但没有成功。让我们看看我的代码:

1-我有这个命令链接:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:p="http://primefaces.org/ui">

<h:head />
<h:body>
    <ui:composition template="/templates/template.xhtml">
        <ui:define name="content">
            <h:form>
...

<h:commandLink>
                                                <f:passThroughAttribute name="data-toggle" value="modal" />
                                                <f:passThroughAttribute name="data-target"
                                                    value="#formBanca" />
                                                <i class="fa fa-edit"></i>
                                            </h:commandLink>
...

            </h:form>

...
...
在关闭标记“”之后,我有一个对话框DIV:

<!-- Modal -->
        <div class="modal fade" id="formBanca" tabindex="-1" role="dialog"
            aria-labelledby="myModalLabel" aria-hidden="true">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal"
                            aria-label="Close">
                            <span aria-hidden="true">&times;</span>
                        </button>
                        <h4 class="modal-title" id="myModalLabel">Modal title</h4>
                    </div>
                    <div class="modal-body">...</div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
                        <button type="button" class="btn btn-primary">Save
                            changes</button>
                    </div>
                </div>
            </div>
        </div>

&时代;
情态标题
...
接近
拯救
变化
单击commandLink时,会调用ManagedBean,但对话框不会打开。
一件非常奇怪的事情是,我在我的智能手机(Android)上测试了dialog,但显示了“循环加载栏”,让我试着解释一下:就像页面尝试刷新,但dialog停止了刷新,而“地址栏”冻结在加载中。

试一下
commandLink
不建议仅用于客户端交互解决方案是另一个:我添加了一个“”,一切正常。