Bonjour, voilà j'ai un problème de récupération des cases que je coche dans mon appli afin de les supprimer.
Voilà mon code vues,action,formulaires:
javascript:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
function CmdDelete_onclick(){ 
  document.FormBeanList.action = "delete.do";
  document.FormBeanList.submit();
}
vue:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
<layout:collection name="liste"  styleClass="FORM2"  styleClass2="FORM" width="100%" selectType="checkbox" selectName="checkInfo" selectId="checkInfo" selectProperty="itemID">              
               <layout:collectionItem title="ITEMID" property="itemID" style="text-align:left;" href="detMessage.do" paramId="messID" paramProperty="itemID"/>
			   <layout:collectionItem title="MessageType" property="hidType" style="text-align:center;"/>              
               <layout:collectionItem title="SENDER" property="sender" style="text-align:center;"/>
               <layout:collectionItem title="RECIPIENT" property="recipient" style="text-align:center;"/>
			   <layout:collectionItem title="CONSIGNEMENTS" property="nbrConsig" style="text-align:center;"/>
			   <layout:collectionItem title="STATUS" property="lstMessageState" style="text-align:center;"/>
            </layout:collection> 
<html:button property="delete"  value="Supprimer" onclick=" confirm('Confirmer vos choix?');CmdDelete_onclick();" style="font-family: Arial; height:20;" styleClass="buttonBar"/>
action:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
String[] choix = request.getParameterValues("checkInfo");
String listeDel = "";
for ( int i=0; i < choix.length;i++){
           listeDel = choix[i];
           modelDB.delete(listeDel);
}
formulaire:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
 String itemID;
String[] checkInfo;
public String[] getCheckInfo() {
        return checkInfo;
}
 
public void setCheckInfo(String[] checkInfo) {
        this.checkInfo = checkInfo;
}
Mon tableau de string choix est tout le temps nul.
J'ai vraiment parcouru le forum sans avoir une réponse à ma requête.