here is an extract of my domain model : 

public class Survey {
 
        private String freq;
        private String information;
        private List<Observation> observations;

}

public class Observation {
        private int abundance;
        private SpeciesGroup speciesGroup;
}

my class SurveyAction implements ModelDriven, I use an edit() method to set
my Survey object as the model, and i manage to populate my jsp form ok. But
when i submit the form my saveOrUpdate() method receives another Survey
object as the one i set in edit() !? a new Survey Object that has the 'freq'
or 'information' modifications but has a null observations property ???

here is the form

        <s:form method="post" action="SaveOrUdpdate" theme="simple">
                <s:select name="freq" list="freqListe" listKey="other"
listValue="label"></s:select>
                <br />
                <br />
                <s:iterator value="observations">
                        <s:textfield name="abundance"/>
                        <s:property value="speciesGroup.id"/> - <s:property
value="speciesGroup.groupName"/>
                        <br />
                </s:iterator>
                <s:submit value="save"/>
        </s:form>

any ideas?
-- 
View this message in context: 
http://old.nabble.com/struts2-modeldriven-how-ot-modify-the-model-object--tp29294755p29294755.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to