Bonjour,
j'ai une liste deroulante remplie à partir d'une BD, mon probleme consiste à ce que quand je fais un choix la page s'actualise et mon choix est desselectionné, je veux que mon choix reste selectionné pour que le formulaire soit remplie.
j'ai fais des tests avec plusieurs codes, parmi lesquels j'ai fais ça:
dans ce code j'ai testé avec l'attribut "SELECTED" sur le choix que j'ai stocké ds le champ d'un bean "fillTicketForm.text". mais ça marche pas.
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 <tr> <th>Category</th><td> <html:select name="fillTicketForm" property="text" onchange="form.action='fillTicket2.do';form.submit();"> <option SELECTED value="<bean:write name="fillTicketForm" property="text" filter="true" />"> <bean:write name="fillTicketForm" property="text" /> </option> <option value="" /> <logic:iterate id="groups" name="newTicketForm" property="groups"> <option value="<bean:write name="groups" property="id" filter="true" />"> <bean:write name="groups" property="text" /> </option> </logic:iterate> </html:select></td><td><html:errors property="groups"/></td> </tr> <tr>
merci pour votre aide.
Partager