Jsf 咆哮错误

Jsf 咆哮错误,jsf,primefaces,Jsf,Primefaces,我有一个代码如下 <p:growl id="noti-growl"/> <h:form id="login-form"> <p:panel> <h:commandButton value="Đăng nhập" class="button-login" action="index"> <f:ajax execute="@form"

我有一个代码如下

<p:growl id="noti-growl"/>
        <h:form id="login-form">
            <p:panel>
                <h:commandButton value="Đăng nhập" class="button-login" action="index">
                    <f:ajax execute="@form" render="noti-growl"/>
                </h:commandButton>
            </p:panel>
        </h:form>
<f:ajax> contains an unknown id 'noti-growl' - cannot locate it in the context of the component j_idt9
<h:form id="login-form">
   <p:growl id="noti-growl"/>
</h:form>

我收到一个错误如下

<p:growl id="noti-growl"/>
        <h:form id="login-form">
            <p:panel>
                <h:commandButton value="Đăng nhập" class="button-login" action="index">
                    <f:ajax execute="@form" render="noti-growl"/>
                </h:commandButton>
            </p:panel>
        </h:form>
<f:ajax> contains an unknown id 'noti-growl' - cannot locate it in the context of the component j_idt9
<h:form id="login-form">
   <p:growl id="noti-growl"/>
</h:form>
包含未知id“noti growl”-无法在组件j_idt9的上下文中找到它

请给我解释一下?谢谢你的帮助

或者用你自己的方式发出咆哮,如下所示

<p:growl id="noti-growl"/>
        <h:form id="login-form">
            <p:panel>
                <h:commandButton value="Đăng nhập" class="button-login" action="index">
                    <f:ajax execute="@form" render="noti-growl"/>
                </h:commandButton>
            </p:panel>
        </h:form>
<f:ajax> contains an unknown id 'noti-growl' - cannot locate it in the context of the component j_idt9
<h:form id="login-form">
   <p:growl id="noti-growl"/>
</h:form>

或者你应该以不同的形式用全名更新咆哮:

 <h:form id = "growlForm">    
  <p:growl id="noti-growl"/>
 </form>

 <h:form id="login-form">
        <p:panel>
            <h:commandButton value="Đăng nhập" class="button-login" action="index" update = ":growlForm:noti_growl">

        </p:panel>
    </h:form>