The way I have solved this problem currently is to create a method in the
form that forwards to the object within the form.
e.g.
public PersonField getPersonField (int index) {
return (PersonField)person.getPersonField(index);
}
It is a work around rather than a fix.
I intend to have a look and see if I can discover a better solution.
cheers
Andy
-----Original Message-----
From: Marcel Maré [mailto:[EMAIL PROTECTED]]
Sent: 8. august 2001 09:10
To: '[EMAIL PROTECTED]'
Subject: RE: Indexed tags problem
Please post the solution, since I'm having similar problems...
TIA
Marcel
> -----Oorspronkelijk bericht-----
> Van: Andrew Paul Swift [mailto:[EMAIL PROTECTED]]
> Verzonden: dinsdag 7 augustus 2001 16:04
> Aan: '[EMAIL PROTECTED]'
> Onderwerp: RE: Indexed tags problem
>
>
> I have finally solved the problem, and it was due to the
> nested property.
> So ignore my last posting or take note of the word "probably" !
>
> Is there currently a way to access nested properties stored
> in forms when
> using indexed tags??
>
> e.g. for automatic updates
> form.getDetail(index).setProperty()
>
> cheers
>
> Andy
>
>
> > -----Original Message-----
> > From: Andrew Paul Swift [mailto:[EMAIL PROTECTED]]
> > Sent: 7. august 2001 11:28
> > To: '[EMAIL PROTECTED]'
> > Subject: RE: Indexed tags problem
> >
> >
> > I moved the getPersonFields() method into the personForm
> > object and I still
> > get the problem!
> > So it is probably not because of the nested property!
> >
> > i.e.
> > <logic:iterate id="personField" name="personForm" > >property="personFields">> >
>any thoughts, (I have read > through otherpostings, regarding > session etc.. )> > >
>cheers> > Andy > > >-----Original Message-----> > From: > Andrew Paul
>Swift[mailto:[EMAIL PROTECTED]]> > > Sent: 6. august 2001 17:32> > To:>
>'[EMAIL PROTECTED]'> > Subject: Indexed tags > problem> > > >> > I am
>using the indexed tags (cheers, made > my life a lot > > easier!)but I am> > having a
>problem.> > > > > When submitting a form the data inthe form is not updated. > > I
>have got> > updates working elsewhere, but Ican't get > this working. > > > > Is it
>because I use a nested property > inthe iterate tag i.e.> >
>getPerson().getPersonFields();> > > > > > > Cheersin advance> > > > Andy> > > >
>=========== JSP> > > <logic:iterateid="personField" > > >
>name="personForm"property="personpersonFields">> > > <td>> <html:text
>name="personField" > > property="value"indexed="true"/>> </td>> </logic:iterat!
> e> > > > =========== HTML produced> <td>> <input > >type="text"
>name="personField[0].value" value="1000831">> > > </td>> >===========
>struts-config.xml> > <form-bean > > name="personForm"type="forms.PersonForm"/>> >
><!-- Action > > that retrieves details about aperson -->> <action > >
>path="/person" >type="actions.PersonAction" > > name="personForm"
> >scope="session" > > input="/customerSearch.jsp">>
><forwardname="success" > > path="/personDetail.jsp"/>></action>>
>> <!-- > > Action that stores details about a person -->> <action> >
>path="/storePerson" > > > type="actions.StorePersonAction"name="personForm"
> > > > scope="session" > >input="/personDetail.jsp">>
><forward name="cancel" > >> path="/customerSearch.jsp"/>> <forward > >
>name="delete"> > > path="/customerSearch.jsp"/>> > <forward name="save" >>
>path="/personDetail.jsp"/>> </action>> > > ============ Log> > > action: Processing a
>POST for > /storePerson> action: Looking > for ActionF!
> orm bean under attribute 'personForm'> action:
> > Recycling existing ActionForm bean instance of class>
> > 'forms.PersonForm'> action: Populating bean properties from
> > this request> action: Validating input form properties>
> > action: No errors detected, accepting input> action:
> > Looking for Action instance for class >
> > actions.StorePersonAction> action: Double checking for
> > Action instance already there> action: Creating new Action
> > instance> action: Saving customer > > > >
> > --------------------------------------------------------------
> > -------> To send us encrypted mail, please refer to:>
> > http://www.millionhandshakes.com/emailpolicy/pgp.html> >
> > Million Handshakes>
> > --------------------------------------------------------------
> > -------To send us encrypted mail, please refer
> > to:http://www.millionhandshakes.com/emailpolicy/pgp.html
> >
> > Million Handshakes
> >
>
>
> ---------------------------------------------------------------------
> To send us encrypted mail, please refer to:
> http://www.millionhandshakes.com/emailpolicy/pgp.html
>
> Million Handshakes
>
---------------------------------------------------------------------
To send us encrypted mail, please refer to:
http://www.millionhandshakes.com/emailpolicy/pgp.html
Million Handshakes