Fwd: populate pb of the selected Item
just for infomation, the struts version i use is 1.2 Regards Elyes -- Forwarded message -- From: elyes sallem [EMAIL PROTECTED] Date: 2008/12/2 Subject: populate pb of the selected Item To: Struts Users Mailing List user@struts.apache.org Hello, i have a page, in which there is two form the second form contains 2 pair of 2 select the first pair add an OR to shortlist when we click on sumbit button (this submit works ), the second pair is to delete an or from a shortlist so when i select a shortlist, the list of OR in second select will be updated my problem is when i submit the second pair of select, the properties selected are not populated they took the value i set in the constructor of the actionForm, not those selected by the user *here is my jsp* html:form action=EditShortList.do?do=addOrShortList nom de la Short list : html:text property=addedList/ html:submit value=ajouter/br / br / /html:form table style=border: 1px solid rgb(80, 142, 204); border=0 cellpadding=0 cellspacing=0 tbody tr td style=border: 1px solid rgb(80, 142, 204); width: 2591px; height: 22px; background-color: rgb(80, 142, 204); text-align: left; Ajout d'OR dans une Short list/td /tr tr /tr /tbody /table br / html:form action=EditShortList.do?do=ajouterOuSupprimerOr Short list : nested:nest property=selectedAddShortlist nested:select property=orshortlistId onchange=form.action='EditShortList.do?do=refreshOrShortList'; form.submit(); html:optionsCollection property=shortListsAdd value=orshortlistId label=orshortlistNom / /nested:select /nested:nest OR : nested:nest property=selectedAddOr nested:select property=orId html:optionsCollection property=addOrList value=orId label=orCode / /nested:select /nested:nest nested:submit value=ajouter property=faire/ table style=border: 1px solid rgb(80, 142, 204); border=0 cellpadding=0 cellspacing=0 tbody tr td style=border: 1px solid rgb(80, 142, 204); width: 2591px; height: 22px; background-color: rgb(80, 142, 204); text-align: left; Suppression d'OR dans une Short list/td /tr tr /tr /tbody /table Short list : nested:nest property=selectedDeleteShortlist nested:select property=orshortlistId onchange=form.action='EditShortList.do?do=refreshOrShortList'; form.submit(); html:optionsCollection property=shortListsDelete value=orshortlistId label=orshortlistNom / /nested:select /nested:nest OR : nested:nest property=selectedDeleteOr nested:select property=orId html:optionsCollection property=delOrList value=orId label=orCode / /nested:select /nested:nest nested:submit value=supprimer property=faire / /html:form * and the action form :* public class ShortListEditForm extends ActionForm{ String addedList; String faire; OrShortList selectedAddShortlist; OrShortList selectedDeleteShortlist; OrdreRegrpmt selectedAddOr; OrdreRegrpmt selectedDeleteOr; java.util.ListOrShortList shortListsAdd = new ArrayListOrShortList(); java.util.ListOrShortList shortListsDelete = new ArrayListOrShortList(); java.util.ListOrdreRegrpmt addOrList = new ArrayListOrdreRegrpmt(); java.util.ListOrdreRegrpmt delOrList = new ArrayListOrdreRegrpmt(); public ShortListEditForm() { faire=; selectedDeleteShortlist=new OrShortList(0,select a short list); selectedAddShortlist=new OrShortList(0,select a short list); selectedDeleteOr=new OrdreRegrpmt(0,select a Short list); selectedAddOr=new OrdreRegrpmt(0,select a Short list); } public java.util.ListOrdreRegrpmt getAddOrList() { if (selectedAddShortlist.getOrshortlistId()==0){ java.util.ListOrdreRegrpmt addOrList1 = new ArrayListOrdreRegrpmt(); addOrList1.add(new OrdreRegrpmt(0,select a Short list)); setSelectedAddOr(new OrdreRegrpmt(0,select a Short list)); setAddOrList(addOrList1) ; } return this.addOrList; } public void setAddOrList(java.util.ListOrdreRegrpmt addOrList) { this.addOrList = addOrList; } public java.util.ListOrdreRegrpmt getDelOrList() { if (selectedDeleteShortlist.getOrshortlistId()==0){ java.util.ListOrdreRegrpmt delOrList1 = new ArrayListOrdreRegrpmt(); delOrList1.add(new OrdreRegrpmt(0,select a Short list
populate pb of the selected Item
Hello, i have a page, in which there is two form the second form contains 2 pair of 2 select the first pair add an OR to shortlist when we click on sumbit button (this submit works ), the second pair is to delete an or from a shortlist so when i select a shortlist, the list of OR in second select will be updated my problem is when i submit the second pair of select, the properties selected are not populated they took the value i set in the constructor of the actionForm, not those selected by the user *here is my jsp* html:form action=EditShortList.do?do=addOrShortList nom de la Short list : html:text property=addedList/ html:submit value=ajouter/br / br / /html:form table style=border: 1px solid rgb(80, 142, 204); border=0 cellpadding=0 cellspacing=0 tbody tr td style=border: 1px solid rgb(80, 142, 204); width: 2591px; height: 22px; background-color: rgb(80, 142, 204); text-align: left; Ajout d'OR dans une Short list/td /tr tr /tr /tbody /table br / html:form action=EditShortList.do?do=ajouterOuSupprimerOr Short list : nested:nest property=selectedAddShortlist nested:select property=orshortlistId onchange=form.action='EditShortList.do?do=refreshOrShortList'; form.submit(); html:optionsCollection property=shortListsAdd value=orshortlistId label=orshortlistNom / /nested:select /nested:nest OR : nested:nest property=selectedAddOr nested:select property=orId html:optionsCollection property=addOrList value=orId label=orCode / /nested:select /nested:nest nested:submit value=ajouter property=faire/ table style=border: 1px solid rgb(80, 142, 204); border=0 cellpadding=0 cellspacing=0 tbody tr td style=border: 1px solid rgb(80, 142, 204); width: 2591px; height: 22px; background-color: rgb(80, 142, 204); text-align: left; Suppression d'OR dans une Short list/td /tr tr /tr /tbody /table Short list : nested:nest property=selectedDeleteShortlist nested:select property=orshortlistId onchange=form.action='EditShortList.do?do=refreshOrShortList'; form.submit(); html:optionsCollection property=shortListsDelete value=orshortlistId label=orshortlistNom / /nested:select /nested:nest OR : nested:nest property=selectedDeleteOr nested:select property=orId html:optionsCollection property=delOrList value=orId label=orCode / /nested:select /nested:nest nested:submit value=supprimer property=faire / /html:form * and the action form :* public class ShortListEditForm extends ActionForm{ String addedList; String faire; OrShortList selectedAddShortlist; OrShortList selectedDeleteShortlist; OrdreRegrpmt selectedAddOr; OrdreRegrpmt selectedDeleteOr; java.util.ListOrShortList shortListsAdd = new ArrayListOrShortList(); java.util.ListOrShortList shortListsDelete = new ArrayListOrShortList(); java.util.ListOrdreRegrpmt addOrList = new ArrayListOrdreRegrpmt(); java.util.ListOrdreRegrpmt delOrList = new ArrayListOrdreRegrpmt(); public ShortListEditForm() { faire=; selectedDeleteShortlist=new OrShortList(0,select a short list); selectedAddShortlist=new OrShortList(0,select a short list); selectedDeleteOr=new OrdreRegrpmt(0,select a Short list); selectedAddOr=new OrdreRegrpmt(0,select a Short list); } public java.util.ListOrdreRegrpmt getAddOrList() { if (selectedAddShortlist.getOrshortlistId()==0){ java.util.ListOrdreRegrpmt addOrList1 = new ArrayListOrdreRegrpmt(); addOrList1.add(new OrdreRegrpmt(0,select a Short list)); setSelectedAddOr(new OrdreRegrpmt(0,select a Short list)); setAddOrList(addOrList1) ; } return this.addOrList; } public void setAddOrList(java.util.ListOrdreRegrpmt addOrList) { this.addOrList = addOrList; } public java.util.ListOrdreRegrpmt getDelOrList() { if (selectedDeleteShortlist.getOrshortlistId()==0){ java.util.ListOrdreRegrpmt delOrList1 = new ArrayListOrdreRegrpmt(); delOrList1.add(new OrdreRegrpmt(0,select a Short list)); setSelectedDeleteOr(new OrdreRegrpmt(0,select a Short list)); setDelOrList(delOrList1); } return this.delOrList; } public void setDelOrList(java.util.ListOrdreRegrpmt delOrList) {