Try looking at the source of the generate page. See that all looks correct. I am also not sure if leading spaces between the name of the property name 'stringMapped' and the () chars are legal... -- Erez
-----Original Message----- From: Zhu He [mailto:[EMAIL PROTECTED] Sent: Friday, June 06, 2003 4:04 PM To: Struts Users Mailing List Subject: Re: Action Form: HashMap if you are using map backed actionForm, make sure getXXX() setXXX() where XXX matches the name of the map. In you case function names should be getMap() setMap() ----- Original Message ----- From: "Ray Madigan" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Sent: Friday, June 06, 2003 9:37 AM Subject: RE: Action Form: HashMap > OK, I made the following changes, and it didn't do what I expected. > HELP! > > I added to the ActionForm: > > /** > * The form HashMap > */ > private HashMap map = new HashMap ( ); > > public Object getStringMapped ( String key ) { > return map.get ( key ); > } > > public void setStringMapped ( String key, String value ) { > map.put ( key, value ); > } > > I modified the jsp as: > <html:form action='Foo.do'> > > <c:forEach var='element' items='${elements}' > > <html-el:text property='stringMapped ( ${element.element} )' > value='${element.value}'/> > </c:forEach> > > ... > > </thml:form> > > When I look at the form in my DispatchAction map is always empty. > > Any help would be appreciated! > > -----Original Message----- > From: David Graham [mailto:[EMAIL PROTECTED] > Sent: Thursday, June 05, 2003 11:13 AM > To: [EMAIL PROTECTED] > Subject: Re: Action Form: HashMap > > > Read the mapped properties section here: > http://jakarta.apache.org/struts/faqs/indexedprops.html > > David > > > >From: "Ray Madigan" <[EMAIL PROTECTED]> > >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]> > >To: "Struts Users Mailing List" <[EMAIL PROTECTED]> > >Subject: Action Form: HashMap > >Date: Thu, 5 Jun 2003 11:00:12 -0700 > > > >I have a form that has elements that I do not know the names of ahead > >of time. > > > >I want to have struts scrape the form into a map so the key is the name > >of the element and the value is the value of the element when it was > >submitted. > > > >I looked for an action form that acted like this. Has anyone done it > >before, or is there a better way? > > > > > > > >--------------------------------------------------------------------- > >To unsubscribe, e-mail: [EMAIL PROTECTED] > >For additional commands, e-mail: [EMAIL PROTECTED] > > > > _________________________________________________________________ > Tired of spam? Get advanced junk mail protection with MSN 8. > http://join.msn.com/?page=features/junkmail > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]