Try looking in www.mail-archive.com under struts-user for the keywords
"Grid" or "Matrix".  You'll find some material there.


----- Original Message -----
From: "Shamdasani Nimmi-ANS004" <[EMAIL PROTECTED]>
To: "struts-user@jakarta. apache. org (E-mail)"
<[EMAIL PROTECTED]>
Sent: Wednesday, June 13, 2001 11:52 AM
Subject: Need help with updatable indexed properties.


> Hi,
>
> Can someone please show me how to use the 'Iterate' and 'Select' tags
instead in JSP code below for the indexed properties some of which are
modifiable :
>
>
>
> <%SubmitQuotesForm
submitQuotesForm=(SubmitQuotesForm)session.getAttribute("submitQuotesForm");
%>
>
> <%for (int i=0; i <
submitQuotesForm.getRfqListBean().getTotalRfqCount();i++) {%>     [WANT TO
USE ITERATE HERE]
>   <tr>
>
>     <td align="center" width="6%"><font SIZE="1" face = "Arial">
>
<%=submitQuotesForm.getRfqListBean().getRfqList(i).getUsingLocationCode()%>
>     </font>
>     </td>
>
>     <td width="7%"><font SIZE="1" face = "Arial"> [THIS HAS TO BE DROPDOWN
LIST. HOW TO USE SELECT TAG HERE]
>
<%=submitQuotesForm.getRfqListBean().getRfqList(i).getResponseIndicatorCode(
)%>
>     </font>
>     </td>
>
>     <td width="15%"><font SIZE="1" face = "Arial">
>
<%=submitQuotesForm.getRfqListBean().getRfqList(i).getManufacturerPartNbr()%
>
>     </font>
>     </td>
>
>     <td width="5%"><font SIZE="1" face = "Arial">
>       <input type="text"
name="rfqListBean.rfqList[<%=i%>].supplierQuotedprice"
>
value="<%=submitQuotesForm.getRfqListBean().getRfqList(i).getSupplierQuotedP
rice()%>">
>     </font>
>     </td>
>
>     <td width="2%"><font SIZE="1" face = "Arial">
>       <input type="text"
name="rfqListBean.rfqList[<%=i%>].priceDescription"
>
value="<%=submitQuotesForm.getRfqListBean().getRfqList(i).getPriceDescriptio
n()%>">
>     </font>
>     </td>
>
>   </tr>
>   <%}%>
>
>
>
> This is what my 'SubmitQuotesForm', 'RfqListBean' look like:
>
> public final class SubmitQuotesForm extends ActionForm {
>
>   public SubmitQuotesForm() {
>
>   }
>
>   private RfqListBean rfqListBean = new RfqListBean();
>
>
>   public RfqListBean getRfqListBean() {
>     return rfqListBean;
>   }
>
>   public void setRfqListBean(RfqListBean rfqListBean) {
>     this.rfqListBean = rfqListBean;
>   }
>
> }
>
> public final class RfqListBean implements Serializable {
>
>     public RfqListBean() {
>     }
>
>     private int totalRfqCount = 0;
>     private RfqBean[] rfqList;
>
>     public RfqBean getRfqList(int index) {
>       return rfqList[index];
>     }
>
>     public void setRfqList(int index, RfqBean rfqBean) {
>       this.rfqList[index] = rfqBean;
>     }
> }
>
> and RfqBean is just a regular bean with various properties.
>
>
> TIA.
>
> -Nimmi
>
>

Reply via email to