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 :

problème combobox dans jsp


Sujet :

Struts 1 Java

  1. #1
    Candidat au Club
    Profil pro
    Inscrit en
    Janvier 2007
    Messages
    4
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Janvier 2007
    Messages : 4
    Points : 2
    Points
    2
    Par défaut problème combobox dans jsp
    bonjour à tous
    je suis en train de développer une appli web avec struts et je rencontre un problème qd j'intègre un combo box dans la page jsp (j'utilise aussi le taglib template et c'est peut-être ce qui pose pb)
    j'ai donc une page HEADER.JSP en haut

    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
    <%@ page language="java" pageEncoding="ISO-8859-1"%>
     
    <%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %>
    <%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>
    <%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic" %>
    <%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles" prefix="tiles" %>
    <%@ taglib uri="http://jakarta.apache.org/struts/tags-template" prefix="tmp" %>
    <%@ taglib uri="http://jakarta.apache.org/struts/tags-nested" prefix="nested" %>
     
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html:html locale="true">
      <head>
        <html:base />
     
        <title>
        <tmp:get name="title"/>
        </title>
        <link rel="stylesheet" type="text/css" href="styles.css">
      </head>
     
      <body>
        <table bgcolor="#5ecbff" width="100%">
        <tr><td align="CENTER"><H1>CIRCLE LIFE</H1></td></tr>
        <tr><td align="CENTER"><H3>Votre outil d'industrialisation</H3></td></tr>
         </table>
         <HR>
       </body>
    </html:html>
    j'ai une page LOGIN.JSP à gauche

    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
    <%@ page language="java" pageEncoding="ISO-8859-1"%>
    <%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean"%> 
    <%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html"%>
     
     
    		<script language="javascript">
                   function effacer(){
                   with(document.loginForm){
                      userName.value="";
                      password.value="";
                                           }
                    }
            </script>
    	<table>
    		<html:form action="/login">
    		<tr>
    		    <H3>Login Please</H3>
    		</tr><br>  
    			userName : <html:text property="userName"></html:text><br/>   
    			password&nbsp; : <html:password property="password"/><br/>
    			<html:submit/><html:button property="btnEffacer" value="Effacer" onclick="effacer()"/><br>
    		</html:form>
    		</table>
    et enfin le contenu MAIN.JSP au centre

    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
    <%@ page language="java" pageEncoding="ISO-8859-1"%>
    <%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean"%> 
    <%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html"%>
    <%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles" prefix="tiles" %>
    <%@ taglib uri="http://jakarta.apache.org/struts/tags-template" prefix="tmp" %>
    <%@ taglib uri="http://jakarta.apache.org/struts/tags-nested" prefix="nested" %>
     
     
    <tmp:insert template="header.jsp">
    <tmp:put name="title">Page de sélection</tmp:put>
    </tmp:insert>
    <table width="100%" border="0" CELLPADDING="5" ><TR>
    <TD  bgcolor="#ffffc0" width="200" VALIGN="TOP" HALIGN="LEFT">
    <tmp:insert template="login.jsp"/>
    </TD><TD VALIGN="TOP">
     
    		<html:form action="/main"> 
     
    		<h2>Bienvenu <bean:write name="loginForm" scope="request" property="userName" /><br></h2>&nbsp; 
     
     
    		Cliquer sur submit pour rentrer dans l'outil d'industrialisation<br><br>
     
    		<table width="200" border="0">
    <tbody><tr>
    <td>&nbsp;Type</td>
    <td valign="top"><html:select property="combo" name="mainForm" >
    <html:option value="0">SPOT</html:option>
    <html:option value="1">CITRIX</html:option>
    <html:option value="2">9X</html:option>
    </html:select><br></td></tr>
     
    </tbody></table><br><font size="2" color="#2a00ff"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2" color="#008080"></font></font></font></font></font></font></font></font><br> 
     
    		   <html:submit></html:submit><html:cancel></html:cancel><br><br><br><br><br><br><br><br><br><br> 
    		</html:form>
     
    	</TD></TR>
    	</table>
    lorsque je retire la balise <html:select>...</html:select>, ca marche
    Comment faire pour que ca marche avec la COMBO BOX ?

  2. #2
    Membre averti
    Homme Profil pro
    Développeur Java
    Inscrit en
    Avril 2004
    Messages
    265
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 43
    Localisation : France, Hérault (Languedoc Roussillon)

    Informations professionnelles :
    Activité : Développeur Java

    Informations forums :
    Inscription : Avril 2004
    Messages : 265
    Points : 342
    Points
    342
    Par défaut
    Salut,

    Je sais pas si je pourrais t'aider mais qu'est-ce qui ne marche pas ? Problème d'affichage ? Exception ?

  3. #3
    Candidat au Club
    Profil pro
    Inscrit en
    Janvier 2007
    Messages
    4
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Janvier 2007
    Messages : 4
    Points : 2
    Points
    2
    Par défaut
    c'est le probleme d'affichage

  4. #4
    Candidat au Club
    Profil pro
    Inscrit en
    Janvier 2007
    Messages
    4
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Janvier 2007
    Messages : 4
    Points : 2
    Points
    2
    Par défaut
    petite précision
    j'utilise eclipse 3.2 et dans le prévisualisateur d'eclipse (IE Preview) ca marche

    cdlt

  5. #5
    Candidat au Club
    Profil pro
    Inscrit en
    Janvier 2007
    Messages
    4
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Janvier 2007
    Messages : 4
    Points : 2
    Points
    2
    Par défaut
    résolution du pb

    j'ai dû dériver le formulaire mainForm qui déclare la property "combo"
    en formulaire dynamique "DynaActionForm"

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

Discussions similaires

  1. problème requete dans JSP
    Par saritta27 dans le forum Servlets/JSP
    Réponses: 5
    Dernier message: 10/06/2009, 18h49
  2. Problème include dans jsp
    Par Invité dans le forum Servlets/JSP
    Réponses: 1
    Dernier message: 15/05/2009, 09h29
  3. [JSP - HIBERNATE] Problème sessionFactory dans JSP
    Par vrossi59 dans le forum Servlets/JSP
    Réponses: 1
    Dernier message: 24/03/2009, 01h21
  4. ascenseur pour combobox dans jsp
    Par Bubu017 dans le forum Struts 1
    Réponses: 2
    Dernier message: 18/04/2008, 09h16
  5. (VBA-E) Problème combobox dans userform
    Par gringo69 dans le forum Macros et VBA Excel
    Réponses: 1
    Dernier message: 27/06/2006, 18h28

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