|
From: Keats <ke...@xa...> - 2004-05-27 15:08:18
|
That's what I was afraid of; the Map syntax isn't available with 1.1. So if
you want to use the "using", clause you'll have to construct the map in
advance.
You can drop on in the context or create one using the #bean directive,
e.g.,
#bean $map = "java.util.HashMap"
#set $map.Foo="bar"
#eval $myTemplet using $map
Good luck again.
Keats
----- Original Message -----
From: "Graeme J Sweeney" <web...@gj...>
To: <web...@li...>
Sent: Thursday, May 27, 2004 10:33 AM
Subject: Re: [WebMacro-user] Re: #templet no such Macro or Directive error
> On Thu, 27 May 2004, Keats wrote:
>
> > Graeme,
> >
> > Mixing and matching classes within the core WM packages probably isn't a
> > good idea. Can you give more details on the original parse exception?
It
> > may be that that version of WM didn't support the Map syntax. Try an
> > example without the parameters and see if that works.
>
> <snip/>
>
> #eval works without the parameters.
>
> This is an example exception for webamcro-1.1 with #templet/#eval
> directives added using '#eval using {}' syntax.
>
> org.webmacro.engine.ParseException: Parser Exception
> org.webmacro.parser.ParseException: Encountered "{" at line 328, column
> 28.
> Was expecting one of:
> "$" ...
> "\"" ...
> "\'" ...
> "null" ...
> "true" ...
> "false" ...
> "undefined" ...
> <WS> ...
> "(" ...
> "[" ...
> "-" ...
> <OP_NOT> ...
> <NUMBER> ...
>
> at org.webmacro.parser.WMParser.parseBlock(WMParser.java:82)
> at org.webmacro.engine.WMTemplate.parse(WMTemplate.java:162)
> at
>
org.webmacro.resource.BrokerTemplateProviderHelper.load(BrokerTemplateProvid
erHelper.java:102)
> at
> org.webmacro.resource.TemplateProvider.load(TemplateProvider.java:175)
> at
> org.webmacro.resource.CachingProvider.load(CachingProvider.java:111)
> at
> org.webmacro.resource.SMapCacheManager.get(SMapCacheManager.java:244)
> at org.webmacro.resource.CachingProvider.get(CachingProvider.java:101)
> at org.webmacro.Broker.get(Broker.java:658)
> at org.webmacro.Broker.getValue(Broker.java:699)
>
> <snip/>
>
> Caused by: org.webmacro.parser.ParseException: Encountered "{" at line
> 328, column 28.
> Was expecting one of:
> "$" ...
> "\"" ...
> "\'" ...
> "null" ...
> "true" ...
> "false" ...
> "undefined" ...
> <WS> ...
> "(" ...
> "[" ...
> "-" ...
> <OP_NOT> ...
> <NUMBER> ...
>
> at
>
org.webmacro.parser.WMParser_impl.generateParseException(WMParser_impl.java:
3043)
> at
>
org.webmacro.parser.WMParser_impl.jj_consume_token(WMParser_impl.java:2927)
> at
org.webmacro.parser.WMParser_impl.Term(WMParser_impl.java:1217)
> at
> org.webmacro.parser.WMParser_impl.Factor(WMParser_impl.java:1227)
> at
> org.webmacro.parser.WMParser_impl.AExpression(WMParser_impl.java:1278)
> at
> org.webmacro.parser.WMParser_impl.CExpression(WMParser_impl.java:1366)
> at
> org.webmacro.parser.WMParser_impl.AndExpression(WMParser_impl.java:1407)
> at
> org.webmacro.parser.WMParser_impl.OrExpression(WMParser_impl.java:1441)
> at
> org.webmacro.parser.WMParser_impl.Expression(WMParser_impl.java:1475)
> at org.webmacro.parser.WMParser_impl.RValue(WMParser_impl.java:566)
> at
> org.webmacro.parser.WMParser_impl.parse_arg(WMParser_impl.java:235)
> at
> org.webmacro.parser.WMParser_impl.parse_arg_group(WMParser_impl.java:282)
> at
> org.webmacro.parser.WMParser_impl.parse_args(WMParser_impl.java:328)
> at
> org.webmacro.parser.WMParser_impl.parse_directive(WMParser_impl.java:362)
> at
> org.webmacro.parser.WMParser_impl.Directive(WMParser_impl.java:1505)
> at
> org.webmacro.parser.WMParser_impl.WMContent(WMParser_impl.java:1574)
> at
> org.webmacro.parser.WMParser_impl.Block(WMParser_impl.java:1831)
> at
> org.webmacro.parser.WMParser_impl.parse_arg(WMParser_impl.java:215)
> at
> org.webmacro.parser.WMParser_impl.parse_args(WMParser_impl.java:332)
> at
> org.webmacro.parser.WMParser_impl.parse_directive(WMParser_impl.java:362)
> at
> org.webmacro.parser.WMParser_impl.Directive(WMParser_impl.java:1505)
> at
> org.webmacro.parser.WMParser_impl.WMContent(WMParser_impl.java:1574)
> at
> org.webmacro.parser.WMParser_impl.WMDocument(WMParser_impl.java:1955)
> at org.webmacro.parser.WMParser.parseBlock(WMParser.java:75)
>
> TIA,
>
> Graeme -
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: Oracle 10g
> Get certified on the hottest thing ever to hit the market... Oracle 10g.
> Take an Oracle 10g class now, and we'll give you the exam FREE.
> http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
> _______________________________________________
> Webmacro-user mailing list
> Web...@li...
> https://lists.sourceforge.net/lists/listinfo/webmacro-user
>
|