0 Replies Latest reply on Jul 21, 2008 2:54 PM by vivian hu

    a4j:commandButton cause ServletFileUpload.isMultipartContent

    vivian hu Novice

      I have a form that has a file uploader, and a a4j:button for "OK". But after I upload a file and click on OK, the ServletFileUpload.isMultipartContent(httpRequest) returns false. If I change the a4j:command to a <input type="submit" ...>, now the ServletFileUpload.isMultipartContent(httpRequest) return true.

      Is there any way to let a4j:commandButton do the right thing? We are using 3.1.4.GA. and we didn't see this problem in RichFaces 3.0.1. Looks like some thing has been changed from 3.0.1 to 3.1.4 for a4j:commandButton.


      <a4j:form id="editServerForm">
       <table width="100%">
       ....
       <tr>
       <td colspan="2">
       <input id="configFileUpload" type="file" name="upfile" />
       </td>
       </tr>
       </table>
      .
       <table>
       <tr>
       <td width="40%" />
       <td>
       <a4j:commandButton actionListener="#{configBean.validateServerSetting}" reRender="includeEditServer:editServerForm:errorPanel" oncomplete="submitIfNoErrors();" id="okButton" value="#{bundle.OK}" />
       </td>
       <td>
       ........
       </table>
      
       <h:inputHidden id="selectedSvrId" value="#{configBean.selectedADMServerId}"/>
       </a4j:form>