Pessoal, estou usando primefaces 6.0 e quando clico no botão para abrir o dialog a pagina carrega, ele acessa o metodo do actionListener no entanto não abre o Dialog, alguém pode me ajudar?
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:pt="http://xmlns.jcp.org/jsf/passthrough"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:opt="http://primefaces.prime.com.tr/optimus"
xmlns:p="http://primefaces.org/ui">
<h:head>
<title>Inicio</title>
</h:head>
<h:body>
<h:form>
<p:commandButton value="View1" icon="ui-icon-extlink" actionListener="#{EadBean.viewCars()}" ajax="false" immediate="true"/>
</h:form>
</h:body>
</html>
Método:
public void viewCars() {
System.out.println("ABRIR CFG");
Map<String, Object> options = new HashMap<String, Object>();
options.put("modal", true);
options.put("draggable", true);
options.put("resizable", false);
options.put("contentHeight", 300);
options.put("contentWidth", 400);
RequestContext.getCurrentInstance().openDialog("QuestionarioRealizado.xhtml", options, null);
System.out.println("ABRIR CFG - fim");
}
QuestionarioRealizado.xhtml
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:pt="http://xmlns.jcp.org/jsf/passthrough"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:opt="http://primefaces.prime.com.tr/optimus"
xmlns:p="http://primefaces.org/ui">
<h:head>
<title>Cars</title>
<style type="text/css">
.ui-widget {
font-size: 90%;
}
</style>
</h:head>
<h:body>
TESTE
</h:body>
</html>
e faces-config:
<?xml version="1.0" encoding="UTF-8"?>
<faces-config xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd"
version="2.2">
<application>
<action-listener>org.primefaces.application.DialogActionListener</action-listener>
<navigation-handler>org.primefaces.application.DialogNavigationHandler</navigation-handler>
<view-handler>org.primefaces.application.DialogViewHandler</view-handler>
</application>
</faces-config>
Alguém tem alguma idéia?