This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Since you have a separate form for each iteration of searchResultDTO, there is a disconnect between the fact that when you submit the form, you only want one businessId to be submitted, but yet you have to set the value of that businessId through iteration and nesting. Because of this, I wouldn't use a struts tag at all for the hidden field. Here's how I'd do it:
That way Struts doesn't try change your property names to indexed values that don't really fit in this situation, yet the value is still set properly with the <nested:write> tag. [ January 15, 2007: Message edited by: Merrill Higginson ]