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
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
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>
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 <%@ 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 : <html:password property="password"/><br/> <html:submit/><html:button property="btnEffacer" value="Effacer" onclick="effacer()"/><br> </html:form> </table>
lorsque je retire la balise <html:select>...</html:select>, ca marche
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> Cliquer sur submit pour rentrer dans l'outil d'industrialisation<br><br> <table width="200" border="0"> <tbody><tr> <td> 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>
Comment faire pour que ca marche avec la COMBO BOX ?
Partager