I write here because I'm using Barcelona 1.0.1 theme with Primefaces 6.1.4 version.
I have problems trying to use Dialog Framework. I have followed all details about configuration that figures in the manual and I 've made a simple xhtml page to open it in a dialog. Indeed, I have same problem as this question https://stackoverflow.com/questions/275 ... og-to-work. I can execute without problems
"RequestContext.getCurrentInstance().showMessageInDialog(new FacesMessage(
FacesMessage.SEVERITY_INFO, "TEST", "It's a test."));"
but I don't understand why I can't execute other method from the instance.
My code files are the following:
application.xml
Code: Select all
<action-listener>org.primefaces.application.DialogActionListener</action-listener>
<navigation-handler>org.primefaces.application.DialogNavigationHandler</navigation-handler>
<view-handler>org.primefaces.application.DialogViewHandler</view-handler>
Code: Select all
<ui:composition 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"
xmlns:enova="http://java.sun.com/jsf/composite/enova"
template="/xhtml/include/template.xhtml">
<ui:define name="content">
<p:commandButton value="DIALOG FRAMEWORK"
icon="fa fa-check"
actionListener="#{mymanagedBean.openDlgTest}"/>
</ui:define>
</ui:composition>
Code: Select all
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:p="http://primefaces.org/ui">
<h:head>
<title>TEST</title>
</h:head>
<h:body>
<strong>This is a test</strong>
</h:body>
</html>
Code: Select all
/** For test Dialog Framework */
public void openDlgTest() {
//Dialog Framework
Map<String,Object> options = new HashMap<String, Object>();
options.put("modal", true);
options.put("width", 640);
options.put("height", 340);
options.put("contentWidth", "100%");
options.put("contentHeight", "100%");
options.put("headerElement", "customheader");
RequestContext.getCurrentInstance().openDialog("test", options, null);
// //Business logic (It works)
// RequestContext.getCurrentInstance().showMessageInDialog(new FacesMessage(
// FacesMessage.SEVERITY_INFO, "TEST", "It's a test."));
}
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"
xmlns:pe="http://primefaces.org/ui/extensions"
xmlns:sec="http://www.springframework.org/security/facelets/tags">
<h:head>
<h:outputScript library="primefaces" name="jquery/jquery.js" />
</h:head>
[...]