I'm getting an error populating indexed properties.. I'm wondering if its a
bug in struts.. has anyone else experienced this?
Explanation:
Exception
javax.servlet.ServletException: BeanUtils.populate
at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1254)
at
org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.j
ava:821)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
Root Cause
java.lang.IllegalArgumentException: No bean specified
at
org.apache.commons.beanutils.PropertyUtils.getPropertyDescriptor(PropertyUti
ls.java:837)
at org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:934)
at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:808)
Jsp Code:
<html-el:form action="/modifyFlexReferencesQuery.do">
<html-el:hidden name="testForm" property="begRecord"/>
<html-el:hidden name="testForm" property="endRecord"/>
<logic:iterate name="testForm" property="flexReferenceLines"
id="flexReferenceLine">
<html-el:hidden name="flexReferenceLine" property="flexReference.id"
indexed="true" write="true"/> <--- Offending Line
Meanwhile the next line works fine:
<html-el:checkbox name="flexReferenceLine" property="selected"
indexed="true"/>
My Form has the required:
public FlexReferenceLine getFlexReferenceLine(int index) {
while (index >= this.flexReferenceLines.size())
this.flexReferenceLines.add(new FlexReferenceLine());
return (FlexReferenceLine) this.flexReferenceLines.get(index);
}
and the FlexReferenceLine object has a getter and setter for flexReference..
and the flexReference object has a getter and setter for ID... very
puzzling.
Anyone ran into this before?
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]