Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jsp/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Validation 显示验证消息后,禁用输入字段的重新排序_Validation_Jsp_Jsf_Render - Fatal编程技术网

Validation 显示验证消息后,禁用输入字段的重新排序

Validation 显示验证消息后,禁用输入字段的重新排序,validation,jsp,jsf,render,Validation,Jsp,Jsf,Render,在显示验证失败的消息后,是否可以禁用输入字段的重新排序 这是我的观点: <h:outputLabel for="captcha" value="#{ui.pleaseEnterTextInTheImage}" rendered="#{sessionBean.showCaptcha}"/> <h:panelGroup rendered="#{sessionBean.showCaptcha}"> <h:inputText id="captcha" style

在显示验证失败的消息后,是否可以禁用输入字段的重新排序

这是我的观点:

<h:outputLabel for="captcha" value="#{ui.pleaseEnterTextInTheImage}"  rendered="#{sessionBean.showCaptcha}"/>
<h:panelGroup rendered="#{sessionBean.showCaptcha}">
     <h:inputText id="captcha" styleClass="captcha" validator="#{validationBean.captchaValidator}" />
     <h:outputText value=" "/><h:message for="captcha" styleClass="captchaMsg"/>
</h:panelGroup>

是,将要验证的输入组件绑定到视图,并在呈现条件下选中
UIInput#isValid()

<h:inputText binding="#{captcha}" required="true" />
...
<h:inputText rendered="#{captcha.valid}" />

...
当第一个表单出现验证错误时,第二个表单将在表单提交时消失