是否有可以关闭primefaces覆盖面板的java命令?或者是否有一种方法可以在单击按钮时使覆盖面板内的按钮关闭面板?
您可以轻松地在您的overlaypanel上添加一个按钮来关闭它,例如
<p:overlayPanel widgetVar="myOverlayPanel" ... >
<p:commandButton ... onComplete="PF('myOverlayPanel').hide(); ... />
</p:overlayPanel>
Run Code Online (Sandbox Code Playgroud)
你也可以用Java做到这一点
private void doSomething() {
RequestContext ctx = RequestContext.getCurrentInstance();
ctx.execute("PF('myOverlayPanel').hide();");
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
9296 次 |
| 最近记录: |