0

Have Primefaces file-upload component with auto="true" param:

...
<p:fileUpload fileUploadListener="#{uploadFileBean.upload}" mode="advanced" auto="true"/>  
...

When auto="true",that after image been uploaded,preview of image disappeared.

Is it possible,that uploaded images(files) preview remained in the list,like it works,when auto="false".

Captain Obvlious
  • 19,754
  • 5
  • 44
  • 74
sergionni
  • 13,290
  • 42
  • 132
  • 189

1 Answers1

0

Three steps you should perform:

1. add container for images preview with particular id,let it be info
2. add parameter update="info" into p:fileUpload tag
3. ovverride styles of container that is standardly displayed by Primefaces engine with CSS styles like display:none,in particular, this one:

.files{
    display:none;
}
sergionni
  • 13,290
  • 42
  • 132
  • 189