rich:fileUpload + a4j:support help
lidijag Aug 24, 2012 11:01 AMHi All
I need help
Using rich 2.0.
Here is my code:
<h:outputText id="image1Gifw" value="#{wapPageProductBean.image1Gif.imageName}" style="color:#3F85E7; font-size: 16px;"></h:outputText>
<br></br><br></br>
<rich:fileUpload fileUploadListener="#{wapPageProductBean.uploadImage1Gif}"
id="imageUploader1128"
maxFilesQuantity="10"
immediateUpload="true"
acceptedTypes="gif"
ontyperejected="alert('Only GIF files can be uploaded');"
onerror="alert('There was an error during upload')"
autoclear="true" listHeight="50px" listWidth="250"
rendered="#{wapPageProductBean.currentContentType.id != 12
and wapPageProductBean.currentContentType.id != 9
and wapPageProductBean.currentContentType.id != 10}">
<a4j:support id="OneGifWap" event="onuploadcomplete" reRender="image1Gifw" ajaxSingle="true" ignoreDupResponses="true"
status="LATA4JStatus"/>
</rich:fileUpload>
<h:outputText id="image1Pngw" value="#{wapPageProductBean.image1Png.imageName}" style="color:#3F85E7; font-size: 16px;"></h:outputText>
<br></br><br></br>
<rich:fileUpload fileUploadListener="#{wapPageProductBean.uploadImage1Png}"
id="imageUploader11281"
maxFilesQuantity="10"
immediateUpload="true"
acceptedTypes="png"
ontyperejected="alert('Only PNG files can be uploaded');"
onerror="alert('There was an error during upload')"
autoclear="true" listHeight="50px" listWidth="250"
rendered="#{wapPageProductBean.currentContentType.id != 12
and wapPageProductBean.currentContentType.id != 9
and wapPageProductBean.currentContentType.id != 10}">
<a4j:support id="OnePngWap" event="onuploadcomplete" reRender="image1Pngw" ajaxSingle="true" ignoreDupResponses="true"
status="LATA4JStatus"/>
</rich:fileUpload>
...
Basicly for every screen size that i have in my list I need to upload diffrent images (image1, image2 ...) and the name need to be shown after the upload is done.
Sometimes its working ok, but sometimes it stopes. I cannot even save the ones that are successfully uploaded.
There is no error or something else, but like the request is gone. Tried to see if some error is happening with firebug, it looks ok...
Any help is appreciated.