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 :

mon bouton ne fonctionne pas (icefaces)


Sujet :

JSF Java

  1. #1
    Membre à l'essai
    Inscrit en
    Avril 2010
    Messages
    20
    Détails du profil
    Informations forums :
    Inscription : Avril 2010
    Messages : 20
    Points : 17
    Points
    17
    Par défaut mon bouton ne fonctionne pas (icefaces)
    salut TLM


    je sais pas ou exactement mon pb, je suis débutant en ICefaces,
    ma page jspx

    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
    <?xml version="1.0" encoding="utf-8" ?>
    <jsp:root version="1.2" 
        xmlns:jsp="http://java.sun.com/JSP/Page"
    	xmlns:f="http://java.sun.com/jsf/core"
    	xmlns:h="http://java.sun.com/jsf/html"
    	xmlns:ice="http://www.icesoft.com/icefaces/component">
     
        <jsp:directive.page contentType="text/html;charset=utf-8" />
     
    <f:view>
        <ice:outputDeclaration doctypeRoot="HTML"
    			doctypePublic="-//W3C//DTD HTML 4.01 Transitional//EN"
    			doctypeSystem="http://www.w3.org/TR/html4/loose.dtd" />
        <html>
    	    <head>
    		   <title>ICEfaces, Ajax for Java EE</title>
               <link rel="stylesheet" type="text/css" href="./xmlhttp/css/rime/rime.css" />
    		</head>
    		<body>
     
    		    <ice:form>
    			 <f:view>
    	<ice:commandButton value="liste" action="#{tech.doListTechnicien}" style="font-size: 15px"></ice:commandButton>
    			</f:view>
     
     
    		    </ice:form>
    		</body>
        </html>
    </f:view>
    </jsp:root>


    la page resultat


    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
    <?xml version="1.0" encoding="utf-8" ?>
    <jsp:root version="1.2" 
      xmlns:jsp="http://java.sun.com/JSP/Page"
       xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ice="http://www.icesoft.com/icefaces/component">
    <jsp:directive.page contentType="text/html;charset=utf-8" />
    <f:view>
      <ice:outputDeclaration doctypeRoot="HTML" doctypePublic="-//W3C//DTD HTML 4.01 Transitional//EN" doctypeSystem="http://www.w3.org/TR/html4/loose.dtd"/>
      <html>
        <head>
         <title><ice:outputText value="ICEfaces, Ajax for Java EE" /></title>
         <ice:outputStyle href="./xmlhttp/css/rime/rime.css" />
        </head>
        <body>
     
         <ice:outputText value="Thank you for using ICEfaces." />
         <ice:form>
     
    		</ice:form>
     
        </body>
      </html>
    </f:view>
    </jsp:root>

    mon controleur


    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
    package web;
     
    import java.io.IOException;
    import java.text.ParseException;
    import java.text.SimpleDateFormat;
    import java.util.*;
     
     
    import javax.servlet.ServletConfig;
    import javax.servlet.ServletException;
    import javax.servlet.http.* ;
     
    import net.sf.cglib.proxy.*;
     
    import org.springframework.context.ApplicationContext;
    import org.springframework.context.support.ClassPathXmlApplicationContext;
     
     
    import service.IService;
    import dao.DaoException;
    import entites.*;
     
     
    public class Tech {
    	private List<Technicien> techniciens;
    	// service
    	private IService service = null;
     
    	public Tech(){
     
    	}
     
    	public String doListTechnicien(){
     
     
    		System.out.println("ca passe");
    		return "list";
    		}
     
     
     
    	public List<Technicien> getTechniciens() {
    	return techniciens;
    }
     
     
    public void setTechniciens(List<Technicien> techniciens) {
    	this.techniciens = techniciens;
    }
    	}


    et face-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
    <?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_1_2.xsd"
        version="1.2">
     
     
    	<managed-bean>
    	<managed-bean-name>tech</managed-bean-name>
    		<managed-bean-class>web.Tech</managed-bean-class>
    		<managed-bean-scope>session</managed-bean-scope>
    	</managed-bean>
     
    	<navigation-rule>
    		<display-name>list</display-name>
    		<from-view-id>/acui.jspx</from-view-id>
    		<navigation-case>
    			<from-outcome>list</from-outcome>
    			<to-view-id>/cherche.jspx</to-view-id>
    			<redirect />
    		</navigation-case>
    	</navigation-rule>
    </faces-config>

  2. #2
    Membre averti Avatar de liquideshark
    Homme Profil pro
    Chercheur en informatique
    Inscrit en
    Septembre 2006
    Messages
    347
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Maroc

    Informations professionnelles :
    Activité : Chercheur en informatique
    Secteur : Service public

    Informations forums :
    Inscription : Septembre 2006
    Messages : 347
    Points : 325
    Points
    325
    Par défaut
    Salut ,

    Je ne suis pas spécialiste en ice essaye de checker encore une fois ta jspx:

    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
    <?xml version="1.0" encoding="utf-8" ?>
    <jsp:root version="1.2" 
        xmlns:jsp="http://java.sun.com/JSP/Page"
    	xmlns:f="http://java.sun.com/jsf/core"
    	xmlns:h="http://java.sun.com/jsf/html"
    	xmlns:ice="http://www.icesoft.com/icefaces/component">
    	
        <jsp:directive.page contentType="text/html;charset=utf-8" />
     
    <f:view>
    
    .....
      <ice:form>
    			 <f:view>
    	<ice:commandButton value="liste" action="#{tech.doListTechnicien}" style="font-size: 15px"></ice:commandButton>
    			</f:view>
         
    		    </ice:form>
    je remarque que t'utilise <f:view> à 2 reprises, es ce correct ?

  3. #3
    Membre à l'essai
    Inscrit en
    Avril 2010
    Messages
    20
    Détails du profil
    Informations forums :
    Inscription : Avril 2010
    Messages : 20
    Points : 17
    Points
    17
    Par défaut
    merci bien liquideshark

    ta raison le code correcte 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
       <?xml version="1.0" encoding="utf-8" ?>
    <jsp:root version="1.2" 
        xmlns:jsp="http://java.sun.com/JSP/Page"
    	xmlns:f="http://java.sun.com/jsf/core"
    	xmlns:h="http://java.sun.com/jsf/html"
    	xmlns:ice="http://www.icesoft.com/icefaces/component">
     
        <jsp:directive.page contentType="text/html;charset=utf-8" />
     
    <f:view>
        <ice:outputDeclaration doctypeRoot="HTML"
    			doctypePublic="-//W3C//DTD HTML 4.01 Transitional//EN"
    			doctypeSystem="http://www.w3.org/TR/html4/loose.dtd" />
        <html>
    	    <head>
    		   <title>ICEfaces, Ajax for Java EE</title>
               <link rel="stylesheet" type="text/css" href="./xmlhttp/css/rime/rime.css" />
    		</head>
     
    		<body>
    		    <ice:form style="width: 146px; height: 48px">
    		    <ice:commandButton 
    			 value="liste" action="#{tech.doListTechnicien}" 
    			 style="font-size: 16px; line-height: normal; color:       #FF0080; font-style: normal; width: 114px;">
    			 </ice:commandButton>
    		</ice:form>	    
     
    		</body>
        </html>
    </f:view>
    </jsp:root>

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. Le bouton submit de mon formulaire ne fonctionne pas avec Firefox
    Par vladoche dans le forum Balisage (X)HTML et validation W3C
    Réponses: 4
    Dernier message: 23/10/2009, 22h39
  2. le click de mon bouton ne fonctionne pas
    Par tilily dans le forum ASP.NET
    Réponses: 10
    Dernier message: 02/03/2009, 12h00
  3. Mon beau bouton ne fonctionne pas
    Par Dounne dans le forum Flash
    Réponses: 5
    Dernier message: 06/09/2006, 13h19
  4. [VBA-E] Undo après action bouton ne fonctionne pas
    Par TicTacToe dans le forum Macros et VBA Excel
    Réponses: 8
    Dernier message: 26/04/2006, 12h53
  5. mon trigger ne fonctionne pas !
    Par japi33 dans le forum SQL Procédural
    Réponses: 2
    Dernier message: 20/03/2006, 21h26

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