What do you mean i should use the Upload component?

I only based the code based on 
http://tapestry.apache.org/uploading-files.html
http://tapestry.apache.org/uploading-files.html 

Then i modified it based on Multiple FORM design.




<t:form t:id="guestForm">
        <t:errors/>
        <input t:type="upload" t:id="file" validate="required"/>
        <br/>
        <input type="submit" value="Upload"/>
</t:form>

public class UploadExample
    {
        @Property
        private UploadedFile file;

        @Component(id = "guestForm")
        private Form guestForm;

        public void onSuccessFromguestForm()
        {
            File copied = new File("/my/file/location/" +
file.getFileName());
            
            file.write(copied);
        }
    }




--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T5-2-5-Error-uploading-file-using-FORM-with-ID-will-generate-NPE-tp4474992p4475147.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

Reply via email to