[ http://jira.andromda.org/browse/BPM-247?page=comments#action_11989 ] Chad Brandon commented on BPM-247: ----------------------------------
Another solution: just create a Bpm4StrutsJavaMappings file that extends the Java one and then just map the dateTime type to java.util.Date (since dateTime works with those fine). Then just set this mappings file as the languageMappingsUri in the bpm4struts namespace (we could do that by default for the andromdapp plugin). > Date-Datatype compilation errors > -------------------------------- > > Key: BPM-247 > URL: http://jira.andromda.org/browse/BPM-247 > Project: Bpm4Struts Cartridge > Type: Bug > Components: CRUD > Versions: 3.1-RC1 > Reporter: Andreas Spankus > Assignee: Wouter Zoons > Priority: Minor > Fix For: 3.1M1 > > As posted at http://galaxy.andromda.org/forum/viewtopic.php?t=97, some of the > date-datatypes throw compilation errors. > The problem seems to be the generation of the *AsString-method of the > template 'CrudForm.java.vsl'. > If differing between the datatypes from (around line 96) by replacing: > this.$member.name = > (org.apache.commons.lang.StringUtils.isBlank($member.name)) ? null : > ${member.name}Formatter.parse($member.name); > with: > #if ($member.type.name.equals("Timestamp")) > this.$member.name = > (org.apache.commons.lang.StringUtils.isBlank($member.name)) ? null : new > java.sql.Timestamp(${member.name}Formatter.parse($member.name).getTime()); > #else > this.$member.name = > (org.apache.commons.lang.StringUtils.isBlank($member.name)) ? null : > ${member.name}Formatter.parse($member.name); > #end > ... it works. > but this is not further tested and only a workaround for the > Timestamp-datatype. ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf