"Craig R. McClanahan" wrote:
> 
> Florent Goalabré wrote:
> 
> > 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
> >
> 
> Florent, what are the method signatures of your getIcon() and setIcon()
> methods?  If the data types are different, the JDK's bean introspection
> logic will conclude that you do not have a property with the specified
> name.  This would be because your method names are not conforming to the
> JavaBeans spec requirements.
> 
> A (contrived) example of different data types would be something like this:
> 
>     public String getIcon();
>     public void setIcon(StringBuffer icon);
> 

=>  the methods were not conforming to JavaBeans spec: 
     public String getIcon();
     public void setIcon(File icon);

One strange behaviour is that it works for others properties which
method signatures
are the same than icon: 
     public String getName();
     public void setName(File name);
or 
     public String getLink();
     public void setLink(File link);

For Property icon : 
by tracing getSimpleProperty(Object bean, String name) in
org.apache.struts.util.PropertyUtils,
the PropertyDescripor is retrieved but a exception is thrown when trying
to retrieve
the readMethod.

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

Reply via email to