Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jsf Primefaces 5覆盖面板在更新后损坏_Jsf_Primefaces_Overlay_Panel - Fatal编程技术网

Jsf Primefaces 5覆盖面板在更新后损坏

Jsf Primefaces 5覆盖面板在更新后损坏,jsf,primefaces,overlay,panel,Jsf,Primefaces,Overlay,Panel,今天我在P5中发现了一个新的bug。当我更新覆盖面板所指的按钮时,它不再工作-覆盖面板不再显示 作为一种解决方法,我确实使用了PF('widgetVar').loadContents()但这感觉很不舒服 在PF4中,这在没有任何解决方法的情况下确实有效 有人找到解决办法了吗?我不知道你指的是什么。更新按钮是什么意思 对我来说,以下代码在PrimeFaces 5.0中运行良好: <!DOCTYPE html> <html xmlns="http://www.w3.org/1999

今天我在P5中发现了一个新的bug。当我更新覆盖面板所指的按钮时,它不再工作-覆盖面板不再显示

作为一种解决方法,我确实使用了
PF('widgetVar').loadContents()但这感觉很不舒服

在PF4中,这在没有任何解决方法的情况下确实有效


有人找到解决办法了吗?

我不知道你指的是什么。更新按钮是什么意思

对我来说,以下代码在PrimeFaces 5.0中运行良好:

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:p="http://primefaces.org/ui"
    xmlns:pm="http://primefaces.org/mobile">
<h:head>
</h:head>
<h:body>
    <p:commandButton id="menuButton" value="Menu" icon="ui-icon-home"/>

    <p:overlayPanel for="menuButton" widgetVar="menuPanel" at="left" showEffect="push">
        <!-- overlayPanel content goes here -->
    </p:overlayPanel>
</h:body>
</html>

这有助于解决您的问题吗?

我的解决方案:

  • 不更新打开覆盖的单个按钮,同时更新两个按钮
  • 同时添加
    dismissable=“false”showCloseIcon=“true”
  • 如果在对话框上使用覆盖:添加
    appendTo=“@(body)”
示例代码:

<p:commandButton value="updateSection" update=":form:overlayPanelGroup" />
<h:panelGroup id="overlayPanelGroup">
  <p:commandButton id="openOverlayBtn" process="@this" value="openOverlay"/>                                
  <p:overlayPanel for="openOverlayBtn" showEffect="fade" hideEffect="fade" dismissable="false" showCloseIcon="true" appendTo="@(body)">
    <h:outputText value="textSample"/>
  </p:overlayPanel>
</h:panelGroup>


如果我的问题不清楚,很抱歉。在您的示例中,添加一个带有update:menuButton的新按钮,然后首先单击此按钮。然后覆盖面板不显示您的意思是,您正在更新负责显示覆盖面板的按钮,该按钮之前使用了另一个按钮?是吗?没错。我发现,当我将覆盖面板和覆盖面板的按钮放在a中并触发更新时,它确实起作用,但在以前的primefaces版本中,这在没有额外面板的情况下起作用。。