File upload Primefaces文件上传自动=";“真的”:保留图像预览

File upload Primefaces文件上传自动=";“真的”:保留图像预览,file-upload,primefaces,param,File Upload,Primefaces,Param,具有具有auto=“true”param的Primefaces组件: ... <p:fileUpload fileUploadListener="#{uploadFileBean.upload}" mode="advanced" auto="true"/> ... 。。。 ... 当auto=“true”显示图像上传后,图像预览消失 当auto=“false”您应该执行三个步骤时,上传的图像(文件)预览是否可能保留在列表中,就像它工作一样: 1.为具有特定id的图像预览添加容

具有具有
auto=“true”
param的
Primefaces
组件:

...
<p:fileUpload fileUploadListener="#{uploadFileBean.upload}" mode="advanced" auto="true"/>  
...
。。。
...
auto=“true”
显示图像上传后,图像预览消失


auto=“false”
您应该执行三个步骤时,上传的图像(文件)预览是否可能保留在列表中,就像它工作一样:

1.为具有特定id的图像预览添加容器,让它成为
info

2.将参数
update=“info”
添加到
p:fileUpload
tag
3.使用
CSS
样式,例如
display:none
,使用
Primefaces
引擎标准显示的容器样式,尤其是此样式:

.files{
    display:none;
}