[jboss-user] [JBoss Seam] - s:fileUpload & required

pdepaepe do-not-reply at jboss.com
Tue Jul 31 11:39:18 EDT 2007


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>

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

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



More information about the jboss-user mailing list