primefaces: Advanced FileUpload: rendering of multiple file errors broken with built-in messages

Describe the bug

I am migrating from PF13 to PF14. I modified p:fileUpload components to use a p:validateFile. When p:fileUpload allows to update multiple files, and several selected files have errors, the name of the last file with errors is appended to all error messages, including those caused by other files. The p:message of the p:upload looks like these:

Se ha alcanzado el límite de archivos que se pueden cargar NSC.png 495.5 KB
Tipo de archivo no permitido NSC.png 495.5 KB
El tamaño del archivo supera el máximo permitido NSC.png 495.5 KB
Tipo de archivo no permitido NSC.png 495.5 KB
El tamaño del archivo supera el máximo permitido NSC.png 495.5 KB
El tamaño del archivo supera el máximo permitido NSC.png 495.5 KB

NSC.png is the last file that raises an error; note that its name and size is appended to every message.

Reproducer

No response

Expected behavior

Every error message should have the name and size of the file that caused the error.

PrimeFaces edition

Community

PrimeFaces version

14.0.5

Theme

Nova Light

JSF implementation

Jakarta Faces 3.0 (WildFly 32.0.0)

JSF version

Jakarta Faces 3.0 (WildFly 32.0.0)

Java version

17

Browser(s)

Chrome

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 32 (15 by maintainers)

Commits related to this issue

Most upvoted comments

it works, I can see my summary and detail messages! But I had to take the p:messages out of the h:panelGroup that was enclosing it and that was being updated by the p:fileUpload to make the update work

Ok, testing now… I’ll be back!