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 :

A4J et Richfaces ne marche pas


Sujet :

JSF Java

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    storm_2000
    Invité(e)
    Par défaut A4J et Richfaces ne marche pas
    Bonjour,

    j'ai un petit problème avec Aj4 et Richfaces. La compilation, déployement ce passe très bien. Cependant, quand je veux voir ma page test.html je peux voir :
    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
     
    <!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:a4j="http://richfaces.org/a4j" xmlns:rich="http://richfaces.org/rich">
    	<head>
    		<title></title>
    	</head>
    	<body>Utilisateur 1
    <form id="j_id4" name="j_id4" method="post" action="/pimty/test.html" enctype="application/x-www-form-urlencoded">
    <input type="hidden" name="j_id4" value="j_id4" />
     
    				<rich:panel bodyClass="rich-laguna-panel-no-header">
    					<a4j:commandButton value="Set Name to Alex" reRender="rep">
     
    						<a4j:actionparam name="username" value="Alex" assignTo="Utilisateur 1"></a4j:actionparam>
    					</a4j:commandButton>
    					<rich:spacer width="20"></rich:spacer>
    					<a4j:commandButton value="Set Name to John" reRender="rep">
    						<a4j:actionparam name="username" value="John" assignTo="Utilisateur 1"></a4j:actionparam>
    					</a4j:commandButton>
    				</rich:panel>
    				<rich:spacer height="1"></rich:spacer>
    				<rich:panel bodyClass="rich-laguna-panel-no-header"><span id="j_id4:rep">Selected Name:Utilisateur 1</span>
     
    				</rich:panel><input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="j_id3:j_id4" />
    </form>
    	</body>
    </html>
    Voilà le début de ma page test.xhtml
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
     
    <!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:ui="http://java.sun.com/jsf/facelets"
    	xmlns:f="http://java.sun.com/jsf/core"
    	xmlns:h="http://java.sun.com/jsf/html"
    	xmlns:a4j="http://richfaces.org/a4j"
    	xmlns:rich="http://richfaces.org/rich">

    D'ou peut venir le problème ?

  2. #2
    Rédacteur
    Avatar de romaintaz
    Homme Profil pro
    Java craftsman
    Inscrit en
    Juillet 2005
    Messages
    3 790
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 47
    Localisation : France, Yvelines (Île de France)

    Informations professionnelles :
    Activité : Java craftsman
    Secteur : Finance

    Informations forums :
    Inscription : Juillet 2005
    Messages : 3 790
    Par défaut
    Bonjour,

    Je ne comprends pas bien ton problème...
    Que se passe-t-il quand tu visualises ta page avec ton navigateur ?
    Y a t'il des choses intéressantes dans les logs de ton serveur ?
    Nous sommes tous semblables, alors acceptons nos différences !
    --------------------------------------------------------------
    Liens : Blog | Page DVP | Twitter
    Articles : Hudson | Sonar | Outils de builds Java Maven 3 | Play! 1 | TeamCity| CitConf 2009
    Critiques : Apache Maven

  3. #3
    storm_2000
    Invité(e)
    Par défaut
    La page web s'affiche mais rien dans l'écran. Quand je vais voir le code source de ma page web, je peux voir :
    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
     
    !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:a4j="http://richfaces.org/a4j" xmlns:rich="http://richfaces.org/rich">
    	<head>
    		<title></title>
    	</head>
    	<body>Utilisateur 1
    <form id="j_id4" name="j_id4" method="post" action="/pimty/test.html" enctype="application/x-www-form-urlencoded">
    <input type="hidden" name="j_id4" value="j_id4" />
     
    				<rich:panel bodyClass="rich-laguna-panel-no-header">
    					<a4j:commandButton value="Set Name to Alex" reRender="rep">
     
    						<a4j:actionparam name="username" value="Alex" assignTo="Utilisateur 1"></a4j:actionparam>
    					</a4j:commandButton>
    					<rich:spacer width="20"></rich:spacer>
    					<a4j:commandButton value="Set Name to John" reRender="rep">
    						<a4j:actionparam name="username" value="John" assignTo="Utilisateur 1"></a4j:actionparam>
    					</a4j:commandButton>
    				</rich:panel>
    				<rich:spacer height="1"></rich:spacer>
    				<rich:panel bodyClass="rich-laguna-panel-no-header"><span id="j_id4:rep">Selected Name:Utilisateur 1</span>
     
    				</rich:panel><input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="j_id3:j_id4" />
    </form>
    	</body>
    </html>
    Donc j'en déduis que les balises richfaces et a4j ne sont pas traitée. Sinon il n'y a aucune exception quand je vais voir les logs du serveur.

  4. #4
    Membre confirmé
    Profil pro
    Inscrit en
    Août 2008
    Messages
    158
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Août 2008
    Messages : 158
    Par défaut
    je me trompe peut etre, mais il te manquerais pas les balises <f:view></f:view> qui devraient encadrer ton form?

  5. #5
    storm_2000
    Invité(e)
    Par défaut
    Le code donnée est le code html généré. La source est :
    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
     
    <!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:ui="http://java.sun.com/jsf/facelets"
    	xmlns:f="http://java.sun.com/jsf/core"
    	xmlns:h="http://java.sun.com/jsf/html"
    	xmlns:a4j="http://richfaces.org/a4j"
    	xmlns:rich="http://richfaces.org/rich">
    	<head>
    		<title><ui:insert name="titre" /></title>
    	</head>
    	<body>
    		<f:view>
    			<h:outputText value="#{userBean.name}" />
    			<h:form>
    				<rich:panel bodyClass="rich-laguna-panel-no-header">
    					<a4j:commandButton value="Set Name to Alex" reRender="rep">
    						<a4j:actionparam name="username" value="Alex"
    							assignTo="#{userBean.name}" />
    					</a4j:commandButton>
    					<rich:spacer width="20" />
    					<a4j:commandButton value="Set Name to John" reRender="rep">
    						<a4j:actionparam name="username" value="John"
    							assignTo="#{userBean.name}" />
    					</a4j:commandButton>
    				</rich:panel>
    				<rich:spacer height="1" />
    				<rich:panel bodyClass="rich-laguna-panel-no-header">
    					<h:outputText id="rep" value="Selected Name:#{userBean.name}" />
    				</rich:panel>
    			</h:form>
    		</f:view>
    	</body>
    </html>

Discussions similaires

  1. TabPanel RichFaces ne marche pas
    Par maserati dans le forum Frameworks Web
    Réponses: 10
    Dernier message: 03/01/2012, 10h53
  2. Réponses: 19
    Dernier message: 22/07/2010, 17h40
  3. [RichFaces]DataScroller ne marche pas
    Par Hanoni dans le forum JSF
    Réponses: 6
    Dernier message: 07/07/2010, 16h32
  4. a4j:jsFunction ne marche pas sur fireFox
    Par badreddine540 dans le forum JSF
    Réponses: 2
    Dernier message: 06/01/2010, 11h02
  5. FileUpload de richfaces qui ne marche pas
    Par ouedmouss dans le forum JSF
    Réponses: 5
    Dernier message: 02/03/2009, 15h29

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