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

Taglibs Java Discussion :

IterationTag [Custom Tags 2.0]


Sujet :

Taglibs Java

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre émérite

    Homme Profil pro
    Senior Développeur JEE
    Inscrit en
    Avril 2002
    Messages
    795
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 50
    Localisation : Belgique

    Informations professionnelles :
    Activité : Senior Développeur JEE
    Secteur : Finance

    Informations forums :
    Inscription : Avril 2002
    Messages : 795
    Par défaut IterationTag
    Bonjour à tous,

    j'ai un petit soucis avec les taglibs.
    J'utilise un IterationTag pour afficher une table des enregistrements trouvés.
    Le problème est que quand il trouve une correspondance dans la base de données il ne m'affiche rien du tout dans la table.
    Je vais vous afficher les différentes parties du code utilisé.

    Tout d'abord mon fichier TLD:

    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
    <?xml version="1.0" encoding="UTF-8"?>
    <taglib xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee web-jsptaglibrary_2_0.xsd" version="2.0">
      <tlib-version>2.0</tlib-version>
      <short-name>registrationtag</short-name>
      <uri>/WEB-INF/tlds/RegistrationTag</uri>
      <tag>
        <name>RegistrationTag</name>
        <tag-class>tagClasses.RegistrationTag</tag-class>
        <body-content>JSP</body-content>
        <attribute>
            <name>reg</name>
            <required>true</required>
            <rtexprvalue>true</rtexprvalue>
        </attribute>
      </tag>
    </taglib>
    Ensuite ma classe qui éténd IterationTag :

    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
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    /*
     * RegistrationTag.java
     *
     * Created on 11 February 2005, 14:38
     */
     
    package tagClasses;
     
    import java.io.IOException;
    import javax.servlet.jsp.JspTagException;
    import javax.servlet.jsp.JspWriter;
    import javax.servlet.jsp.tagext.BodyContent;
    import javax.servlet.jsp.tagext.TagSupport;
    import javax.servlet.jsp.tagext.Tag;
    import javax.servlet.jsp.tagext.IterationTag;
    import suzanweb.Registration;
    import java.util.*;
    import org.apache.log4j.*;
     
    /**
     * Generated tag handler class.
     * @author  delcrst
     * @version
     */
     
    public class RegistrationTag extends TagSupport {
     
        private Registration reg;
        private Vector rec = null;
        private Vector rows = null;
        private int rowNum = 0;
        private int counter = 0;
        Logger cat  = Logger.getLogger("RegistrationTag");
     
        public RegistrationTag() {
            super();
            cat.info("starting RegistrationTag");
        }
     
        public void setReg(Registration reg)
        {
            this.reg = reg;
        }
     
        public int doStartTag() throws JspTagException 
        {       
     	rec = reg.getRecSet();
    	counter = rec.size();
            cat.info("Starting doStartTag()");
            cat.info("Registration size : "+counter);
     
            if(counter > 0)
            {
                rows = (Vector)rec.get(rowNum);
                setVariables(rows);
                rowNum++;
                return Tag.EVAL_BODY_INCLUDE;
            }
            else
            {
                return Tag.SKIP_BODY;
            }
        }
     
     
        public int doEndTag() throws JspTagException
        {
             cat.info("Starting doEndTag()");
             return Tag.EVAL_PAGE;
        }
     
     
        public int doAfterBody() throws JspTagException 
        {
             cat.info("Starting doAfterBody()");
            if(counter > 0 && rowNum <= rec.size())
            {
                rows = (Vector)rec.get(rowNum);
                setVariables(rows);
                rowNum++;
                return IterationTag.EVAL_BODY_AGAIN;
            }
            else
            {
                return Tag.SKIP_BODY;
            }
     
        }
     
     
     
        private void setVariables(Vector rows)
        {
            cat.info("Starting setVariables()");
            cat.info("rows size : "+rows.size());
     
            pageContext.setAttribute("registrationID",(String)rows.get(0));
    	pageContext.setAttribute("callCode",(String)rows.get(1));
    	pageContext.setAttribute("proposalID",(String)rows.get(2));
    	pageContext.setAttribute("proposalNr",(String)rows.get(3));
    	pageContext.setAttribute("coordinatorID",(String)rows.get(4));
    	pageContext.setAttribute("partnerID",(String)rows.get(5));
    	pageContext.setAttribute("coordinatorName",(String)rows.get(6));
    	pageContext.setAttribute("coordinatorEmail",(String)rows.get(7));
    	pageContext.setAttribute("telephone",(String)rows.get(8));
    	pageContext.setAttribute("fax",(String)rows.get(9));
    	pageContext.setAttribute("country",(String)rows.get(10));
    	pageContext.setAttribute("companyName",(String)rows.get(11));
    	pageContext.setAttribute("title",(String)rows.get(12));
    	pageContext.setAttribute("acronym",(String)rows.get(13));
    	pageContext.setAttribute("status",(String)rows.get(14));
    	pageContext.setAttribute("lastSubmission",(String)rows.get(15));
    	pageContext.setAttribute("preparation",(String)rows.get(16));
    	pageContext.setAttribute("instrument",(String)rows.get(17));
        }
     
    }
    Et enfin le morceau de ma JSP où est inclus mon taglib :

    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
    <registration:RegistrationTag reg="${sessionScope.Regist}">
    		<TR>
                        <form action="RegistrationServlet" method="POST">
    			<TD><input type="submit" width="15" value="Details"></TD>
    			<TD><input type="text"  value="${sessionScope.registrationID}" name="Registrationid"></TD>
    		</form>
    			<TD><input type="text" disabled value="${sessionScope.registrationID}"></TD>
    			<TD><input type="text" disabled value="${sessionScope.callCode}"></TD>
    			<TD><input type="text" disabled value="${sessionScope.registrationID}"></TD>
    			<TD><input type="text" disabled value="${sessionScope.registrationID}"></TD>
    			<TD><input type="text" disabled value="${sessionScope.registrationID}"></TD>
    			<TD><input type="text" disabled value="${sessionScope.registrationID}"></TD>
    			<TD><input type="text" disabled value="${sessionScope.registrationID}"></TD>
    			<TD><input type="text" disabled value="${sessionScope.registrationID}"></TD>
    			<TD><input type="text" disabled value="${sessionScope.registrationID}"></TD>
    			<TD><input type="text" disabled value="${sessionScope.registrationID}"></TD>
    			<TD><input type="text" disabled value="${sessionScope.registrationID}"></TD>
    			<TD><input type="text" disabled value="${sessionScope.registrationID}"></TD>
    			<TD><input type="text" disabled value="${sessionScope.registrationID}"></TD>
    			<TD><input type="text" disabled value="${sessionScope.registrationID}"></TD>
    			<TD><input type="text" disabled value="${sessionScope.registrationID}"></TD>
    			<TD><input type="text" disabled value="${sessionScope.registrationID}"></TD>	
    			<TD><input type="text" disabled value="${sessionScope.registrationID}"></TD>	
     
    		<TR>	
    		</registration:RegistrationTag>
    Ne faites pas attention aux value dans les TD c'était juste pour effectuer un test.

    Le plus bizarre est que quand j'appelle la page elle s'affiche comme cela

    première page

    Quand je clique sur le bouton find et que la servlet retrouve une ligne correspondante dans la base de données, la première ligne de ma table contenant le titre des colonnes ne s'affiche plus. et les renseignements correspondants à ma recherche ne sont pas affichés non plus.

    deuxième image

    Par contre si la servlet ne retrouve pas de ligne correspondante dans la base de données, la première ligne de ma table contenant les titre des colonnes sont réaffichés.

    Voici ce que m'affiche le fichier log

    INFO : 2005-02-12 13:21:25,820 starting RegistrationTag
    INFO : 2005-02-12 13:21:25,820 Starting doStartTag()
    INFO : 2005-02-12 13:21:25,820 Registration size : 0
    INFO : 2005-02-12 13:21:25,820 Starting doEndTag()
    INFO : 2005-02-12 13:21:55,601 Starting doStartTag()
    INFO : 2005-02-12 13:21:55,601 Registration size : 0
    INFO : 2005-02-12 13:21:55,601 Starting doEndTag()
    INFO : 2005-02-12 13:22:04,148 Starting doStartTag()
    INFO : 2005-02-12 13:22:04,148 Registration size : 1
    INFO : 2005-02-12 13:22:04,164 Starting setVariables()
    INFO : 2005-02-12 13:22:04,164 rows size : 18
    Toutes suggestion est la bienvenue.

    d'avance pour vos réponses

    PS: Dédolé pour le titre mais je ne savais pas quoi mettre

  2. #2
    ego
    ego est déconnecté
    Rédacteur

    Homme Profil pro
    Architecte de système d'information
    Inscrit en
    Juillet 2004
    Messages
    1 883
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 57
    Localisation : France, Hauts de Seine (Île de France)

    Informations professionnelles :
    Activité : Architecte de système d'information
    Secteur : Finance

    Informations forums :
    Inscription : Juillet 2004
    Messages : 1 883
    Billets dans le blog
    2
    Par défaut
    moi je ne comprend pas ton rowNum++
    Comment est utilisé cette variable ? on passe une fois dans le tag et ensuite ?

  3. #3
    Membre émérite

    Homme Profil pro
    Senior Développeur JEE
    Inscrit en
    Avril 2002
    Messages
    795
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 50
    Localisation : Belgique

    Informations professionnelles :
    Activité : Senior Développeur JEE
    Secteur : Finance

    Informations forums :
    Inscription : Avril 2002
    Messages : 795
    Par défaut
    C'est moi qui ai mal travaillé. Je dois normalement utiliser un Enumeration.

    Cela n'empêche que mon problème est toujours là.

    Voilà une nouvelle version de ma classe Tag

    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
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    /*
     * RegistrationTag.java
     *
     * Created on 11 February 2005, 14:38
     */
     
    package tagClasses;
     
    import java.io.IOException;
    import javax.servlet.jsp.JspTagException;
    import javax.servlet.jsp.JspException;
    import javax.servlet.jsp.JspWriter;
    import javax.servlet.jsp.tagext.BodyContent;
    import javax.servlet.jsp.tagext.TagSupport;
    import javax.servlet.jsp.tagext.SimpleTagSupport;
    import javax.servlet.jsp.tagext.Tag;
    import javax.servlet.jsp.tagext.IterationTag;
    import suzanweb.Registration;
    import java.util.*;
    import org.apache.log4j.*;
     
    /**
     * Generated tag handler class.
     * @author  delcrst
     * @version
     */
     
    public class RegistrationTag extends TagSupport {
     
        private Registration reg;
        private Enumeration rec = null;
        private Vector rows = null;
     
        Logger cat  = Logger.getLogger("RegistrationTag");
     
        public RegistrationTag() {
            super();
            cat.info("starting RegistrationTag");
        }
     
        public void setReg(Registration reg)
        {
            this.reg = reg;
        }
     
        public int doStartTag() throws JspTagException 
        {       
     	rec = reg.getRecSet().elements();
    	cat.info("Starting doStartTag()");
     
            if(rec.hasMoreElements())
            {
                rows = (Vector)rec.nextElement();
                setVariables(rows);
     
                return Tag.EVAL_BODY_INCLUDE;
            }
            else
            {
                return Tag.SKIP_BODY;
            }
        }
     
     
        public int doEndTag() throws JspTagException
        {
             cat.info("Starting doEndTag()");
             return Tag.EVAL_PAGE;
        }
     
     
        public int doAfterBody() throws JspTagException 
        {
             cat.info("Starting doAfterBody()");
            if(rec.hasMoreElements())
            {
                rows = (Vector)rec.nextElement();
                setVariables(rows);
     
                return IterationTag.EVAL_BODY_AGAIN;
            }
            else
            {
                return Tag.SKIP_BODY;
            }
     
        }
     
     
     
        private void setVariables(Vector rows)
        {
            cat.info("Starting setVariables()");
            cat.info("rows size : "+rows.size());
     
            pageContext.setAttribute("registrationID",(String)rows.get(0));
    	pageContext.setAttribute("callCode",(String)rows.get(1));
    	pageContext.setAttribute("proposalID",(String)rows.get(2));
    	pageContext.setAttribute("proposalNr",(String)rows.get(3));
    	pageContext.setAttribute("coordinatorID",(String)rows.get(4));
    	pageContext.setAttribute("partnerID",(String)rows.get(5));
    	pageContext.setAttribute("coordinatorName",(String)rows.get(6));
    	pageContext.setAttribute("coordinatorEmail",(String)rows.get(7));
    	pageContext.setAttribute("telephone",(String)rows.get(8));
    	pageContext.setAttribute("fax",(String)rows.get(9));
    	pageContext.setAttribute("country",(String)rows.get(10));
    	pageContext.setAttribute("companyName",(String)rows.get(11));
    	pageContext.setAttribute("title",(String)rows.get(12));
    	pageContext.setAttribute("acronym",(String)rows.get(13));
    	pageContext.setAttribute("status",(String)rows.get(14));
    	pageContext.setAttribute("lastSubmission",(String)rows.get(15));
    	pageContext.setAttribute("preparation",(String)rows.get(16));
    	pageContext.setAttribute("instrument",(String)rows.get(17));
     
     
        }
     
    }

  4. #4
    ego
    ego est déconnecté
    Rédacteur

    Homme Profil pro
    Architecte de système d'information
    Inscrit en
    Juillet 2004
    Messages
    1 883
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 57
    Localisation : France, Hauts de Seine (Île de France)

    Informations professionnelles :
    Activité : Architecte de système d'information
    Secteur : Finance

    Informations forums :
    Inscription : Juillet 2004
    Messages : 1 883
    Billets dans le blog
    2
    Par défaut
    je ne vois pas où tu utilises tes "variables" dans ta page donc je ne peux rien dire sur l'affichage de ta page

  5. #5
    Membre émérite

    Homme Profil pro
    Senior Développeur JEE
    Inscrit en
    Avril 2002
    Messages
    795
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 50
    Localisation : Belgique

    Informations professionnelles :
    Activité : Senior Développeur JEE
    Secteur : Finance

    Informations forums :
    Inscription : Avril 2002
    Messages : 795
    Par défaut
    Voici ma page jsp complète

    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
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    <!--%@ page language="java" contentType="text/html" errorPage="/WEB-INF/errorPage.jsp" %-->
    <%@ page import = "java.util.*,org.apache.log4j.*"%>
    <%@taglib uri="/WEB-INF/tlds/RegistrationTag.tld" prefix="registration"%>
     
    <html>
    	<head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    		<title>SUZAN WEB</title>
     
     
    <script type="text/javascript">
    function copytoclipboard()
    {
     
    var call = "Call : "  + document.registrationform.Callid.value;
    var reference = "Reference Number : " + document.registrationform.Registrationid.value;
    var instrument = "Instrument : " + document.registrationform.Instrumentcode.value;
    var coordinator = "Coordinator username : "+document.registrationform.Coordinatoruserid.value;
    var coordinatorpass = "Coordinator password : "+document.registrationform.Coordinatorpass.value;
    var partner = "Partner username : " + document.registrationform.Partneruserid.value;
    var partnerpass = "Partner password : " + document.registrationform.Partnerpass.value;
    var email = "Coordinator email : " + document.registrationform.Coordinatoremail.value;
    var fax = "Coordinator fax : " + document.registrationform.Coordinatorfax.value;
    var tel = "Coordinator phone : " + document.registrationform.Coordinatortel.value;
    var org = "Company name : " + document.registrationform.Coordinatororganization.value;
    var name = "Coordinator name : " + document.registrationform.Coordinatorname.value;
    var country = "Coordinator country : " + document.registrationform.Coordinatorcountry.value;
     
    //var info = reference+"\n"+call;
    var info = reference+"\n"+call+"\n"+instrument+"\n"+coordinator+"\n"+coordinatorpass+"\n"+partner+"\n"+partnerpass+"\n"+email+"\n"+fax+"\n"+tel+"\n"+org+"\n"+name+"\n"+country;
    alert("Data has been copied to clipboard ");
     window.clipboardData.setData ("Text",info); 
     
     
     
    return true;
    }
    </script>
    <% Logger cat = Logger.getLogger("Registration.jsp");
    cat.info("Starting Registration.jsp");%>
    </head>
    	<body>
    		<jsp:useBean id="Regist" class="suzanweb.Registration" scope="session">
    		</jsp:useBean> 
    		<jsp:useBean id="Prop" class="suzanweb.Proposal" scope="session">
    		</jsp:useBean> 
    		<jsp:useBean id="User" class="suzanweb.UserEpss" scope="session">
    		</jsp:useBean>
    		<jsp:setProperty name="User" property="menuActive" value="Registration"/>
    		<jsp:setProperty name="User" property="submenuActive" value="FindRegistration"/>
    		<jsp:useBean id="logger" class="suzanweb.SuzanLogger" scope="session">
    		<jsp:setProperty name="logger" value="Registration.jsp"/>
    		</jsp:useBean>
     
     
     
     
    		<div align="center"><jsp:include page="menu.jsp"/>	</div>
    		<div align="center"><jsp:include page="RegistrationMenu.jsp"/>	</div>
    		<br>
     
    	<table  width="100%" bgcolor="#C0C0C0" summary="" border="1">
    	<form name="registrationform" action="RegistrationFindServlet" method="POST" >
     	<tr>
     		<td size="25%">Registration ID (Ref)</td>
     		<td size="25%"><input type="text" value="<jsp:getProperty name="Regist" property="registrationid" />" name="Registrationid" size="30%" maxlength="256">
     
           	<td size="25%" align="Left">Call ID : </td>
     		<td size="25%"><input type="text" value="<jsp:getProperty name="Regist" property="callid" />" name="Callid" size="30%" maxlength="256"></td>	
     	</tr>
     	<tr>
     		<td align="Left">Proposal Number : </td>
     		<td><input type="text" value="<jsp:getProperty name="Regist" property="proposalnumber" />"name="Proposalnumber" size="30" maxlength="256"></td>
     
     		<td>Proposal ID</td>
     		<td><input type="text" value="<jsp:getProperty name="Regist" property="proposalid" />"name="Proposalid" size="30" maxlength="256"></td>
     	</tr>
     	<tr>
     		<td>Coordinator User ID</td>
     		<td><input type="text" value="<jsp:getProperty name="Regist" property="coordinatoruserid" />"name="Coordinatoruserid" size="30%" maxlength="256"></td>
     
     		<td>Partner User ID</td>
     		<td><input type="text" value="<jsp:getProperty name="Regist" property="partneruserid" />"name="Partneruserid" size="30%" maxlength="256"></td>
     	</tr>
     	<tr>
     		<td>Coordinator Name</td>
     		<td><input value="<jsp:getProperty name="Regist" property="coordinatorname" />"type="text" name="Coordinatorname" size="30%" maxlength="256"></td>
     
     		<td>Coordinator EMail</td>
     		<td><input value="<jsp:getProperty name="Regist" property="coordinatoremail" />"type="text" name="Coordinatoremail" size="30%" maxlength="256"></td>
     	</tr>
     	<tr>
     		<td>Coordinator Tel</td>
     		<td><input type="text" value="<jsp:getProperty name="Regist" property="coordinatortel" />"name="Coordinatortel" size="30%" maxlength="256"></td>
     
     		<td>Coordinator Fax </td>
     		<td><input type="text" value="<jsp:getProperty name="Regist" property="coordinatorfax" />"name="Coordinatorfax" size="30%" maxlength="256"></td>
     	</tr>
     	<tr>
     		<td>Coordinator country</td>
     		<td><input type="text" value="<jsp:getProperty name="Regist" property="coordinatorcountry" />"name="Coordinatorcountry" size="30%" maxlength="256"></td>
     
     		<td>Coordinator Organization</td>
     		<td><input type="text" value="<jsp:getProperty name="Regist" property="coordinatororg" />"name="Coordinatororganization" size="30%" maxlength="256"></td>
     	</tr>
     	<tr>
     		<td>Proposal Acronym</td>
     		<td><input type="text" value="<jsp:getProperty name="Regist" property="proposalacronym" />"name="Proposalacronym" size="30%" maxlength="256"></td>
     
    		<td>Proposal Title</td>
     		<td><input value="<jsp:getProperty name="Regist" property="proposaltitle" />"type="text" name="Coordinatortitle" size="30%" maxlength="256"></td>
     	</tr>
     	<tr>
     		<td>Status</td>
     		<td><input type="text" value="<jsp:getProperty name="Regist" property="status" />"name="Status" size="30%" maxlength="256"></td>
     
     		<td>Last Submission</td>
     		<td><input type="text" value="<jsp:getProperty name="Regist" property="lastsubmission" />"name="Lastsubmission" size="30%" maxlength="256"></td>
     	</tr>
     	<tr>
     		<td>Preparation</td>
     		<td><input type="text" value="<jsp:getProperty name="Regist" property="preparation" />"name="Preparation" size="30%" maxlength="256"></td>
     
     		<td>Instrument</td>
     		<td><input type="text" value="<jsp:getProperty name="Regist" property="instrumentcode" />"name="Instrumentcode" size="30%" maxlength="256"></td>
     	</tr>
     	<tr>
     		<td><input  type="hidden" value="<jsp:getProperty name="Regist" property="coordinatorpass" />"name="Coordinatorpass" size="30%" maxlength="256"></td>
            <td><input  type="hidden" value="<jsp:getProperty name="Regist" property="partnerpass" />"name="Partnerpass" size="30%" maxlength="256"></td>
     	</tr>
     
     
     	<tr>
     		<td></td>
     		<td></td>
     		<td></td>
     		<td></td>
     	</tr>
     	 </table>
     	<table size="100%">
     	<tr>
     		<td size="15%"><input type="submit" value="    FIND    "> </form></td>
     		<td size="15%"><form action="Registrationclear.jsp" method="POST"><input size="30%" type="submit" value="    CLEAR    "> </form></td>
     		<td size="15%"><form action="RegistrationHistory.jsp" method="POST"><input type="submit" value=" HISTORY "></form></td>
     		<td size="15%"><form method="POST" action="<%=response.encodeRedirectURL("Registration.jsp")%>" onsubmit="return copytoclipboard()"><input type="submit" value="COPY to Clipboard"></form></td>
     		<td size="15%">
     		<form action="ProposalServlet" method="POST">
     		<input type="hidden" value="<jsp:getProperty name="Regist" property="proposalid" />" name="Proposalid">
     		<input type="submit" value=" Proposal : <jsp:getProperty name="Regist" property="proposalid" />  ">
     		</form></td>
     		<td size="15%"><form action="RefereeMain.jsp" method="POST"><input size="30%" type="submit" value="REFEREES"> </form></td>
     		<td size="15%"><form action="RegistrationInfo1.jsp" method="POST"><input size="30%" type="submit" value="SEND INFORMATION"> </form></td>
     
     	</tr>
    	</table>
    	<TABLE border="1">
    		<TR bgcolor="#83d1ff">
    			<TD/>
    			<TD>Registration ID</TD>
    			<TD>Call Code</TD>
    			<TD>Proposal ID</TD>
    			<TD>Proposal Nr</TD>
    			<TD>Coordinator ID</TD>
    			<TD>Partner ID</TD>
    			<TD>Coordinator Name</TD>
    			<TD>Coordinator Email</TD>
    			<TD>Telephone</TD>
    			<TD>Fax</TD>
    			<TD>Country</TD>
    			<TD>Company Name</TD>
    			<TD>Title</TD>
    			<TD>Acronym</TD>
    			<TD>Status</TD>
    			<TD>Last Submission</TD>
    			<TD>Preparation</TD>
    			<TD>Instrument</TD>
    		</TR>
    		<registration:RegistrationTag reg="${sessionScope.Regist}">
    		<TR>
                        <form action="RegistrationServlet" method="POST">
    			<TD><input type="submit" width="15" value="Details"></TD>
    			<TD><input type="text"  value="${sessionScope.registrationID}" name="Registrationid"></TD>
     
    		</form>
     
    			<TD><input type="text" disabled value="${sessionScope.callCode}"></TD>
    			<TD><input type="text" disabled value="${sessionScope.proposalID}"></TD>
    			<TD><input type="text" disabled value="${sessionScope.proposalNr}"></TD>
    			<TD><input type="text" disabled value="${sessionScope.coordinatorID}"></TD>
    			<TD><input type="text" disabled value="${sessionScope.partnerID}"></TD>
    			<TD><input type="text" disabled value="${sessionScope.coordinatorName}"></TD>
    			<TD><input type="text" disabled value="${sessionScope.coordinatorEmail}"></TD>
    			<TD><input type="text" disabled value="${sessionScope.telephone}"></TD>
    			<TD><input type="text" disabled value="${sessionScope.fax}"></TD>
    			<TD><input type="text" disabled value="${sessionScope.country}"></TD>
    			<TD><input type="text" disabled value="${sessionScope.companyName}"></TD>
    			<TD><input type="text" disabled value="${sessionScope.title}"></TD>
    			<TD><input type="text" disabled value="${sessionScope.acronym}"></TD>
    			<TD><input type="text" disabled value="${sessionScope.status}"></TD>
    			<TD><input type="text" disabled value="${sessionScope.lastSubmission}"></TD>	
    			<TD><input type="text" disabled value="${sessionScope.preparation}"></TD>
                            <TD><input type="text" disabled value="${sessionScope.instrument}"></TD>
     
    		<TR>	
    		</registration:RegistrationTag>
     
    	</TABLE>
     
     
    </body>
    </html>

  6. #6
    ego
    ego est déconnecté
    Rédacteur

    Homme Profil pro
    Architecte de système d'information
    Inscrit en
    Juillet 2004
    Messages
    1 883
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 57
    Localisation : France, Hauts de Seine (Île de France)

    Informations professionnelles :
    Activité : Architecte de système d'information
    Secteur : Finance

    Informations forums :
    Inscription : Juillet 2004
    Messages : 1 883
    Billets dans le blog
    2
    Par défaut
    oui, bizarre surtout pour ta ligne de titre hors tag.
    Es-tu sûr que toutes les valeurs de ta row peuvent être castées en String et donc qu'il n'y a pas une exception lors de l'affichage de la première ligne car on ne voit pas de second "doAfterBody" après l'affichage de la taille de ta row !?

  7. #7
    Membre émérite

    Homme Profil pro
    Senior Développeur JEE
    Inscrit en
    Avril 2002
    Messages
    795
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 50
    Localisation : Belgique

    Informations professionnelles :
    Activité : Senior Développeur JEE
    Secteur : Finance

    Informations forums :
    Inscription : Avril 2002
    Messages : 795
    Par défaut
    Tu as peut-être raison, il faut que je regarde du coté de la variable registrationID. C'est un type number dans la base oracle et je sais que je dois le caster comme un BigDecimal.

    Mais ce qui me semble bizarre, c'est que je n'ai aucune exception qui apparaît dans les différents logs de mon application.

    Sinon à part cela mon code a l'air bon :


  8. #8
    ego
    ego est déconnecté
    Rédacteur

    Homme Profil pro
    Architecte de système d'information
    Inscrit en
    Juillet 2004
    Messages
    1 883
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 57
    Localisation : France, Hauts de Seine (Île de France)

    Informations professionnelles :
    Activité : Architecte de système d'information
    Secteur : Finance

    Informations forums :
    Inscription : Juillet 2004
    Messages : 1 883
    Billets dans le blog
    2
    Par défaut
    ben oui, c'est pour cela que je trouve le truc bizarre a priori

  9. #9
    Membre émérite

    Homme Profil pro
    Senior Développeur JEE
    Inscrit en
    Avril 2002
    Messages
    795
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 50
    Localisation : Belgique

    Informations professionnelles :
    Activité : Senior Développeur JEE
    Secteur : Finance

    Informations forums :
    Inscription : Avril 2002
    Messages : 795
    Par défaut
    C'était bien ça le problème.
    Maintenant ma table s'affiche bien.

    Mais j'ai un autre soucis c'est au niveau de la récupération des attribute avec les EL.

    Mes colonnes restent vides.

  10. #10
    Membre émérite

    Homme Profil pro
    Senior Développeur JEE
    Inscrit en
    Avril 2002
    Messages
    795
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 50
    Localisation : Belgique

    Informations professionnelles :
    Activité : Senior Développeur JEE
    Secteur : Finance

    Informations forums :
    Inscription : Avril 2002
    Messages : 795
    Par défaut


    c'était un problème de scope

    J'ai modifé par
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    ${pageScope.mavariable}
    et tout est rentré dans l'ordre

    Merci de ton aide Eric

  11. #11
    ego
    ego est déconnecté
    Rédacteur

    Homme Profil pro
    Architecte de système d'information
    Inscrit en
    Juillet 2004
    Messages
    1 883
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 57
    Localisation : France, Hauts de Seine (Île de France)

    Informations professionnelles :
    Activité : Architecte de système d'information
    Secteur : Finance

    Informations forums :
    Inscription : Juillet 2004
    Messages : 1 883
    Billets dans le blog
    2
    Par défaut
    bravo !

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

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