2
我想從另一個對話框調用一個對話框(p:對話框)。在我的頁面中,單擊鏈接時會打開一個對話框,此對話框有兩個部分,一個用於登錄,另一個用於註冊。目前我的頁面結構如下所示。從另一個對話框調用對話框時提交多個表單jsf
<h:form>
<h:outputLink value="javascript:void(0)" onclick="dlg.show()" title="Login" />
</h:form>
<p:dialog id="dialog" header="Login" widgetVar="dlg" appendToBody="true" modal="true" width="750">
<h:form id="loginForm">
...
</h:form>
<h:form id="signupForm">
...
<p:commandButton id="submitButton" value="SignUp"
onstart="statusDialog.show();"
action="# {signupBean.doSignup}"
update="growl"
oncomplete="statusDialog.hide();dlg.hide();welcome.show();"/>
</h:form>
</p:dialog>
<p:dialog header="Welcome" id="welcome" resizable="false" widgetVar="welcome" width="700" closable="false" modal ="true">
</p:dialog>
我現在面臨的問題是,每當我點擊提交,並有頁面驗證錯誤,則顯示錯誤消息,並顯示在新的對話框。新的對話框應該只在成功完成表單時才顯示,不會有任何驗證錯誤。
我哪裏錯了?
非常感謝@BalusC ..這確實解決了我的問題。 – praveenkumarHoolimath
不客氣。 – BalusC