The following issue has been updated: Updater: Nathan Egge (mailto:[EMAIL PROTECTED]) Date: Wed, 27 Apr 2005 11:47 PM Comment: A simple patch that adds an 'initial' parameter to the @struts.form-field attribute. Changes: Attachment changed to patch_struts.form-field_added_initial.diff --------------------------------------------------------------------- For a full history of the issue, see:
http://opensource.atlassian.com/projects/xdoclet/browse/XDT-1367?page=history --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/xdoclet/browse/XDT-1367 Here is an overview of the issue: --------------------------------------------------------------------- Key: XDT-1367 Summary: Uninitialized "subform" objects from @struts.form Type: Bug Status: Open Priority: Major Original Estimate: Unknown Time Spent: Unknown Remaining: Unknown Project: XDoclet Components: Apache Module Versions: 1.2.3 Assignee: xdoclet-devel (Use for new issues) Reporter: Nathan Egge Created: Wed, 27 Apr 2005 3:33 PM Updated: Wed, 27 Apr 2005 11:47 PM Environment: Gentoo Linux x86/2005.0/2.4 [blackdown-jdk-1.4.2] "Blackdown JDK 1.4.2" Description: When generating Form objects from POJOs with the @struts.form include-all="true", the Form object it creates leaves all the attributes uninitialized. If my POJO contains another POJO, the resulting generated form has a "subform" that is not initalized in the form. If I have the following jsp code that renders a select based on the id of a "subform" called type, <html:select property="type.id"> <html:options collection="types" property="id" labelProperty="name"/> </html:select> when I submit this form I get the following exception: java.lang.IllegalArgumentException: No bean specified at org.apache.commons.beanutils.PropertyUtils.getPropertyDescriptor(PropertyUtils.java:837) at org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:934) at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:808) at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:495) at org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:798) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:205) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415) at javax.servlet.http.HttpServlet.service(HttpServlet.java:709) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) ... This is because the all of the non-primative types in the Form are left uninitialized. The correct behaviour would be to create a new object for each member variable. --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/xdoclet/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira ------------------------------------------------------- SF.Net email is sponsored by: Tell us your software development plans! Take this survey and enter to win a one-year sub to SourceForge.net Plus IDC's 2005 look-ahead and a copy of this survey Click here to start! http://www.idcswdc.com/cgi-bin/survey?id=105hix _______________________________________________ xdoclet-devel mailing list xdoclet-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xdoclet-devel