Hello,

I try  to use iterate tag,
<bean:write property="xxx"> tag works fine for several property of a
bean but it does not 
work for a few ones.

The JSP looks like :

<logic:iterate id="filedescription" name="consForm"
property="fileDescriptions" scope="request"
type="edu.bv.portedoc.view.FileDescription">
  <tr bgcolor="<bean:write name="filedescription" property="color" />">
   <td><bean:write name="filedescription" property="name" /></td>
   <td><bean:write name="filedescription" property="icon" /></td>
   <td><bean:write name="filedescription" property="link" /></td>
  </tr>
</logic:iterate>

An error occurs :
javax.servlet.jsp.JspException:
  No getter method for property icon of bean filedescription

If i delete the line with icon property, link name and color properties
display well.
Though the icon getter method exist, this code works:

<jsp:useBean id="consForm" scope="request"
type="edu.bv.portedoc.model.ConsultForm"/>
<%
       FileDescription[] al = consForm.getFileDescriptions();
       for (int i = 0; i<al.length; i++) {
        FileDescription fd = (FileDescription) al[i];
%>
  <tr bgcolor="fd.getColor()">
   <td><%= fd.getName() %></td>
   <td><%= fd.getIcon() %></td>
   <td><%= fd.getLink() %></td>
  </tr>
<% } %>

I try to look at the Intropector Utils class
org.apache.struts.util.PropertyUtils.
In the method getSimpleProperty(Object bean, String name), 
the property descriptor is retrieved but it fails to retrieve the
property getter method for the specified property.

Any idea

-- 
Florent Goalabré - [EMAIL PROTECTED]
ALIACOM - tel: 05 62 19 24 91 - fax: 05 62 19 24 91 - www.aliacom.fr

Reply via email to