[stringtemplate-interest] Problem with ST 4.0.3
Christophe Roudet
croudet at gmail.com
Thu Jun 23 07:13:02 PDT 2011
Problem fixed!
thanks,
Christophe
On Wed, Jun 22, 2011 at 6:38 PM, Terence Parr <parrt at cs.usfca.edu> wrote:
> Ok, fixed. please try:
>
> http://www.stringtemplate.org/depot/ST4/java/main/dist/ST-4.0.4.jar
>
> Ter
>
> On Jun 22, 2011, at 2:49 PM, Christophe Roudet wrote:
>
>> Hello,
>>
>> I have just upgraded to ST v4.0.3 and I have a template that was
>> working with 4.0.2 that no longer works
>> So have a template file:
>> ae.st:
>> ae(triggerUserList) ::= <<
>> <triggerUserList:{u | <u>}>
>>>>
>>
>> some test code:
>>
>> STGroup group = new STGroupDir("conf/emailTemplates");
>> ST st = group.getInstanceOf("/html/ae");
>> List<User> users = new ArrayList<User>();
>> User u = new User();
>> u.setUsername("u1");
>> u.setEmail("u1 at email.com");
>> users.add(u);
>> u = new User();
>> u.setUsername("u2");
>> u.setEmail("u2 at email.com");
>> users.add(u);
>> st.add("triggerUserList", users);
>> System.out.println(st.render());
>>
>> I have some trace on the console:
>> context [/html/ae] 1:7 no such template: /html/_sub1
>> context [/html/ae] 1:23 passed 1 arg(s) to template null with 0 declared arg(s)
>> context [/html/ae] 1:7 passed 1 arg(s) to template null with 0 declared arg(s)
>> context [/html/ae] 1:7 passed 1 arg(s) to template null with 0 declared arg(s)
>>
>> A similar template build like this works fine:
>> STGroup g = new STGroup('$', '$');
>> g.defineTemplate("test", "triggerUserList", "$triggerUserList:{u |
>> $u.username$ ($u.email$)}; separator=\", \"$");
>> ST st = g.getInstanceOf("test");
>>
>> Any idea,?
>>
>> thanks,
>>
>> Christophe
>> _______________________________________________
>> stringtemplate-interest mailing list
>> stringtemplate-interest at antlr.org
>> http://www.antlr.org/mailman/listinfo/stringtemplate-interest
>
>
More information about the stringtemplate-interest
mailing list