From: Lane S. <la...@op...> - 2005-11-26 01:08:27
|
#bean $Time = "java.util.Date" #bean $Duration = "com.opendoors.entity.fundamental.Duration" onNew { #set $Duration.Start = $Variable.get("Time") #set $Duration.End = $Variable.get("Time") #set $Duration.End = $Time } works fine. so there is a bug in the #setprops unless this is a "feature", converting all RHS evaluations to string. -Lane Lane Sharman wrote: > is the RHS term always evaluated as a String before the assignment? > What can I do to make an assigment of an object? > > #bean $Time = "java.util.Date" > #setprops $Duration class="com.opendoors.entity.fundamental.Duration" > { > Start = $Variable.get("Time") > End = $Variable.get("Time") > } > > > generates this error: > > 4:40:52 PM template ERROR Error parsing template: > StringTemplate("unknown";"#set $Duration.Start=Fri Nov 25 16:40:53 PST > 2005") > org.webmacro.engine.ParseException: Parser Exception > org.webmacro.parser.ParseException: Encountered "Fri" at line 1, > column 22. > > -- Lane Sharman Providing Private and SPAM-Free Email http://www.opendoors.com 858-755-2868 |