Why ace:fileEntry does not work?

2019-08-26 01:20发布

I'm using jsf 2.0 and icefaces 3 component to upload files:

<h:form enctype="multipart/form-data">   
<ace:fileEntry
        id="file-entry"
        relativePath="/files/"
        maxFileCount="10"
        maxFileCountMessage="Limited to 10 files uploaded concurrantly."
        fileEntryListener="#{uploadFileBean.sampleListener}"
        maxFileSize="6291456"
        maxFileSizeMessage="Submitted file is too large."
        maxTotalSize="18874368"
        maxTotalSizeMessage="Total size of submitted files is too large."
        required="true"
        requiredMessage="The file is required to submit this form."
        useOriginalFilename="true"
        useSessionSubdir="true" />

      <h:commandButton
        id="submit"
        type="submit"
        value="Send File" />
      </h:form>

but after I select a file to upload and press Send File button, I receive:

The file is required to submit this form.

which is very strange because I already selected a file.

Does anyone has any suggestion?

0条回答
登录 后发表回答