[jboss-user] [JBoss Seam] - s:fileupload validation

sbozdag do-not-reply at jboss.com
Fri Oct 12 09:23:39 EDT 2007


Hi,

I am trying to make sure that user specified a file to upload. @NotNull did not worked. I have then read something on SeamProblemsFAQ (http://wiki.jboss.org/wiki/Wiki.jsp?page=SeamProblemsFAQ) about a @NotNull issue. 

I am now using required attribute for s:fileupload . But it did not worked for me..


  |   <h:form id="fileUploader" enctype="multipart/form-data">
  |             <h:panelGrid columns="2">
  |                 <h:outputLabel for="file">File:</h:outputLabel>
  |                     <s:fileUpload id="file" data="#{fileUploader.resultsFile}"
  |                                   contentType="#{fileUploader.contentType}"
  |                                   required="true"
  |                                   requiredMessage="You must specify a file"/>                         
  |             </h:panelGrid>            
  |    
  |         <!-- Buttons and other stuff -->
  |          ...
  |     </h:form>
  | 

Thank you

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4094570#4094570

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4094570



More information about the jboss-user mailing list