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

Struts 1 Java Discussion :

impossible de faire fonctionner DisplayTag


Sujet :

Struts 1 Java

  1. #1
    Membre à l'essai
    Profil pro
    Inscrit en
    Juin 2007
    Messages
    31
    Détails du profil
    Informations personnelles :
    Localisation : Maroc

    Informations forums :
    Inscription : Juin 2007
    Messages : 31
    Points : 24
    Points
    24
    Par défaut impossible de faire fonctionner DisplayTag
    Bonjour,

    je veux afficher un tableau avec Displaytag, je recupère une ListArray de la session mais l'affichage me donne l'erreur suivante


    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
    ATTENTION: Unable to instantiate class for pdf export. org.displaytag.export.PdfView was found, but required libraries are missing: com/lowagie/text/Element
    1 juil. 2007 10:36:53 org.displaytag.properties.TableProperties getLocaleResolverInstance
    INFO: No LocaleResolver configured.
    1 juil. 2007 10:36:53 org.apache.catalina.core.StandardWrapperValve invoke
    GRAVE: "Servlet.service()" pour la servlet jsp a généré une exception
    java.lang.NoClassDefFoundError:   
                                 org/apache/commons/beanutils/NestedNullException
    	at org.displaytag.tags.TemplateTag.evaluateExpression(TemplateTag.java:84)
    	at org.displaytag.tags.TableTag.initParameters(TableTag.java:847)
    	at org.displaytag.tags.TableTag.doStartTag(TableTag.java:722)
    	at org.apache.jsp.Emissions_jsp._jspx_meth_display_005ftable_005f0(Emissions_jsp.java:730)
    	at org.apache.jsp.Emissions_jsp._jspService(Emissions_jsp.java:400)
    	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328)

    j'ai telechargé et copié toutes les library necessaire à displaytag .

    Voila ce que j'ai ajouter au debut de ma page jsp

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    <%@ taglib uri="http://displaytag.sf.net" prefix="display" %>
    ------est ce qu'il y a une tld que je doi ajouter?


    voila ma page JSP:

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
     <%List emissList; 
                                  
     if((emissList=(List) session.getAttribute("emissList"))!=null && emissList.size()!=0)
              { %>
                 <display:table name="emissList">
                   <display:column property="idEmission" title="ID" />
                   <display:column property="datedebut" />
                   <display:column property="nomEmission" />
                   <display:column property="thematique" />
        <display:column property="heureD" title="Comments" />
      </display:table>
    Aidez moi à regler ce problème

    Merci d'avance

  2. #2
    Membre confirmé

    Inscrit en
    Avril 2005
    Messages
    317
    Détails du profil
    Informations forums :
    Inscription : Avril 2005
    Messages : 317
    Points : 553
    Points
    553
    Par défaut
    Il te manque certainement les dépendances...
    cf http://ewawszczyk.developpez.com/tut...ib-displaytag/
    Installation Guide : http://displaytag.sourceforge.net/11/install.html

  3. #3
    Expert éminent

    Femme Profil pro
    Inscrit en
    Juillet 2005
    Messages
    5 793
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : France

    Informations forums :
    Inscription : Juillet 2005
    Messages : 5 793
    Points : 7 778
    Points
    7 778
    Par défaut
    Soit il manque le commons-beanutils.jar sous WEB-INF/lib, soit tu n'as pas la bonne version.

  4. #4
    Membre à l'essai
    Profil pro
    Inscrit en
    Juin 2007
    Messages
    31
    Détails du profil
    Informations personnelles :
    Localisation : Maroc

    Informations forums :
    Inscription : Juin 2007
    Messages : 31
    Points : 24
    Points
    24
    Par défaut c resolu merci
    Bonjour ,
    C bon les amis merci pour votre aide
    a vrai dire je n'avais pas les bonnes versions des lib common
    merci encors une fois

    une autre chose c que je veux que mon tableau soit presenter avec un style
    est ce que vous pouvez me proposer un style et m'expliquer comment l'appliquer à mon tableau.
    Merci.

  5. #5
    Membre habitué
    Avatar de CPI_en_mousse
    Homme Profil pro
    Développeur Java
    Inscrit en
    Avril 2006
    Messages
    332
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Côte d'Or (Bourgogne)

    Informations professionnelles :
    Activité : Développeur Java
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Avril 2006
    Messages : 332
    Points : 168
    Points
    168
    Par défaut
    slt,

    tu encadre ton tableaudans une balise "div" comme ceci :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    <div id="beauxTableaux">
    qui appel les styles css definit comme suit :

    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
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    #beauxTableaux {}
     
    #beauxTableaux table {
       font-size: 12px;
       border: 1px solid #005894;
       width: 50%;
       //margin: 20px 0 20px 0 !important;
    }
     
    #beauxTableaux th,td {
       //padding: 2px 4px 2px 4px !important;
       //border : 1px solid #00bcf2;
       text-align: left;
       vertical-align: top;
       padding-right :25px;
    }
     
    #beauxTableaux thead tr {
       background-color: #00bcf2;
    }
     
    #beauxTableaux th.sorted {
       background-color: #005894;
    }
     
    #beauxTableaux th a,th a:visited {
       color: white; 
    }
     
    #beauxTableaux th a:hover {  
        text-decoration: underline;
       color: #777777;
    }
     
    #beauxTableaux th.sorted a,th.sortable a {
       background-position: right;
       display: block;
       width: 100%;
    }
     
    #beauxTableaux th.sortable a {
       background-image: url(../images/arrow_off.png);
       background-repeat :no-repeat ;
    }
     
    #beauxTableaux th.order1 a {
       background-image: url(../images/arrow_down.png);
       background-repeat :no-repeat ;
    }
     
    #beauxTableaux th.order2 a {
       background-image: url(../images/arrow_up.png);
       background-repeat :no-repeat ;
    }
     
    #beauxTableaux tr.odd {
       background-color: #EEE
    }
     
    #beauxTableaux tr.tableRowEven,tr.even {
       background-color: #afafb2
    }
     
    #beauxTableaux div.exportlinks {
       background-color: #005894;
       border: 1px dotted #005894;
       padding: 0px;
       margin: 0px;
       width: 50%;
    }
     
    #beauxTableaux span.export {
       padding: 0 4px 1px 20px;
       display: inline;
       display: inline-block;
       cursor: pointer;
    }
     
    #beauxTableaux span.excel {
       background-image: url(../images/ico_file_excel.png);
    }
     
    #beauxTableaux span.csv {
       background-image: url(../images/ico_file_csv.png);
    }
     
    #beauxTableaux span.xml {  
    background-image: url(../images/ico_file_xml.png);
    }
     
    #beauxTableaux span.pdf {
       background-image: url(../images/ico_file_pdf.png);
    }
     
    #beauxTableaux span.rtf {
       background-image: url(../images/ico_file_rtf.png);
    voila il te reste plus qu'a les redefinir pour obtenir ce que tu souhaite

    Si tu n'as plus de questions, n'oublie pas

Discussions similaires

  1. [Requête] Impossible de faire fonctionner !
    Par Nesta92 dans le forum Requêtes et SQL.
    Réponses: 3
    Dernier message: 17/04/2007, 09h38
  2. Réponses: 5
    Dernier message: 05/12/2006, 23h57
  3. impossible de faire fonctionner le gridlayout
    Par oceane751 dans le forum AWT/Swing
    Réponses: 6
    Dernier message: 12/06/2006, 10h42
  4. Réponses: 5
    Dernier message: 22/03/2006, 10h39
  5. impossible de faire fonctionner phppgadmin et pgdmin3
    Par le_ben dans le forum PostgreSQL
    Réponses: 6
    Dernier message: 09/12/2004, 14h27

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