Hi,

It could be that your form bean is being held in the request not the
session. Have a look at its definition in your struts-config.xml and check
that it has scope="session".

It's good to have beans in the request. Only put them in the session if you
need to retain data across multiple requests.

Hope this helps,

Jon.

-----Original Message-----
From: Freeman-Nguyen, Cary [mailto:[EMAIL PROTECTED]] 
Sent: 20 January 2002 08:36
To: [EMAIL PROTECTED]
Subject: Form doesn't get new values from page

The data for my page is displayed properly when the page first comes up,
but when the user clicks the submit button, and I look at the form data
in the action, all the form data is as it was originally.  Does anyone
know how to get the form to have the data from the page?

I have the following on my jsp:

<bean:define id="unassignedSites" name="assignSitesForm"
property="assignedSites.unassignedEmployerSites"
                        type="java.util.Collection" />

<html:select name="assignSitesForm"
property="assignedSites.unassignedEmployerSites"
                        multiple="true" size="10">

        <html:options   name="assignSitesForm"
collection="unassignedSites" property="rfpSiteID"
                                labelProperty="name"/>
                                                                        
</html:select>

The form has the following:

public class AssignSitesForm extends ActionForm {
    
    private AssignedSites assignedSites = null;
        
        public AssignedSites getAssignedSites() {
                return assignedSites;
        }

        public void setAssignedSites(AssignedSites assignedSites) {
                this.assignedSites = assignedSites;
        }    
}

The AssignedSites class has:

public class AssignedSites implements Serializable {

        private Collection unassignedEmployerSites = null;

        public AssignedSites() {
        }

        public Collection getUnassignedEmployerSites() {

                return unassignedEmployerSites;
        }

        public void setUnassignedEmployerSites( Collection
unassignedEmployerSites ) {

                this.unassignedEmployerSites = unassignedEmployerSites;
        }
}


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

Reply via email to