Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <h:form enctype="multipart/form-data" id="importForm">
- <table cellpadding="0" cellspacing="0" border="0">
- <tr>
- <td>
- <t:inputFileUpload id="upFile"
- title="#{messages['global.label.import.browse']}"
- value="#{attachmentAction.upFile}" storage="file"
- maxlength="1000000">
- </t:inputFileUpload>
- </td>
- </tr>
- <tr>
- <td>
- <h:commandButton action="#{attachmentAction.upload}" value="#{messages['button.upload']}"
- styleClass="btnCla" onclick="return checkSelectFile();" type="submit">
- </h:commandButton>
- </td>
- </tr>
- </table>
- </h:form>
- public void upload(){
- try {
- jxl.Workbook wb = Workbook.getWorkbook(upFile.getInputStream());// Here , I always got Null for the value of upFile! Why?
- wb.getSheet(0);
- } catch (Exception e) {
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement