Sorry, I'am somewhat at a loss...

I had a similar problem, where it helped composing the property-term to a
variable first, and using double quotes for the property value:

...
<td>
<% pVal = view[" + index+ "]"+".orderNo; %>
<html:text property="<%=pVal%>" />
</td>
...

but I never understood why (can anybody tell me?)

Guido



                                                                                       
                             
                               "suhas"                                                 
                             
                   <[EMAIL PROTECTED]       To:  <[EMAIL PROTECTED]>     
                             
                            ltech.com>       cc:                                       
                             
                                             Subject:  Re: Iterate problem             
                             
                                                                                       
                             
                      10.07.2001 15:02                                                 
                             
                     Please respond to                                                 
                             
                           struts-user                                                 
                             
                                                                                       
                             
                                                                                       
                             


it is goes something like this .

private String orderNo ;

public String getOrderNo() {
    return orderNo ;
}


----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 10, 2001 8:28 AM
Subject: Re: Iterate problem


>
> Hi
>
> The parts you show look correct to me. It seems that the problem lies in
> the code of method OverDueOrderView.getOrderNo(), which you have not
copied
> to the mail.
>
> Guido
>
>
>
>
>                                "suhas"
>                    <[EMAIL PROTECTED]       To:
<[EMAIL PROTECTED]>
>                             ltech.com>       cc:
>                                              Subject:  Iterate problem
>
>                       10.07.2001 11:55
>                      Please respond to
>                            struts-user
>
>
>
>
> Hi I have a question
>
> My Iterate tag goes like this
>
> <logic:iterate id="view" name="updateOrderForm" property="views" type
> ="example.testorder.OverDueOrderView">
>
> <tr>
> <td>
> <html:text property='<%= "view[" + index+ "]"+".orderNo" %>' />
> </td>
> <td>
> <html:text property='<%= "view["+index+ "]"+".salesDiv" %>' />
> </td>
> <td>
> <html:text property='<%= "view["+index+ "]"+".productOrdered" %>' />
> </td>
> </tr>
> <% index++ ;%>
> </logic:iterate>
> Do I need **IndexId** here as an attribute in the iterate Tag  ??? 'cos
In
> my form bean when showing the above table there is a call to
>  public OverDueOrderView getView(int index) {
>       System.out.println(" in side the getView of UpdateOrder Form "+
> index);
>   return (OverDueOrderView)views.get(index);
>  }
>
> Here I'm getting **in side the getView of UpdateOrder Form 0 **  printed
> with following error message
>      javax.servlet.ServletException: Exception thrown by getter for
> view[0].orderNo of bean org.apache.struts.taglib.html.BEAN
>
> What can be the problem -- IS it 'cos i'm not specifying indexId
attribute
> in the iterate tag or something else ???
>
>
>
>
>
>
>
>
>
>
>
>







Reply via email to