Here the test case (it can be reproduced every 3-4 times)
Base Page
Code: Select all
<!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:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.org/ui">
<h:head>
<title>Test Menu</title>
</h:head>
<h:body styleClass="login-body logout">
<h:outputStylesheet name="css/layout-amber.css" library="babylon-layout" />
<h:form>
<p:commandLink id="dynaButton" value="Show" icon="pi pi-external-link"/>
<p:tieredMenu overlay="true" trigger="dynaButton" my="left top" at="left bottom" style="width:200px">
<p:submenu label="File" icon="pi pi-fw pi-file">
<p:submenu label="New" icon="pi pi-fw pi-plus">
<p:menuitem value="Bookmark" icon="pi pi-fw pi-bookmark" actionListener="#{infogridHandler.helloDialog}"/>
<p:menuitem value="Video" icon="pi pi-fw pi-video"/>
</p:submenu>
<p:menuitem value="Delete" icon="pi pi-fw pi-trash"/>
<p:divider />
<p:menuitem value="Export" icon="pi pi-fw pi-external-link"/>
</p:submenu>
</p:tieredMenu>
</h:form>
</h:body>
</html>
Code: Select all
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:p="http://primefaces.org/ui">
<h:head>
<title>Hello</title>
</h:head>
<h:body styleClass="dark">
Hello, World!
</h:body>
</html>
Code: Select all
import org.primefaces.PrimeFaces;
import javax.faces.view.ViewScoped;
import javax.inject.Named;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Named
@ViewScoped
public class DialogHandler implements java.io.Serializable{
public void showHelloDialog(){
Map<String, Object> options = new HashMap<String, Object>();
options.put("modal", true);
options.put("draggable", true);
options.put("resizable", true);
options.put("width",800);
options.put("height",800);
options.put("contentWidth", "100%");
options.put("contentHeight", "100%");
options.put("includeViewParams",true);
options.put("closeOnEscape",true);
Map<String, List<String>> params = new HashMap<String, List<String>>();
PrimeFaces.current().dialog().openDynamic("helloDialog", options, params);
}
}