Is ajax support for file upload on Tapestry's roadmap? It's easy enough to implement by posting the form to a hidden iframe.
On Saturday, 24 March 2012, Taha Hafeez Siddiqi <[email protected]> wrote: > Hi > > File upload component does not work with ajax. > > regards > Taha > > On Mar 24, 2012, at 12:52 AM, Borko Djurovic wrote: > >> I have simple page that contains upload component. When I provide file for >> upload and submit the form, validation can't pass. >> >> This is part of Index.tml page: >> <t:form t:id="upload" t:zone="displayZone"> >> <t:errors/> >> <table> >> <tr> >> <td><p>File Path: </p></td> >> <td><input t:type="upload" t:id="fileUpload" t:value="file" >> validate="required" /></td> >> </tr> >> <tr> >> <td><input type="submit" value="Upload" /></td> >> </tr> >> </table> >> </t:form> >> ------------------------ >> >> This is Index.java page: >> public class Index { >> >> @Property >> private UploadedFile file; >> >> @Property >> @InjectComponent >> private Zone displayZone; >> >> @Persist >> private IUnZiper unZiper; >> >> @SetupRender >> public void initialize() { >> unZiper = new UnZiper(); >> } >> >> @Property >> private String currentFilePath; >> >> public List<String> fileList() { >> if (unZiper.isUnziped()) { >> File outFile = new File(UnZiper.OUTPUT_FOLDER); >> List<String> result = new ArrayList<String>(); >> for (String s : outFile.list()) { >> result.add(s); >> } >> return result; >> } >> return null; >> } >> >> public Object onSuccess() { >> System.out.println("Hello: " + file.getFileName()); >> unZiper.unzip(new File(file.getFileName())); >> return displayZone.getBody(); >> } >> } >> ----------------- >> >> -- >> View this message in context: http://tapestry.1045711.n5.nabble.com/Upload-file-problem-tp5590513p5590513.html >> Sent from the Tapestry - User mailing list archive at Nabble.com. >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [email protected] >> For additional commands, e-mail: [email protected] >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected]
