Hello,
i have a page, in which there is two form
the second form contains 2 pair of 2 select
the first pai is ti add an OR to shortlist , 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, not those selected by the user
here is my jsp

            <html:form action="EditShortList.do?do=addOrShortList">
              
              
nom de la Short list &nbsp;:
&nbsp;&nbsp; 
              <html:text property="addedList"/>&nbsp;&nbsp;
              <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;">&nbsp;Ajout d'OR
dans une Short
list</td>
                    
                  </tr>
                  <tr>
         
                </tr>
                </tbody>
              </table>
             
              <br />
<html:form action="EditShortList.do?do=ajouterOuSupprimerOr">
Short list &nbsp;: &nbsp; &nbsp;&nbsp;
<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>
&nbsp; &nbsp; OR :
<nested:nest property="selectedAddOr">
<nested:select property="orId">
<html:optionsCollection property="addOrList" value="orId" label="orCode" />
</nested:select>
</nested:nest>
&nbsp; <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;">&nbsp;Suppression
d'OR dans une Short
list</td>
                                      </tr>
                                      <tr>
                                        
                </tr>
                </tbody>
              </table>
 
Short list &nbsp;: &nbsp; &nbsp;&nbsp;
<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>
&nbsp; &nbsp; OR :
<nested:nest property="selectedDeleteOr">
<nested:select  property="orId" >
<html:optionsCollection property="delOrList" value="orId" label="orCode" />
</nested:select>
</nested:nest>
&nbsp; <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.List<OrShortList> shortListsAdd = new 
ArrayList<OrShortList>();
        java.util.List<OrShortList> shortListsDelete = new
ArrayList<OrShortList>();
        java.util.List<OrdreRegrpmt> addOrList = new ArrayList<OrdreRegrpmt>();
        java.util.List<OrdreRegrpmt> delOrList = new ArrayList<OrdreRegrpmt>();
        
        
 
 
        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.List<OrdreRegrpmt> getAddOrList() {
                if (selectedAddShortlist.getOrshortlistId()==0){
                        java.util.List<OrdreRegrpmt> addOrList1 = new 
ArrayList<OrdreRegrpmt>();
                        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.List<OrdreRegrpmt> addOrList) {
                this.addOrList = addOrList;
        }
        
 
        
        
        public java.util.List<OrdreRegrpmt> getDelOrList() {
                if (selectedDeleteShortlist.getOrshortlistId()==0){
                        java.util.List<OrdreRegrpmt> delOrList1 = new 
ArrayList<OrdreRegrpmt>();
                        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.List<OrdreRegrpmt> delOrList) {
                this.delOrList = delOrList;
        }
        public void setAddedList(String addedList) {
                this.addedList = addedList;
        }
        
        public String getAddedList() {
                return addedList;
        }
        public OrShortList getSelectedAddShortlist() {
                return selectedAddShortlist;
        }
        public void setSelectedAddShortlist(OrShortList selectedAddShortlist) {
                this.selectedAddShortlist = selectedAddShortlist;
        }
        public OrShortList getSelectedDeleteShortlist() {
                return selectedDeleteShortlist;
        }
        public void setSelectedDeleteShortlist(OrShortList 
selectedDeleteShortlist)
{
                                this.selectedDeleteShortlist = 
selectedDeleteShortlist;
        }
        public OrdreRegrpmt getSelectedAddOr() {
                return selectedAddOr;
        }
        public void setSelectedAddOr(OrdreRegrpmt selectedAddOr) {
                this.selectedAddOr = selectedAddOr;
        }
        public OrdreRegrpmt getSelectedDeleteOr() {
                return selectedDeleteOr;
        }
        public void setSelectedDeleteOr(OrdreRegrpmt selectedDeleteOr) {
                //JOptionPane.showMessageDialog(null, " Or Code
="+selectedDeleteOr.getOrCode());
                this.selectedDeleteOr = selectedDeleteOr;
        }
 
        public java.util.List<OrShortList> getShortListsAdd() {
                return shortListsAdd;
        }
 
        public void setShortListsAdd(java.util.List<OrShortList> shortListsAdd) 
{
                this.shortListsAdd = shortListsAdd;
        }
 
        public java.util.List<OrShortList> getShortListsDelete() {
                return shortListsDelete;
        }
 
        public void setShortListsDelete(java.util.List<OrShortList>
shortListsDelete) {
                this.shortListsDelete = shortListsDelete;
        }
 
        public String getFaire() {
                return faire;
        }
 
        public void setFaire(String faire) {
                this.faire = faire;
        }
 
}


I'm really running out of solution, i appreciate your help

Thanks
Laes
-- 
View this message in context: 
http://www.nabble.com/populate-problem-after-submit-tp20793366p20793366.html
Sent from the Struts - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to