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
 Assigned to: Wouter Zoons 
    Priority: Minor


As posted at <a 
href="http://galaxy.andromda.org/forum/viewtopic.php?t=97&highlight=timestamp+crud";>http://galaxy.andromda.org/forum/viewtopic.php?t=97&highlight=timestamp+crud</a>,
 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

Reply via email to