We don't yet have Forms and Zones working; XMLHttpRequest doesn't automatically handle the necessary MIME multipart/form-data content type. It possible that the Upload need to be handled specially, perhaps with a Flash movie.
On Mon, May 3, 2010 at 1:07 PM, Chuck Kring <cjkr...@pacbell.net> wrote: > Hello, > > I have a form that references a zone. When the form is linked to the zone > (form t:zone="zone"), a file upload component fails. When the link is > removed the file upload works fine. > > Java and tml are below. This currently prints "Uploaded = null". To get it > to work remove t::zone="theForm" from the form. > > Is this a bug or am I doing something wrong? If it's a bug I'll file a > Jira. > > Thanks. > > Chuck Kring > ------------------------------------------------------------------------ > > <?xml version="1.0" encoding="utf-8"?> > <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd"> > <body> > <div class="dialog_outer" style="width:700px"> > <t:zone t:id="theForm"/> > <t:form t:zone="theForm"> > <table><tbody> > <tr> > <td>Upload file</td> > <td><input t:type= "upload" t:id="uploaded"/></td> > </tr> > </tbody></table> > <t:submit t:id="apply" value="Apply"/> > </t:form> > </div> > </body></html> > > ------------------------------------------------------------------------ > package gateway.pages; > import org.apache.tapestry5.annotations.Property; > import org.apache.tapestry5.upload.services.UploadedFile; > > public class BugReport { > @Property > private UploadedFile uploaded; > public void onSelectedFromApply() > { > if(uploaded == null ){ > System.out.println("Uploaded = null"); > } else { > System.out.println("Uploaded = " + uploaded.getFileName()); > } > } > } > -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org