Hi,

I am trying to use a POJO inside a Struts (1.2.7) FormBean, 
but I am unable to access the fields inside the POJO.

package com.fmm.web.inventory.forms;
public class IDefForm extends ActionForm
{
        private IDef iDef;
        private List inventoryDefinitions;
 
        ...getters ..and...setters..
}

package com.fmm.web.inventory.beans;
public class IDef
{
        private long iDefID;
        private String partNumber;
        private String description;
        private int equipType;

        .....getters ...and...setters...
}

inventoryDefinitions is a simple ArrayList() which I populate in the Action 
class and can easily be 
used to display several objects using the logic:iterate tag.
To add an object to the underlying DB, I want to use the iDef object bean in my 
form, instead of
creating copies of all the individual fields in the form bean.

This is what I want the form to look like:
<html:form action="/iDef" styleId="createIDefForm">
        <html:hidden styleId="action" property="action" value="add"/>
        Part Number:
        <html:text styleId="partNumber" property="iDef.partNumber" size="50" 
maxlength="50"/>
        Description:
        <html:textarea styleId="description" property="iDef.description" 
rows="4" cols="40"/>

     ......and so on...

</html:form>

I get this exception:
javax.servlet.ServletException: No getter method for property iDef.partNumber 
of bean org.apache.struts.taglib.html.BEAN

So what is the way to achieve what I am trying to do?
What am I doing wrong?

Thanks,
Karan

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to