我有这段代码:
<p:overlayPanel id="advancedSearchPanel" styleClass="ui-advanced-search-overlay" for="advancedSearch" hideEffect="fade" my="right top" dismissable="false">
<h:form>
<h:panelGrid>
....
<p:commandButton id="btnOpenTree" value="Lista classificadores" onclick="dlg1.show();" />
...
</h:panelGrid>
<p:dialog widgetVar="dlg1">
<p:tree id="treeClassifier" value="#{searchForm.rootClassifier}" var="node" selectionMode="checkbox" selection="#{searchForm.selectedClassifiers}" style="height: 200px;width: 70%;overflow: auto; float: right;">
<p:treeNode expandedIcon="ui-icon-folder-open" collapsedIcon="ui-icon-folder-collapsed">
<h:outputText value="#{node.description}"/>
</p:treeNode>
</p:tree>
</p:dialog>
</h:form>
</p:overlaypanel>
我尝试在单击按钮btnOpenTree时调用对话框,但是当我单击此组件时,overlaypanel将关闭,对话框永远不会出现。我尝试将对话框放在表单体外但没有任何反应。知道为什么我不能显示de dialog吗?