-1
我需要驗證inputText框的輸入。目前我有一個按鈕被點擊以驗證輸入。但是,我希望在客戶端鼠標離開inputText框時立即驗證輸入,以便不需要驗證按鈕。Primefaces inputText驗證發生在鼠標上
<h:form>
<p:panel id="panel">
<p:messages id="msgs"/>
<p:outputLabel for="watchNoticeId" value="#{msg.rfeWatchNoticeId}" />
\t \t \t \t \t \t \t \t \t \t
<h:panelGrid columns="2" cellpadding="5">
<p:inputText id="watchNoticeId" value="#{watchNotice.id}" size="20" style="vertical-align: top;" disabled="#{! raudUserSessionBean.raudUser.referMode}">
<p:ajax event="change" process="@this" />
<f:validateLength maximum="18" update="panel" />
</p:inputText>
<p:message for="watchNoticeId" display="icon" />
</h:panelGrid>
\t \t \t \t \t \t \t \t \t \t
<p:commandButton value="Validate" update="panel" icon="ui-icon-check" />
</p:panel>
</h:form>