Code:
Code: Select all
<p:fileUpload
rendered="#{empty hazardousWasteManifestMB.entity.closedAt}"
listener="#{hazardousWasteManifestMB.handleFileUpload}"
uploadLabel="#{msg.label_adicionar}"
cancelLabel="#{msg.label_cancelar}"
label="#{msg.label_selecionarArquivos}"
invalidFileMessage="#{msg.upload_invalid_file}"
fileLimitMessage="#{msg.upload_file_limited}"
invalidSizeMessage="#{msg.upload_file_size_limited}"
oncomplete="PF('statusDialog').hide()"
width="100%"
sizeLimit="524288000"
update="file-messages data-table-files"
mode="advanced"
dragDropSupport="false"
multiple="true"
allowTypes="/(\.|\/)(gif|jpeg|png|pdf|zip)$/"/>
I've tried several showcases that I found and not worked too. I also copy the one that we can find in the Freya layout and not worked as well.
I have no idea what the problem is.
### updated 2022-01-12###
I've tried with PrimeFaces version 11 and 10 and not worked too.
I realised that this component is not uploading the file because trying the Basic showcase call the method but file is still null
Moreover, loop with Ajax occurs when using Ajax method, thus blocking UI.
### updated 2022-01-13###
- Same issue in PrimeFaces 8,10 and 11. it also occurs in other versions of Freya Layout;
- I think this problem was happening since I migrate to Freya but I only found now because I needed to test this functionally in my project.
I think I found the problem. It's not working anymore for who is using Kotlin and I have no idea why.
### updated 2022-01-14###
I just found that p:fileUpload just work in some pages that I don't know wt* is that. I means, In some pages of my project this component work fine and others the ajax execute forever. It doesn't make sense hahaha