子窗体中的“战斧" inputFileUpload:必填字段已通过验证 [英] Tomahawk inputFileUpload in subform: required fields are validated

查看:141
本文介绍了子窗体中的“战斧" inputFileUpload:必填字段已通过验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在我的Web应用程序中集成了Tomahawk的inputFileUpload.我试图将它与战斧的子窗体一起使用,但是没有运气.

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

我的表单如下:

<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

问题是子表单的提交尝试验证必需但未填写的inputText标签.

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

我在做什么错了?

推荐答案

将表单拆分为两种形式现在可以正常使用了.

Splitting my form in two forms works fine now.

这篇关于子窗体中的“战斧" inputFileUpload:必填字段已通过验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆