[Primefaces]la fenêtre de dialogue ne s'affiche pas
Bonjour ,une autre fois :P, j'ai un problème avec ma fenêtre de dialogue qui ne s'affiche pas et je ne sais pas pourquoi pourriez vous m'aider s'il vous plait
voici le code de l'appel
Code:
1 2 3 4
|
<p:commandLink actionListener="#{dialogueBean.viewtypeCustomized}" >
<p:graphicImage id="cash" value="./images/menuIcon/flouss.png" width="30" height="30" alt="payer en cash" />
</p:commandLink > |
le code de bean
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
package com.bouton.bean;
import java.util.HashMap;
import java.util.Map;
import org.primefaces.context.RequestContext;
public class DialogueBean {
public void viewtype() {
RequestContext.getCurrentInstance().openDialog("viewtype");
}
public void viewtypeCustomized() {
Map<String,Object> options = new HashMap<String, Object>();
options.put("modal", true);
options.put("draggable", false);
options.put("resizable", false);
options.put("contentHeight", 320);
//hint: available options are modal, draggable, resizable, width, height, contentWidth and contentHeight
RequestContext.getCurrentInstance().openDialog("viewtype", options, null);
}
} |
et ceci est le code de fenêtre de dialogue
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Dialogue</title>
</head>
<body>
<p:outputLabel><h1>hello show me please</h1></p:outputLabel>
</body>
</html> |
dernièrement le code de fichier faces-config.xml
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
<?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">
<managed-bean>
<managed-bean-name>dialogueBean</managed-bean-name>
<managed-bean-class>com.bouton.bean.DialogueBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
</faces-config> |