JSF : Issues with File Upload using Icefaces component

前端 未结 4 1960
醉酒成梦
醉酒成梦 2021-01-22 14:01

I am trying to get FileUpload feature working with Icefaces ace:fileEntry but my fileUploadListener on server is not called, here is the code:

相关标签:
4条回答
  • 2021-01-22 14:06

    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.

    0 讨论(0)
  • 2021-01-22 14:19

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

    0 讨论(0)
  • 2021-01-22 14:25

    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

    0 讨论(0)
  • 2021-01-22 14:29

    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..

    0 讨论(0)
提交回复
热议问题