You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Rincy Rappai (JIRA)" <de...@myfaces.apache.org> on 2009/11/18 10:08:39 UTC
[jira] Created: (TRINIDAD-1641) Invalid date error message on using
h:message tag and tr:convertDateTime tag
Invalid date error message on using h:message tag and tr:convertDateTime tag
----------------------------------------------------------------------------
Key: TRINIDAD-1641
URL: https://issues.apache.org/jira/browse/TRINIDAD-1641
Project: MyFaces Trinidad
Issue Type: Bug
Components: Components
Affects Versions: 1.0.10-core, 1.0.4-core
Environment: Weblogic server, jsf-facelets-1.11.11.jar, trinidad-api-1.0.4-SNAPSHOT.jar, trinidad-impl-1.0.4-SNAPSHOT.jar, myfaces-api-1.1.5.jar, myfaces-impl-1.1.5.jar
Reporter: Rincy Rappai
When using the <tr:convertDateTime> tag on a jspx, time error occurs at the component level using 'messageDetailConvertDate' which is as expected. However, the message that appears in the <h:messages> still indicates that it is a date error as well as the new time message that we have added.
The error message that appears at form level is as below:
"The date is not in the correct format. Enter a time in the same format as this example: 15:45"
Find the attached files that helps to replicate the reported issue along with the screenshot. Note to set <client-validation-disabled> tag as 'true' in trinidad-config.xml file.
Analysis:
1. If we set globalOnly="true", we do not see this reported error message. However, this does not meet business requirement
2. The message set in the messageDetailConvertDate is set for the attribute showDetail. If we do not set showDetail attribute, we do not see the message 'Enter a time in the same format as this example: 15:45'. The observed message is only as 'The date is not in the correct format.'
3. Setting of showSummary attribute does not make any effect to the message 5. The message text as 'The date is not in the correct format' does not show any effect if the type is changed i.e. type="date" or type="both". Also, changing the attribute messageDetailConvertTime or messageDetailConvertBoth does not show any effect in the message.
4. The class MessageBundle of package 'org.apache.myfaces.trinidad.resource' has below constants declared which are used in the DateTimeConverter class of package 'org.apache.myfaces.trinidad.convert':
{"org.apache.myfaces.trinidad.convert.DateTimeConverter.CONVERT_DATE", "The date is not in the correct format."},
{"org.apache.myfaces.trinidad.convert.DateTimeConverter.CONVERT_TIME_detail", "Enter a time in the same format as this example: {2}"},
5. Suspect the issue is in below code of DateTimeConverter class's getViolationMessageKey method
if (key == null)
{
// if pattern is specified explicitly, then use this key
key = CONVERT_DATE_MESSAGE_ID;
}
6. Refer url (http://n3.nabble.com/error-message-using-h-message-tag-for-input-text-having-tr-convertDateTime-f19227.html ) where issue and query for the reported issue has been raised.
7. code analysis done on source of trinidad-1.0.11
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.