我正在使用primefaces對話框用於彈出目的。但每次它被打開時,整個屏幕會自動刷新並彈出消失。Primefaces對話框彈出窗口刷新背景並消失
< p:dialog id="dialog" header="Select different user" styleClass="atf-header" widgetVar="dlg" appendToBody="true">
<ui:include src="searchpopup.xhtml" />
</p:dialog>
<h:panelGroup>
<h:outputLabel value="#{I18N['Create_Ticket_for_other_users']}" styleClass="atf-header" style="width:600px"></h:outputLabel>
</h:panelGroup>
<h:panelGroup id="search_section" layout="block"
styleClass="atf-content-area atf-separarot-botton" style="width:600px">
<h:panelGroup id="input_search_section" >
<h:outputText id="name" value="Siddharth Mishra"
labelStyleClass="atf-label">
</h:outputText>
</h:panelGroup>
<h:panelGroup styleClass="atf-right atf-inline-block">
<p:commandButton id="btn_search" value="select different user"
styleClass="atf-button-search" onclick="dlg.show()">
</p:commandButton>
</h:panelGroup>
</h:panelGroup>
嗨Cyd。如果你創建沒有'ui:include'的'p:dialog'會發生什麼?嘗試通過將所有內容包含在對話框中來創建對話框。同時發佈'ui:include'中的代碼。 – 2013-03-11 10:13:41