Alternatively, nest your beans. That is, have TeamForm contain an instance of AwayTeam and an instance of HomeTeam: public class TeamForm extends ActionForm { private AwayTeam awayteam = new AwayTeam(); private HomeTeam hometeam = new HomeTeam(); ... Then, your select tags look like: <html:select name="teamForm" property="hometeam.teamId> etceteras. You can then abbreviate this syntax, and provide for better indexing support, if you migrate to the <nested> tags (struts-nested.tld). HTH m
Wendy Smoak <[EMAIL PROTECTED]> wrote: Martin wrote: > The problem is that both the bean homeTeam and awayTeam have the > property teamId which results in the following HTML... > As you can see both the name attributes have the value teamId, > which of course is a problem. I'm confused by having one html form, but expecting Struts to populate two beans. AFAIK, it's one-to-one with the html form and the ActionForm instance (the form bean). After that, you can do what you like in the Action to populate whatever you need. So you might have properties such as homeTeamId and awayTeamId in your form bean. You probably won't be able to use the magic BeanUtils.copyProperties() but instead will have to write code to populate your homeTeam and awayTeam beans from the values in the form bean. So I see it going: Html form -> ActionForm/Action -> populate custom beans -> forward to view -- Wendy Smoak Applications Systems Analyst, Sr. Arizona State University, PA, IRM --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software