You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Liu, Anne I" <an...@twc.state.tx.us> on 2004/04/03 01:06:14 UTC

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

I've been trying to do the same thing, and this is the only solution I found
that works...

http://www.developer.com/java/ejb/article.php/2233591

> -----Original Message-----
> From:	Menke, John [SMTP:John.Menke@acs-inc.com]
> Sent:	Friday, April 02, 2004 4:53 PM
> To:	Struts (E-mail)
> Cc:	Desai, Sunny
> Subject:	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

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