o:inputfile backing bean value null after ajax #255
-
I have a page with a enctype="multipart/form-data" form with 3 o:inputfile (OmniFaces) controls (single,multiple,directory) and a data table below them. There are two buttons: stage files and upload files (initially disabled). The goal is that whether you pick one, several, or a whole directory, you click the Stage Files button so that the metadata records in the DB are created with a status of "new" and then display in the data table.. Then, the Upload Files button would be enabled and the actual upload would be started. As each file is processed, its record is updated to uploaded. The manuals are a bit vague as to how the upload is to be handled. They show where for each Part encountered one opens an inputStream and I assume move or write the temp file to another location. The problem is the two ajax submit buttons seem to transmit the file metadata without doing the upload. Then after the DOM update, the controls are empty even though the data table is now shown with the records. If I turn off ajax on the upload button, the browser does the push (or starts the pull on the server?) but there's no user feed back and of course no DOM update to the table. So how exactly, can I transmit to the backing bean the file metadata first and then on the other button click, start each file upload in the order I want (smallest to biggest)? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
This sounds like it is more particular to OmniFaces than PrimeFaces. In either case, are you able to create a reproducer using the primefaces-test project and link it here? |
Beta Was this translation helpful? Give feedback.
This sounds like it is more particular to OmniFaces than PrimeFaces. In either case, are you able to create a reproducer using the primefaces-test project and link it here?