显示验证消息后,禁用输入字段的呈现。

| 显示验证失败的消息后,是否可以禁用输入字段的重新呈现? 这是我的观点:
<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>
    
已邀请:
        是的,将待验证的输入组件绑定到视图,并在呈现的条件中检查“ 1”。
<h:inputText binding=\"#{captcha}\" required=\"true\" />
...
<h:inputText rendered=\"#{captcha.valid}\" />
当第一个验证错误时,第二个将在提交表单时消失。     

要回复问题请先登录注册