I think, I have found the reason of the problem but still don't understand it. If I use "getDropDownSelection()" instead of "getDropDownSelections()" to get the Map back the setter method "setDropDownSelection(String key, String[] v)" is not called.
Do I misunderstand something? I use jdk-1.4.2-06 Win-Xp-sp2, Struts-1.1, tomcat-5.0.27. // This method musn't be called as "getDropDownSelection". public Map getDropDownSelections() { return dropDownSelection; } public String[] getDropDownSelection(String key) { return (String[])dropDownSelection.get(key); } public void setDropDownSelection(String key, String[] v) { log.debug("CALED ----------------"); dropDownSelection.put(key, v); } Zsolt > -----Original Message----- > From: news [mailto:[EMAIL PROTECTED] On Behalf Of Jeff Beal > Sent: Thursday, December 23, 2004 6:47 PM > To: user@struts.apache.org > Subject: Re: Which setter do I need in the ActionForm for this example? > > With multiple="true", I think that you need a property of type String[] > in your ActionForm. > > -- Jeff > > Zsolt Koppany wrote: > > Richard, > > > > Thank you, but did you see that I have set multiple="true" ? > > > > Zsolt > > > > > >>-----Original Message----- > >>From: Richard Yee [mailto:[EMAIL PROTECTED] > >>Sent: Thursday, December 23, 2004 4:01 PM > >>To: Struts Users Mailing List > >>Subject: Re: Which setter do I need in the ActionForm for this example? > >> > >>Zsolt, > >>The selected item in a html:select input is typically a String property. > >>It > >>is separate from the collection that is used to populate a dropdown > list. > >>You should have a getter and setter for a string property and use that > >>property as the value of the "property" attribute of the html:select > tag. > >> > >>-Richard > >> > >>At 04:12 AM 12/23/2004, you wrote: > >> > >>>Hi, > >>> > >>>I have tried several setters in the Form class but none of them are > >> > >>called > >> > >>>when the form is terminated. How should me setter look like to the > >> > >>property > >> > >>>"dropDownSelection". The getter method is: > >>> > >>>public Map getDropDownSelection() > >>>{ > >>> return dropDownSelection; > >>>} > >>> > >>>The setter "setDropDownSelection(String key, Object value)" is never > >> > >>called. > >> > >>> > >>>Zsolt Koppany Phone: +49-711-722 1874 -- Intland Software GmbH, > >>>Schulze-Delitzsch-Strasse 16 D-70565 Stuttgart, Germany Phone: +49-711- > >> > >>722 > >> > >>>1873, e-mail:[EMAIL PROTECTED] Fax: +49-711-722 1835 > >>>--------------------------------------------------------------------- > 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]