Please note that Sahi's development and support teams do not actively monitor this. This is more a community forum. If you are a Sahi Pro user looking for commercial support, please email support @ sahipro.com with your query.

Upload file in a primefaces page

GOAL: test uploading files to a fronend page developed with primefaces.

Script sahi (with a standard html form, it works! but in primefaces doesn't work)

_setFile(_file("idform"), "C:\\path\\file.pdf");
_call(_file("idform").type = "text");
_setValue(_textbox("idform"), "C:\\path\\file.pdf");


example form to upload file with primafaces:

<h:form>
<p:fileUpload fileUploadListener="#{fileUploadView.handleFileUpload}" mode="advanced" dragDropSupport="false"
multiple="true" update="messages" sizeLimit="100000" fileLimit="3" allowTypes="/(\.|\/)(pdf)$/" />

<p:growl id="messages" showDetail="true" />
</h:form>

running the script, I see in the page for a short time the file that is loaded (it seems to be loaded) but actually nothing is loaded, because on the backend side (in the spring controller) no file arrives.
Any suggestions?

thanks
Luigi
Sign In or Register to comment.