<a4j:outputPanel id="tapalSectionSendToPanel" ajaxsingle="true">
<h:inputText id="sendToId1" value="#{MainBean.SectionBean.sendTo}"
class="createresizedTextbox"
required="true" requiredMessage="#{msg.labl_required}"
disabled="true" />
<h:message for="sendToId1" style="color:red" />
</a4j:outputPanel>
驗證失敗我需要驗證文本框空驗證和應顯示當我點擊按鈕而不在文本框中輸入任何值所需。它工作正常,沒有disabled="true"
。什麼是我的要求的替代方案。爲什麼需要=不「真」而不是當禁用=「true」是指定
您有衝突的要求:'禁用=「真正的」'不會允許用戶輸入任意值,它會爲任何事情比其他的顯示被忽略。那麼,爲什麼你想在這裏附上驗證器? – mabi
另外,在JSF中有幾個無效屬性:'autosubmit','showRequired','requiredMessage'在這裏不會做任何事情,'class'可能應該是'styleClass'。 – mabi
我已經刪除了驗證器和最新的問題與我的jsf –