Re: Adding a progress listener to UploadedFile
You will need to override (or perhaps decorate) the MultipartDecoder. Most likely, you will extend MultipartDecoderImpl and extend the following method to add your progress listener: Note that the MultipartDecoder has per-thread scope https://github.com/apache/tapestry5/blob/trunk/tapestry-upload/src/main/java/org/apache/tapestry5/upload/services/UploadModule.java https://github.com/apache/tapestry5/blob/trunk/tapestry-upload/src/main/java/org/apache/tapestry5/upload/internal/services/MultipartDecoderImpl.java -- View this message in context: http://tapestry.1045711.n5.nabble.com/Adding-a-progress-listener-to-UploadedFile-tp5718197p5718202.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Adding a progress listener to UploadedFile
http://tapestry.apache.org/ioc-cookbook-overriding-ioc-services.html -- View this message in context: http://tapestry.1045711.n5.nabble.com/Adding-a-progress-listener-to-UploadedFile-tp5718197p5718205.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Adding a progress listener to UploadedFile
Thanks. I wasn't able to use the following annotation and method... @Contribute(ServiceOverride.class) public static void setupApplicationServiceOverrides(MappedConfigurationClass,Object configuration) { configuration.addInstance(SomeServiceType.class, SomeServiceTypeOverrideImpl.class); } I have a suspicion I am on an earlier version of tapestry 5 (I am still on 5.1.0.5). I have managed to override MultipartDecoderImpl in a very hacky way which has allowed me to set the progress listener. It's an early POC I'm doing so, happy that it works, but will look into upgrading tapestry soon if need be. Thanks for your help. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Adding-a-progress-listener-to-UploadedFile-tp5718197p5718215.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Adding a progress listener to UploadedFile
In tapestry 5.2+ you have the option of annotations or naming conventions. Prior to 5.2 you can only use naming conventions. See methods starting with contribute here http://tapestry.apache.org/tapestry-ioc-configuration.html -- View this message in context: http://tapestry.1045711.n5.nabble.com/Adding-a-progress-listener-to-UploadedFile-tp5718197p5718219.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Adding a progress listener to UploadedFile
Hi there. I would like to add a progress listener to UploadedFile to track progress up the file being uploaded. I know that it's possible to do this with apache commons file upload. Is there an easy way to do it with the T5 UploadedFile class? Cheers, Dave. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Adding-a-progress-listener-to-UploadedFile-tp5718197.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Adding a progress listener to UploadedFile
you are referring to: http://commons.apache.org/fileupload/using.html#Watching_progress ? On 23/11/2012 8:49 AM, dkeenan wrote: Hi there. I would like to add a progress listener to UploadedFile to track progress up the file being uploaded. I know that it's possible to do this with apache commons file upload. Is there an easy way to do it with the T5 UploadedFile class? Cheers, Dave. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Adding-a-progress-listener-to-UploadedFile-tp5718197.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Adding a progress listener to UploadedFile
Yes. Is there a way to set the listener from within Tapestry? -- View this message in context: http://tapestry.1045711.n5.nabble.com/Adding-a-progress-listener-to-UploadedFile-tp5718197p5718199.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org