I am migrating to Primefaces 5.1 and I find a problem on dialogs.
When I navigate to other page from the dialog, it fails.
The dialog disappear, but the backend is still grey and disabled.
A sample xhtml code to reproduce it:
mainView.html:
Code: Select all
<?xml version="1.0"?>
<f:view xmlns="http://www.w3.org/1999/xhtml"
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:p="http://primefaces.org/ui"
xmlns:ui="http://java.sun.com/jsf/facelets">
<h:head />
<h:body>
<h:form>
<p:commandButton value="Open dialog" oncomplete="PF('myDialog').show()"></p:commandButton>
<p:commandButton value="Go To Page1" action="#{myBean.goToPage1()}"></p:commandButton>
<p:dialog id="myDialog" widgetVar="myDialog"
header="Dialog test navigation" resizable="false" modal="true" width="600" closable="false">
<p:commandButton value="Go To Page1" oncomplete="PF('myDialog').hide()" action="#{dtFilterView.goToPage1()}"></p:commandButton>
<p:commandButton value="Close" oncomplete="PF('myDialog').hide()"></p:commandButton>
</p:dialog>
</h:form>
</h:body>
</f:view>
Code: Select all
<?xml version="1.0"?>
<f:view xmlns="http://www.w3.org/1999/xhtml"
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:p="http://primefaces.org/ui"
xmlns:ui="http://java.sun.com/jsf/facelets">
<h:head />
<h:body>
<h:form>
<h:outputText value="This is Page 1"></h:outputText>
<p:commandButton value="Go To Home" action="#{myBean.goToHome()}"></p:commandButton>
</h:form>
</h:body>
</f:view>
Steps to reproduce the problem:
1. Click on "Open dialog" (on mainView.xhtml)
2. Click on button "Go To Page1" from the dialog
3. The dialog is closes and navigates to "page1.xhtml" , but no more can be done (all is disabled).
Class style still is "ui-widget-overlay".
I found that there is a JavaScript error in the browser console:
- Uncaught TypeError: Cannot read property 'hide' of undefined view.xhtml:5
PrimeFaces.ab.oncomplete jquery.js?ln=primefaces&v=5.1:25
i jquery.js?ln=primefaces&v=5.1:25
cd.fireWith jquery.js?ln=primefaces&v=5.1:25
cgj query.js?ln=primefaces&v=5.1:25
i query.js?ln=primefaces&v=5.1:25
Thanks
Pere Abelló
--------------------------------------------------
Primefaces 5.1
Jboss 6.1
JSF 2.1
Windows 7