IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

JSF Java Discussion :

[richfaces 4]probleme affichage popupPanel


Sujet :

JSF Java

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre éclairé Avatar de amadoulamine1
    Inscrit en
    Avril 2005
    Messages
    260
    Détails du profil
    Informations forums :
    Inscription : Avril 2005
    Messages : 260
    Par défaut [richfaces 4]probleme affichage popupPanel
    Bonjour à tous j'ai une configuration jsf2.1.1 + spring 3.05 + richfaces 4.0.0.Final
    le probleme le richpopup panel n'arrive pas à se lancer quand je regarde la console d'erreur du navigateur il me met
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    Uncaught ReferenceError: RichFaces is not defined
    Uncaught TypeError: Cannot call method 'addEventListener' of null
    voici le code de la page
    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
    <!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:a4j="http://richfaces.org/a4j"
    	xmlns:rich="http://richfaces.org/rich">
    <h:form id="locals">
    	<f:view>
    		<h:commandButton value="Call the popup">
    			<rich:componentControl target="popup" operation="show" />
    		</h:commandButton>
     
    		<rich:popupPanel show="true" id="popup" modal="true" resizeable="true"
    			onmaskclick="#{rich:component('locals:popup')}.hide()">
    			<f:facet name="header">
    				<h:outputText value="Simple popup panel" />
    			</f:facet>
    			<f:facet name="controls">
    				<h:outputLink value="#"
    					onclick="#{rich:component('locals:popup')}.hide(); return false;">
    X
    </h:outputLink>
    			</f:facet>
    			<p>Additionally there you could check how to handle the clicks
    				outside the panel.</p>
    			<p>In this sample the click outside - closes the panel as well as
    				clicking hide control in the header</p>
    		</rich:popupPanel>
    	</f:view>
    </h:form>
    </html>
    quelqu'un peut il bien m'aider svp

  2. #2
    Membre actif
    Inscrit en
    Juillet 2006
    Messages
    28
    Détails du profil
    Informations forums :
    Inscription : Juillet 2006
    Messages : 28
    Par défaut
    essayer ça
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
     
    <a4j:commandButton oncomplete="#{rich:component('popup')}.show();" value="Call the popup">
    		</a4j:commandButton>

  3. #3
    Membre éclairé Avatar de amadoulamine1
    Inscrit en
    Avril 2005
    Messages
    260
    Détails du profil
    Informations forums :
    Inscription : Avril 2005
    Messages : 260
    Par défaut
    salut merci pour ta reponse.
    Je l'ai fait mais c'est comme si le javasqcript ne s'executait pas.
    car ca fait la meme chose avec les rich:panel,rich:togglePanel et beaucoup d'autres composant
    j'ajoute 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
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app 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_2_5.xsd"
    	version="2.5">
     
    	<display-name>JSF2 and Spring 3.0 tutorial</display-name>
     
    	<context-param>
    		<param-name>contextConfigLocation</param-name>
    		<param-value>classpath:application-context*.xml</param-value>
    	</context-param>
     
    	<context-param>
    		<param-name>log4jConfigLocation</param-name>
    		<param-value>classpath:log4j.properties</param-value>
    	</context-param>
     
    	<context-param>
    		<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
    		<param-value>.xhtml</param-value>
    	</context-param>
     
    <context-param>
            <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
            <param-value>client</param-value>
        </context-param>
     
        <context-param>
            <param-name>org.richfaces.ENABLE_CONTROL_SKINNING</param-name>
            <param-value>true</param-value>
        </context-param>
     
        <context-param>
            <param-name>org.richfaces.ENABLE_CONTROL_SKINNING_CLASSES</param-name>
            <param-value>false</param-value>
        </context-param>
     
        <context-param>
            <param-name>org.richfaces.SKIN</param-name>
            <param-value>skyBlue</param-value>
        </context-param>
     
    	<context-param>
    		<param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
    		<param-value>com.sun.facelets.FaceletViewHandler</param-value>
    	</context-param>
    	<!--context-param> <param-name>javax.faces.DISABLE_FACELET_JSF_VIEWHANDLER</param-name> 
    		<param-value>true</param-value> </context-param-->
    	<filter>
    		<filter-name>springSecurityFilterChain</filter-name>
    		<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
    	</filter>
    	<filter-mapping>
    		<filter-name>springSecurityFilterChain</filter-name>
    		<url-pattern>/*</url-pattern>
    		<dispatcher>FORWARD</dispatcher>
    		<dispatcher>REQUEST</dispatcher>
    	</filter-mapping>
     
    	<listener>
    		<listener-class>com.sun.faces.config.ConfigureListener</listener-class>
    	</listener>
    	<listener>
    		<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    	</listener>
    	<listener>
    		<listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
    	</listener>
     
    	<servlet>
    		<servlet-name>Faces Servlet</servlet-name>
    		<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    		<load-on-startup>1</load-on-startup>
    	</servlet>
    	<servlet-mapping>
    		<servlet-name>Faces Servlet</servlet-name>
    		<url-pattern>*.jsf</url-pattern>
    	</servlet-mapping>
     
    	<welcome-file-list>
    		<welcome-file>index.html</welcome-file>
    	</welcome-file-list>
     
    </web-app>
    et faces config.xml
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    <?xml version='1.0' encoding='UTF-8'?>
    <faces-config 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"
    	version="2.0">
     
    	<application>
    		<el-resolver>org.springframework.web.jsf.el.SpringBeanFacesELResolver</el-resolver>
    	</application>
     
    </faces-config>
    O fait je ne sais pas si c'est la cause du probleme ou pas mais dans la partie ressource le faces-config de richfaces4 est en rouge 'capture photo ci jointe'
    Images attachées Images attachées  

  4. #4
    Membre éclairé Avatar de amadoulamine1
    Inscrit en
    Avril 2005
    Messages
    260
    Détails du profil
    Informations forums :
    Inscription : Avril 2005
    Messages : 260
    Par défaut
    ouf j'ai trouvé o fait il fallait juste mettre le <h:head/> sur la page sinon il ne voit pas les ressources .

    Merci

Discussions similaires

  1. probleme affichage element richfaces avec skin par defaut
    Par amadoulamine1 dans le forum JSF
    Réponses: 1
    Dernier message: 23/06/2011, 13h41
  2. Probleme affichage de mon site
    Par Braq dans le forum Webdesign & Ergonomie
    Réponses: 15
    Dernier message: 10/08/2005, 14h08
  3. problem affichage avec HTML::TableExtract
    Par rootdaoud dans le forum Web
    Réponses: 2
    Dernier message: 04/07/2005, 19h35
  4. Probleme affichage noir quand Build/Compile
    Par balabi dans le forum MFC
    Réponses: 3
    Dernier message: 01/06/2005, 16h12
  5. Probleme affichage dans tableau selon requête
    Par moulette85 dans le forum Langage SQL
    Réponses: 11
    Dernier message: 01/03/2005, 15h44

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo