FileUpload component it's not calling listener

Forum rules
Please note that response time for technical support is within 3-5 business days.
Post Reply
pablorodrigo
Posts: 3
Joined: 30 Nov 2021, 18:21

12 Jan 2022, 03:15

FileUpload component it's not calling listener method.

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)$/"/>
The code above used to work before I updated my project to Freya layout. It does not call my listener anymore. Someone know why?

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. :cry:

### 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.
### updated 2022-01-13###

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 :lol:

pablorodrigo
Posts: 3
Joined: 30 Nov 2021, 18:21

14 Jan 2022, 20:08

After some days I finally found the solution: I just removed PrettyFaces of my project and updated it to FaceView for now.

It was broken some parts of my project because this dependence does some HTTPrequest to rewrite URLs and it might affected some components. Although I've followed all steps to config PrettyFaces, it does not work property.

To sum up, I will removed it but if someone has a solution for this, inform me :D

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

21 Jan 2022, 09:25

Glad to hear, thanks a lot for the update!

Best Regards,

Post Reply

Return to “Freya - PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest