You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Menke, John" <Jo...@acs-inc.com> on 2004/04/03 00:52:31 UTC

parsing indexed properties in my action - how to do mulitple row update

i'm trying to do something like this in my jsp so i can do a mulitple row
update in my Action

<c:forEach var="lines" items="${bean.collectionName}" >
  <TR>
     <TD><core:out value='${partNumber}'/>"><html:hidden indexed="true"
name="lines" property="partNumber"/></TD>
    <TD><core:out value='${quantity}'/>"><html:hidden indexed="true"
name="lines" property="quantity"/></TD>
    <TD>
                 <html:select property="countyCode"  indexed="true">
                     <html:optionsCollection name="countyCode"
property="countyCodeCollection" label="key" value="key" />
                  </html:select>

   </TD>
</TR>
</c:forEach>

i have a bean

public class CollectonItem{
  private String partNumber;
  private String quantity;
 private String countyCode;

  public String getPartNumber() {
    return partNumber;
  }

  public void setPartNumber(String partNumber) {
    this.partNumber = partNumber;
  }

  public String getQuantity() {
    return quantity;
  }

  public void setQuantity(String quantity) {
    this.quantity = quantity;
  }

 public String getCountyCode() {
    return countyCode;
  }

  public void setCountyCode(String countyCode) {
    this.countyCode= countyCode;
  }


}

In my action how can i extract these values from the form and populate a
collection of CollectionItem beans?  Do i have to use Dynaforms?  




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org