Tomahawk inputFileUpload in subform: required fiel

2019-08-22 01:51发布

问题:

I have integrated the inputFileUpload of Tomahawk in my webapplication. I have tried to use it with subform from tomahawk but with no luck.

My form looks like this:

<h:form enctype="multipart/form-data">
   <!-- some <h:inputText required="true" /> tags -->

   <t:subform id="testSubForm">
       <t:inputFileUpload value="#{fileBean.uploadedFile}" />

       <t:commandButton action="#{fileBean.submit()}" value="Submit subForm"/>
   </t:subform>
</h:form

The problem is that the submit of the subform tries to validate the inputText-tags which are required but not filled.

What am I doing wrong here?

回答1:

Splitting my form in two forms works fine now.