FW: Indexed tags problem
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. > > >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> > > > > >name="personForm"property="personpersonFields">> > > > name="personField" > > property="value"indexed="true"/>> > e>> > > === HTML produced> >>type="text" >name="personField[0].value" value="1000831">> > > > >=== >struts-config.xml> > > name="personForm"type="forms.PersonForm"/>> > >> > >path="/person" >type="actions.PersonAction"> >name="personForm" > >scope="session" > > input="/customerSearch.jsp">> > > path="/personDetail.jsp"/>>> >> > > >path="/storePerson" > > > type="actions.StorePersonAction"name="personForm" > > > > scope="session" > >input="/personDetail.jsp">> > >> path="/customerSearch.jsp"/>> > >name="delete"> > > path="/customerSearch.jsp"/>> > > >path="/personDetail.jsp"/>> > > > 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
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. > property="personFields">> > any >thoughts, (I have read through other postings, 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 in the form is not updated. > I have >got> > updates working elsewhere, but I can't get this working. > > > > Is it because >I use a nested property in the iterate tag i.e.> > getPerson().getPersonFields();> > >> > > > Cheers in advance> > > > Andy> > > > === JSP> > id="personField" > > name="personForm"property="person.personFields"> > > > >property="value" indexed="true"/>> > > > > > === HTML produced> > > type="text" name="personField[0].value" value="1000831">> > > > === struts-config.xml> > name="personForm" >type="forms.PersonForm"/>> > > > path="/person" > type="actions.PersonAction"> >name="personForm" > scope="session" > >input="/customerSearch.jsp">> >path="/personDetail.jsp"/>> > > > path="/storePerson" > > >type="actions.StorePersonAction" name="personForm" > > >scope="session" > input="/personDetail.jsp">> name="cancel"> > path="/customerSearch.jsp"/>> >name="delete" > > path="/customerSearch.jsp"/>> > name="save"> path="/personDetail.jsp"/>> > > >Log> > > action: Processing a POST for /storePerson> action: Looking > for >ActionForm 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
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. any thoughts, (I have read through other postings, 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 in the form is not updated. I have got > updates working elsewhere, but I can't get this working. > > Is it because I use a nested property in the iterate tag i.e. > getPerson().getPersonFields(); > > > Cheers in advance > > Andy > > === JSP > name="personForm"property="person.personFields"> > > > indexed="true"/>> > > > === HTML >produced> > value="1000831">> > > === struts-config.xml> > name="personForm" type="forms.PersonForm"/>> > > type="actions.PersonAction" > name="personForm" > scope="session" >input="/customerSearch.jsp">> path="/personDetail.jsp"/>> > > > >type="actions.StorePersonAction" name="personForm" > >scope="session" input="/personDetail.jsp">> > path="/customerSearch.jsp"/>> > path="/customerSearch.jsp"/> > > > > > Log> > action: Processing a POST for /storePerson> action: Looking for >ActionForm 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
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 in the form is not updated. I have got updates working elsewhere, but I can't get this working. Is it because I use a nested property in the iterate tag i.e. getPerson().getPersonFields(); Cheers in advance Andy === JSP === HTML produced === struts-config.xml Log action: Processing a POST for /storePerson action: Looking for ActionForm 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
Apache, IIS , tag
The code gives me the HTML below. This results in the image not being displayed when I use tomcat with apache web server It is displayed fine when I use tomcat with iis though! For what reason does it append the sessionid to it?? Do you know why it works with iis and not apache? cheers Andy - To send us encrypted mail, please refer to: http://www.millionhandshakes.com/emailpolicy/pgp.html Million Handshakes
RE: Internationalization
Not sure if this is what you want, but I changed the locale using my web browser. if using IE it is tools>internet options>languages n.b. you may need to stop and start IE for the change to be noticed. cheers Andy > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]] > Sent: 26. juni 2001 16:07 > To: [EMAIL PROTECTED] > Subject: Internationalization > > > > > I am learning the struct architecture. I want to use the > internationalization in > my application. I have seen the example application that is > currently using the > internationalization. I want to change the locale of the > application. Which are > the points in the architecture I have to change to use the > different locale. > I have tried but unable to change. I will be thanful to you > if anyone solve my > problem. > Vinay. > > - To send us encrypted mail, please refer to: http://www.millionhandshakes.com/emailpolicy/pgp.html Million Handshakes
RE: Form problem
I have resorted to using scriptlets. There must be a more elegant solution though! which gives... First name Last namecheersA > -Original Message-> From: Andrew Paul Swift [mailto:[EMAIL PROTECTED]]> Sent: 26. juni 2001 12:25> To: '[EMAIL PROTECTED]'> Subject: Form problem > > > I have an array beans which I am trying to use to build up a > dynamic form.> The bean has 3 properties DisplayName, id and value. > > The id property is the unique identifier that corresponds to > the name of the> HTML input field.> The value property contains the value of the HTML text field.> The displayName property contains the name that should be > displayed next to> the form field.> > so... I iterate through the array and build up the form> > name="<%=Constants.SEARCH_FIELD_KEY %>">> > name="searchField"property="displayName" /> >name="searchField"property="id" >/>> > > > which produces this >output ...> > > FORNAVN> value="FIRSTNAME">> > > LASTNAME> type="text" name="id" value="LASTNAME">> > > but... the HTML name >attribute is always "id" which means that I can't> identify the individual fields.> I >want the name attribute of the HTML input field to be the > value stored in> beans id >property!> > n.b. I have no control over what the search fields may be. I > just have >to> handle whatever I get.> > > Any ideas??> > cheers> > > Andrew> > > >-> 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
Form problem
I have an array beans which I am trying to use to build up a dynamic form. The bean has 3 properties DisplayName, id and value. The id property is the unique identifier that corresponds to the name of the HTML input field. The value property contains the value of the HTML text field. The displayName property contains the name that should be displayed next to the form field. so... I iterate through the array and build up the form which produces this output ... FORNAVN LASTNAME but... the HTML name attribute is always "id" which means that I can't identify the individual fields. I want the name attribute of the HTML input field to be the value stored in beans id property! n.b. I have no control over what the search fields may be. I just have to handle whatever I get. Any ideas?? cheers Andrew - To send us encrypted mail, please refer to: http://www.millionhandshakes.com/emailpolicy/pgp.html Million Handshakes
Dynamic Forms
I have a form that has a variable number of fields determined by an XML document. e.g. etc... I can't think of any ways in which to use the struts framework to handle this. If I am right in thinking that I have to hardcode a form object. Any ideas?? cheers in advance Andrew - To send us encrypted mail, please refer to: http://www.millionhandshakes.com/emailpolicy/pgp.html Million Handshakes