You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Patrick Roumanoff <sd...@roumanoff.com> on 2002/08/12 14:19:09 UTC
Re: Problem with logic:iterate
According to "Sudhir S. Shetty" <ss...@powershare.net>:
> private String [] tempsud =
> public void setTempsud(String tempsud[]){
> this.tempsud = tempsud;
> }
> public String[] getTempsud(){
> return this.tempsud;
> }
> -----------------------------------------------------
> <logic:iterate id="SampleRowForm" name="SampleRowForm" property="tempsud">
> <tr><td>
> <%="Sudhir"%>
> <bean:write name="SampleRowForm" property="tempsud"/>
> </td></tr>
> </logic:iterate>
>
> when i run the JSP file I get the following error
> javax.servlet.jsp.JspException: No getter method for property tempsud of bean
That's probably because your bean doesn't have an indexed getter method for this property which can be implemented like this:
public String getTempsud(int n){
return this.tempsud[n];
}
but of course, you can add bounds checking on the tempsud array
hopes this help
Patrick
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>