Bonjour à tous,

j'utilise jsf2.0 et cdi ... dans mon template lorsque j'utilise
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
 <h:selectOneMenu valueChangeListener="#{localeSelector.select}">
                    <f:selectItems value="#{locale.supportedLocales}"/>
             </h:selectOneMenu>
je recois un liste vide de supportedLocales ...

voici mon faces config:

Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
<?xml version="1.0" encoding="UTF-8"?>
<!-- This file is not required if you don t need any extra configuration. -->
<faces-config version="2.0"
    xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="
        http://java.sun.com/xml/ns/javaee
        http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd">
 
    <factory>
        <external-context-factory>be.context.CustomExternalContextFactory</external-context-factory>
    </factory>   
 
    <application>
        <locale-config>
            <default-locale>en</default-locale>
            <supported-locale>en</supported-locale>
            <supported-locale>fr</supported-locale>
            <supported-locale>nl</supported-locale>
        </locale-config>     
 
        <resource-bundle>
            <base-name>be.CustomResourceBundle</base-name>
            <var>msg</var>
        </resource-bundle>   
    </application>
</faces-config>
et mon web.xml

Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
28
29
30
31
32
 
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0"
    xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="
        http://java.sun.com/xml/ns/javaee
        http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
 
 
    <!-- JSF 2.0 Servlet activates automatically when the WEB-INF/faces-config.xml descriptor is present -->
    <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>*.jsf</url-pattern>
    </servlet-mapping>
 
    <servlet>
        <servlet-name>Faces Servlet</servlet-name>
        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>
 
    <context-param>
        <param-name>javax.faces.FACELETS_RESOURCE_RESOLVER</param-name>
        <param-value>be.resolver.CustomResourceResolver</param-value>
    </context-param>
 
    <context-param>  
        <param-name>primefaces.THEME</param-name>  
        <param-value>aristo</param-value>  
    </context-param>  
</web-app>
J'ai oublié de mettre un listener dans mon web.xml ???

Jamila