1 Reply Latest reply on Jul 31, 2007 5:36 PM by pmuir

    s:fileUpload & required

    pdepaepe

      I can submit empty document (no specified path) with the following code:
      (data, filename, contentType have @NotNull attributes).

      <h:form enctype="multipart/form-data">
       <s:decorate id="documentDecorate" template="layout/decorateField.xhtml">
       <s:fileUpload
       id="document"
       data="#{documentHome.instance.data}"
       contentType="#{documentHome.instance.contentType}"
       fileName="#{documentHome.instance.fileName}"
       required="true">
       <a:support event="onblur" reRender="documentDecorate"/>
       </s:fileUpload>
       </s:decorate>
       <h:commandButton action="#{documentHome.persist}" value="#{messages.Add}" style="margin-left:5px"/>
       </h:form>