2 Replies Latest reply on Oct 13, 2007 12:10 PM by Selcuk Bozdag

    s:fileupload validation

    Selcuk Bozdag Newbie


      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}"
       requiredMessage="You must specify a file"/>
       <!-- Buttons and other stuff -->

      Thank you