JSF : Issues with File Upload using Icefaces component

心不动则不痛 提交于 2019-12-02 07:02:28

I don't see any <h:form> surrounding your component, is there any in your code? I don't have any experience with icefaces but I'm using to richFaces. With a

<rich:fileUpload immediate="true" id="fileUploadId" 
                        ajaxSingle="true" listHeight="70px" listWidth="500px"
                        uploadButtonClass="otherButton" styleClass="backgroundColorInput"
                        addButtonClass="otherButton"
                        fileUploadListener="#{paramActions.fileUploadListener}">
                        <a:support event="onuploadcomplete" reRender="paramsForm" />
                    </rich:fileUpload>

it needs to be enclosed in a

<h:form id="paramsForm" enctype="multipart/form-data">

multipart/form-data enctype is needed for fileUpload

Most of the time unclosed tags causes that exception. Check you xhtml, you might locate any tag which open.

e.g : Any open div or span..

remove the enctype="multipart/form-data" from the h:form it should work fine without it.

I had exactly this problem on a JBoss 7.1 server. I had an EAR project, some EJB projects and a couple of WAR projects. When I had the problem I deployed the icefaces jars in the EAR library, but when I moved them to the WAR project that used ace:fileentry it started to work.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!