当页面加载时显示Primefaces的OverlayPanel

3

当单击目标组件(一个commandButton)时,页面会显示Primefaces的overlayPanel

<p:commandButton id="inputBtn" value="Choose a data source" type="button" action="#{dataImportBean.oAuth}"/>
 
<p:overlayPanel
 id="overlaypanel1"
 for="inputBtn"
 dynamic="false"
 widgetVar="inputChooser"
 >
// contents of the overlay panel
</p:overlayPanel>

我希望在页面加载时显示overlayPanel,不需要点击目标commandButton

使用案例是:用户已经打开了overlayPanel,但oAuth流程使用户导航离开页面。当oAuth完成后用户被重定向到页面。然而,当页面加载时,overlayPanel被关闭,而我需要用户直接返回到overlayPanel,以保持一致性。

1个回答

2

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接