- Joined
- Jan 7, 2010
- Messages
- 1
- Reaction score
- 0
Hi!
I'm facing a validation problem with JSF.
I've a selectInputDate. I've attached a custom date validator with it.
<ice:selectInputDate id="inputFromDate" renderMonthAsDropdown="true"
renderYearAsDropdown="false"
title="date"
renderAsPopup="true"
partialSubmit="true"
value="#{CommissionPayTrustee.fromDate}">
<f:convertDateTime pattern="dd/MM/yyyy" />
<f:validator validatorId="dateValidator" />
</ice:selectInputDate>
<ice:message id="datemsg" errorClass="iceErrorMessage" for="inputFromDate"/>
I've verified that my validator works.
The message I set to display is "Invalid Date".
The issue is that when an invalid date is entered, another message is displayed instead of my custom message. e.g. when I enter a date like
"41/01/2000", the message displayed is:
formCommissionPayTrust:inputFromDate: '41/01/2000' could not be understood as a date. Example: 07/01/2010
and my own custom message is not displayed. Is there any way to display my own message or any way to change this message? I mean this message is fine to me if "formCommissionPayTrust:inputFromDate:" is removed from the message.
Please help.
Thanks.
Asad.
I'm facing a validation problem with JSF.
I've a selectInputDate. I've attached a custom date validator with it.
<ice:selectInputDate id="inputFromDate" renderMonthAsDropdown="true"
renderYearAsDropdown="false"
title="date"
renderAsPopup="true"
partialSubmit="true"
value="#{CommissionPayTrustee.fromDate}">
<f:convertDateTime pattern="dd/MM/yyyy" />
<f:validator validatorId="dateValidator" />
</ice:selectInputDate>
<ice:message id="datemsg" errorClass="iceErrorMessage" for="inputFromDate"/>
I've verified that my validator works.
The message I set to display is "Invalid Date".
The issue is that when an invalid date is entered, another message is displayed instead of my custom message. e.g. when I enter a date like
"41/01/2000", the message displayed is:
formCommissionPayTrust:inputFromDate: '41/01/2000' could not be understood as a date. Example: 07/01/2010
and my own custom message is not displayed. Is there any way to display my own message or any way to change this message? I mean this message is fine to me if "formCommissionPayTrust:inputFromDate:" is removed from the message.
Please help.
Thanks.
Asad.
Last edited: