【发布时间】:2012-07-25 01:34:01
【问题描述】:
我在 JSF Icefaces 表单上使用 selectInputDate 组件,如下所示。
<ice:selectInputDate id="toDateId"
renderMonthAsDropdown="true" renderYearAsDropdown="true"
value="#{myBackingBean.toRequestDate}"
onkeydown="checkDateMaxLen('myform:toDateId', 'Request To Date');searchOnEnterKeyPress(event)"
renderAsPopup="true">
<f:convertDateTime timeZone="#{dateSelectBB.timeZone}"
dateStyle="short" />
<h:outputText value="(mm/dd/yy)" />
</ice:selectInputDate>
当我输入无效日期时,例如“sdsdsds”并切换到另一个字段我收到错误,因为 'myform:toDateId: 'sdsdsds' 是无效日期。 '
如何从消息中删除表单和字段 ID 名称并显示如下错误?
'sdsdsds' 是无效日期。
实现细节:JSF 2.0、Icefaces 2.0.4
【问题讨论】: