我有一個頁面模式對話框,在用戶單擊編輯按鈕時呈現。該對話框要求輸入用戶名和密碼,並有一個提交按鈕。如果用戶名和密碼未驗證,則顯示錯誤。當對話框中的操作失敗時,Primefaces對話框背景不透明度會加倍
問題是,如果用戶名和密碼沒有進行身份驗證,每次驗證失敗時,模式背景會越來越暗。
會導致什麼?
<p:dialog id="dialog" header="Login To Edit" widgetVar="dialog" visible="#{fundingBacker.loginVisible}" modal="true"
resizable="false" closable="false" draggable="true" rendered="#{!userBean.loggedIn}">
<h:form>
<p:ajaxStatus style="width:16px;height:16px;">
<f:facet name="start">
<p:graphicImage value="../images/loading4.gif" />
</f:facet>
<f:facet name="complete">
<h:outputText value="" />
</f:facet>
</p:ajaxStatus>
<p:messages autoUpdate="true" showDetail="true" />
<h:panelGrid columns="2" cellpadding="5">
<h:outputLabel for="lanId" value="LanID:" />
<p:inputText value="#{currentUser.lanID}" id="lanId" required="true" label="lanId" requiredMessage="Lan ID is required" />
<h:outputLabel for="password" value="Password:" />
<p:password value="#{currentUser.password}" id="password" required="true" label="password" feedback="false" requiredMessage="Password is required" />
<p:commandButton id="loginButton" value="Login" type="submit" styleClass="primaryButton" action="#{currentUser.performLogin}" update="dialog"/>
</h:panelGrid>
</h:form>
</p:dialog>
刪除'update =「對話框''工作。謝謝。 – Catfish 2012-02-02 20:39:57
不客氣。 – BalusC 2012-02-02 20:40:21