[ http://www.stripesframework.org/jira/browse/STS-674?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=11817#action_11817 ]
Ben Gunter commented on STS-674: -------------------------------- This is a symptom of a deeper problem with layouts and partial forms. It has to do with the way layouts are evaluated. The layout components are evaluated before the layout definition is evaluated. At the time the form tag within a component is evaluated, the form tag in the definition does not exist and therefore cannot be referenced by the any of the input tags in the component's partial form. In a normal form (i.e., one that is not split across a layout) the file input tag is responsible for setting its parent form's enctype attribute to allow for file uploads. This can't happen with a partial form defined within a layout component. This is a complex problem that certainly will not be fixed for 1.5.2 and might have to wait until 1.6. > Partial form cause File Tag to fail > ----------------------------------- > > Key: STS-674 > URL: http://www.stripesframework.org/jira/browse/STS-674 > Project: Stripes > Issue Type: Bug > Affects Versions: Release 1.5.1 > Environment: Windows Vista, Tomcat, Jdk 1.6 > Reporter: Chut N Yee > Priority: Critical > Fix For: Release 1.6 > > > The Jsp: > <stripes:layout-render name="/layout/testLayout.jsp" title="User Home" > action="/userHome.action"> > <stripes:layout-component name="contents"> > <stripes:form action="/userHome.action" partial="true"> > <stripes:file name="fileBean" /> > <stripes:submit name="upload" value="upload"/> > </stripes:form> > </stripes:layout-component> > </stripes:layout-render> > The Layout: > <stripes:layout-definition> > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" > "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> > <html> > <head> > <meta http-equiv="content-type" content="text/html; > charset=iso-8859-1"/> > </head> > <body> > <stripes:form action="${action}"> > <div>${contents}</div> > </stripes:form> > </body> > </html> > </stripes:layout-definition> > --------------------- > fileBean is always null in action bean. > It works if I take away the <stripes:form> tag in the layout, and remove > partial="true" in the jsp. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://www.stripesframework.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Stripes-development mailing list Stripes-development@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-development