Back Forum Reply New

save the values of a ComboBox in a data base

Hello,
I would like to put in my data base the information contained in a comboBox, but I dont know how to do.
the information of the comboBox are stored in a controller.
the code of my jsp :Code:
lt;%@ page language=quot;javaquot; pageEncoding=quot;ISO-8859-1quot; contentType=quot;text/html;charset=ISO-8859-1quot;%gt;
lt;%@ taglib uri=quot;/WEB-INF/c.tldquot; prefix=quot;cquot; %gt;
lt;%@ taglib uri=quot;/WEB-INF/spring.tldquot; prefix=quot;springquot; %gt;
lt;%@ page isELIgnored=quot;falsequot; %gt;lt;!DOCTYPE html PUBLIC quot;-//W3C//DTD XHTML 1.1//ENquot;
quot;TR/xhtml11/DTD/xhtml11.dtdquot;gt;
lt;html xmlns=quot;1999/xhtmlquot; xml:lang=quot;frquot;gt;
lt;headgt;
lt;meta from-equiv=quot;Content-Script-Typequot; content=quot;text/javascriptquot; /gt;
lt;meta from-equiv=quot;Content-Style-Typequot; content=quot;text/cssquot; /gt;

lt;link title=quot;charte intranetquot; rel=quot;stylesheetquot; hrcf=quot;vues/styles/intranet/menu-horizontal.cssquot; type=quot;text/cssquot; /gt;
lt;link title=quot;charte intranetquot; rel=quot;stylesheetquot; hrcf=quot;vues/styles/intranet/complet1.cssquot; type=quot;text/cssquot; /gt;
lt;!--[if IE]gt;
lt;link title=quot;charte intranetquot; rel=quot;stylesheetquot; hrcf=quot;/styles/intranet/ie.cssquot; type=quot;text/cssquot; /gt;
lt;![endif]--gt;
lt;link title=quot;charte intranetquot; rel=quot;stylesheetquot; hrcf=quot;vues/styles/application/application.cssquot; type=quot;text/cssquot; /gt;

lt;link title=quot;texte seulquot; rel=quot;alternate stylesheetquot; hrcf=quot;vues/styles/texte/texte_seul.cssquot; type=quot;text/cssquot; /gt;

lt;link rel=quot;iconquot; hrcf=quot;/images/favicon.icoquot;/gt;
lt;script type=quot;text/javascriptquot; src=quot;scripts/menu.jsquot;gt; lt;/scriptgt;
lt;titlegt;
Page d'accueil- Application de Gestion de Projetlt;/titlegt;
lt;/headgt;

lt;bodygt;
lt;div id=quot;conteneurglobalquot;gt;
lt;divgt;lt;a hrcf=quot;#quot; title=quot;haut de pagequot; id=quot;topquot;gt;lt;/agt;lt;/divgt;
lt;h1 class=quot;invisiblequot;gt;Application de Gestion de Projetlt;/h1gt;
lt;%@ include file=quot;include/haut.jspquot; %gt;

lt;div id=quot;conteneurmilieuquot;gt;
lt;div id=quot;milieuquot;gt;
lt;div id=quot;milieuinterieurquot;gt;
lt;%@ include file=quot;include/navigation.jspquot; %gt;

lt;div id=quot;consultationquot;gt;
lt;div id=quot;titrecontenuquot;gt;
lt;h2gt;
Application de Gestion de Projet
lt;/h2gt;
lt;/divgt;
lt;h3gt;Ajout/Modificationlt;/h3gt;
lt;ul id=quot;tabnavquot;gt;    lt;ligt;lt;a hrcf=quot;lt;c:ucl value=quot;/edit.html?id=-1quot;/gt;quot;gt;Ajoutlt;/agt;lt;/ligt;    lt;/ulgt;   
lt;spring:bind path=quot;intervenantquot;gt;
lt;c:if test=quot;${status.error}quot;gt;
lt;h3gt;Les erreurs suivantes se sont produites :lt;/h3gt;
lt;ulgt;
lt;c:forEach items=quot;${status.errorMessages}quot; var=quot;erreurquot;gt;
lt;ligt;lt;cut value=quot;${erreur}quot;/gt;lt;/ligt;
lt;/c:forEachgt;
lt;/ulgt;
lt;hrgt;
lt;/c:ifgt;
lt;/spring:bindgt;

lt;form method=quot;postquot; action=quot;lt;c:ucl value=quot;/edit.htmlquot;/gt;quot;gt;  
lt;table border=quot;1quot;gt;
lt;trgt;
lt;tdgt;Idlt;/tdgt;
lt;tdgt;${intervenant.intervenantId}lt;/tdgt;
lt;/trgt;
lt;trgt;
lt;tdgt;Nomlt;/tdgt;
lt;spring:bind path=quot;intervenant.intervenantNomquot;gt;
lt;tdgt;
lt;input type=quot;textquot; value=quot;${status.value}quot; name=quot;${status.expression}quot; size=quot;20quot;gt;
lt;/tdgt;
lt;tdgt;${status.errorMessage}lt;/tdgt;
lt;/spring:bindgt;
lt;/trgt;
lt;trgt;
lt;tdgtrénomlt;/tdgt;
lt;spring:bind path=quot;intervenant.intervenantPrenomquot;gt;
lt;tdgt;
lt;input type=quot;textquot; value=quot;${status.value}quot; name=quot;${status.expression}quot; size=quot;20quot;gt;
lt;/tdgt;
lt;tdgt;${status.errorMessage}lt;/tdgt;
lt;/spring:bindgt;
lt;/trgt;
lt;trgt;
lt;tdgt;Loginlt;/tdgt;
lt;spring:bind path=quot;intervenant.intervenantLoginquot;gt;
lt;tdgt;
lt;input type=quot;textquot; value=quot;${status.value}quot; name=quot;${status.expression}quot; size=quot;20quot;gt;
lt;/tdgt;
lt;tdgt;${status.errorMessage}lt;/tdgt;
lt;/spring:bindgt;
lt;/trgt;
lt;trgt;         lt;tdgt;Mot de passelt;/tdgt;
lt;spring:bind path=quot;intervenant.intervenantMdpquot;gt;         lt;tdgt;
lt;input type=quot;passwordquot; name=quot;${status.expression}quot; value=quot;${status.value}quot;gt;         lt;/tdgt;         lt;tdgt;${status.errorMessage}lt;/tdgt;
lt;/spring:bindgt;       lt;/trgt;
lt;!-- Email --gt;       lt;trgt;         lt;tdgt;Emaillt;/tdgt;
lt;spring:bind path=quot;intervenant.intervenantEmailquot;gt;         lt;tdgt;
lt;input type=quot;textquot; name=quot;${status.expression}quot; value=quot;${status.value}quot;gt;         lt;/tdgt;         lt;tdgt;${status.errorMessage}lt;/tdgt;
lt;/spring:bindgt;       lt;/trgt;       lt;!-- Telephone --gt;       lt;trgt;         lt;tdgt;Tellt;/tdgt;
lt;spring:bind path=quot;intervenant.intervenantTelquot;gt;         lt;tdgt;
lt;input type=quot;textquot; name=quot;${status.expression}quot; value=quot;${status.value}quot;gt;         lt;/tdgt;         lt;tdgt;${status.errorMessage}lt;/tdgt;
lt;/spring:bindgt;       lt;/trgt;                   lt;!-- Fonction Combo --gt;       lt;trgt;         lt;tdgt;Fonctionlt;/tdgt;         lt;spring:bind path=quot;intervenant.intervenantFonctionquot;gt;       lt;tdgt;
lt;select name=quot;fonctionquot; rows=quot;3quot;gt;     lt;c:forEach items=quot;${optionsComboFonction}quot; var=quot;optionComboFonctionquot;gt;     lt;c:choosegt;     lt;c:when test=quot;${intervenant.intervenantFonction==optionComboFonction}quot;gt;     lt;option selectedgt;${optionComboFonction}lt;/optiongt;     lt;/c:whengt;     lt;ctherwisegt;     lt;optiongt;${optionComboFonction}lt;/optiongt;     lt;/ctherwisegt;     lt;/c:choosegt;     lt;/c:forEachgt;     lt;/selectgt;     lt;/tdgt;         lt;tdgt;${status.errorMessage}lt;/tdgt;
lt;/spring:bindgt;             lt;/trgt;               lt;!-- Date debut contrat --gt;       lt;trgt;         lt;tdgt;Date début contratlt;/tdgt;
lt;spring:bind path=quot;intervenant.intervenantDatedebutcontratquot;gt;         lt;tdgt;
lt;input type=quot;textquot; name=quot;${status.expression}quot; value=quot;${status.value}quot;gt;         lt;/tdgt;         lt;tdgt;${status.errorMessage}lt;/tdgt;
lt;/spring:bindgt;       lt;/trgt;        lt;!-- Date fin contrat --gt;       lt;trgt;         lt;tdgt;Date fin contratlt;/tdgt;
lt;spring:bind path=quot;intervenant.intervenantDatefincontratquot;gt;         lt;tdgt;
lt;input type=quot;textquot; name=quot;${status.expression}quot; value=quot;${status.value}quot;gt;         lt;/tdgt;         lt;tdgt;${status.errorMessage}lt;/tdgt;
lt;/spring:bindgt;       lt;/trgt;        lt;!-- Cout journlier experian-prologia --gt;       lt;trgt;         lt;tdgt;Coût journlier Experian-Prologialt;/tdgt;
lt;spring:bind path=quot;intervenant.coutjournalierexperianIdquot;gt;         lt;tdgt;
lt;input type=quot;textquot; name=quot;${status.expression}quot; value=quot;${status.value}quot;gt;         lt;/tdgt;         lt;tdgt;${status.errorMessage}lt;/tdgt;
lt;/spring:bindgt;       lt;/trgt;         lt;!-- Droit --gt;       lt;trgt;         lt;tdgt;Droitlt;/tdgt;
lt;spring:bind path=quot;intervenant.droitIdquot;gt;         lt;tdgt;
lt;input type=quot;textquot; name=quot;${status.expression}quot; value=quot;${status.value}quot;gt;         lt;/tdgt;         lt;tdgt;${status.errorMessage}lt;/tdgt;
lt;/spring:bindgt;       lt;/trgt;
lt;/tablegt;
lt;brgt;
lt;input type=quot;hiddenquot; value=quot;${intervenant.intervenantId}quot; name=quot;idquot;gt;
lt;input type=quot;submitquot; value=quot;Validerquot;gt;
lt;a hrcf=quot;lt;c:ucl value=quot;/list.htmlquot;/gt;quot;gt;Annulerlt;/agt;
lt;/formgt;
lt;/divgt; lt;!-- Fin du contenu --gt;

lt;/divgt; lt;!-- Fin de centre --gt;

lt;/divgt; lt;!-- Fin de milieu interieur --gt;

lt;/divgt; lt;!-- Fin de milieu --gt;

lt;%@ include file=quot;include/bas.jspquot; %gt;

lt;/divgt;lt;!-- Fin de conteneur milieu --gt;

lt;div id=quot;finalspacerquot;gt;lt;/divgt;

lt;/divgt; lt;!--  Fin de conteneur global --gt;
lt;/bodygt;
lt;/htmlgt;
thanks for your help

now it work, thanks
¥
Back Forum Reply New