You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Hoang, Hai" <Ha...@coair.com> on 2002/04/22 16:02:14 UTC
html:options bug?
I've been using the html:options tag like following without any problems in
the past.
<html:select property="availableId" size="5">
<html:options collection="allusers" property="id"
labelProperty="name"/>
</html:select>
However, I recently get this weird javax.servlet.ServletException:
PropertyDescriptor: internal error
while merging PDs: type mismatch between read and write methods
When I change the code to the following and everything is working fine...Any
ideas?
<select name="availableId" size="5">
<%
User[] users = (User[])session.getAttribute("allusers");
if (users != null)
{
for (int i = 0; i < users.length; i++)
{%>
<option
value="<%=users[i].getId()%>"><%=users[i].getName()%></option>
<%}
}%>
</select>
Thank you