0 Replies Latest reply on Apr 26, 2011 4:14 PM by derkosak

    File upload with richfaces from Applet

    derkosak

      I'm trying to use the same method used by a FileUpload component in my JSF page to upload files to a backing bean. My application uses an applet as user interface, which uses javascript to populate hidden fields in a JSF page and uses A4J to communicate with the server. Everything works fine, except for when I need to upload files. Since I need to access the files from the applet, I can't use the fileUpload component to upload them (browser security prevents me from meddling with the file inputs via javascript).

      My approach to this has been creating POST requests and sending them to the server, using the page as action. When debugging the application, I can see the fields in the request, but I can't trigger the UploadListener responsible for receiving the files.

      I'm running these tests using Apache HTTPClient and Richfaces 3.3.2.

      How can I achieve this?

       

      Note: I've found this guide, which seems to outline the steps for what I want, but it uses ADF Faces. I'm going to try it out now -> http://www.oracle.com/technetwork/developer-tools/adf/learnmore/71-adf-to-applet-communication-307672.pdf