Primefaces对话框不显示

时间:2019-09-25 20:18:48

标签: jsf primefaces

我希望在其中显示弹出对话框的主页

import React, { Component } from 'react';

import './Chat.scss';

export default class Chat extends Component {

    constructor(props) {
        super(props);
        this.state = {
            show: true
        }

        //this.toggleChat = this.toggleChat.bind(this);
    }


    componentWillMount() {
        const script = document.createElement("script");

        script.src = "http://mibew.test/js/compiled/chat_popup.js";

        document.body.appendChild(script);
    }


    componentDidMount() {
        Mibew.ChatPopup.init({
            "id":"5d8bb2da7aefc6dc",
            "url":"http:\/\/mibew.test\/chat?locale=en",
            "preferIFrame":true,
            "modSecurity":false,
            "forceSecure":false,
            "style":"",
            "width":640,
            "height":480,
            "resizable":true,
            "styleLoader":"http:\/\/mibew.test\/chat\/style\/popup"
        });
    }


    toggleChat() {

        Mibew.Objects.ChatPopups['5d8bb2da7aefc6dc'].open();
        return false;
    }

    render() {
        return (

            <div className="chat-toggle">

                {/* mibew button */}

                <a id="mibew-agent-button" href="http://mibew.test/chat?locale=en" target="_blank" onClick={() => this.toggleChat()}>
                    <img src="http://mibew.test/b?i=mblue&amp;lang=en" border="0" alt="" />
                </a>

            </div>
        );
    }
}

页面正试图弹出

    <p:commandLink value="Login now "
       oncomplete="PF('LoginDialog').show()" update=":form:loginDialog">
    </p:commandLink> 

</h:body>
    <ui:include src="/job/login.xhtml"></ui:include>

</html>

我不明白为什么首页上没有显示此消息,有人可以帮忙吗?它没有给我任何错误,但是没有显示。

0 个答案:

没有答案