DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=28360>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=28360 [PATCH] DateInputModule's getAttribute() does not fetch requested format ------- Additional Comments From [EMAIL PROTECTED] 2004-10-28 12:47 ------- In order to preserve backwards-compatibility, getting the format from the configuration *must* be supported. One might, however, want to extend this module, allowing the use of the attribute-name if the format is not specified otherwise. The code change comes down to 3 characters (null -> name): public Object getAttribute( String name, Configuration modeConf, Map objectModel ) throws ConfigurationException { String format = (String) this.settings.get("format",name); if (modeConf != null) { format = modeConf.getAttribute("format", format); // this is preferred: format = modeConf.getChild("format").getValue(format); } if (format==null) { return new Date(); } else { return new SimpleDateFormat(format).format(new Date()); } } Oh, yes, the documentation needs to be changed as well if this change is accepted.
