Specifying a list literal as hash item value
Albert Kam <[email protected]> Tue, 10 Nov 2015 17:07:26 +0700
| Newsgroups | gmane.comp.web.freemarker.user |
|---|---|
| Message-ID | <CAMT20g-G18LFafQuxpS6XY9qAeV7_Xm8DiGkBcongNeCmqH2PQ@mail.gmail.com> |
--===============3585633731229156825==
Content-Type: multipart/alternative; boundary=001a1145a5ee77f60d05242ce0c7
--001a1145a5ee77f60d05242ce0c7
Content-Type: text/plain; charset=UTF-8
I tried to specify a list literal as hash item value like this,
<#assign test={
hello=[ 'hello world' ]
}>
And i got this exception:
java.lang.RuntimeException: freemarker.core.ParseException: Syntax error in
template "my.cfg" in line 2713, column 15:
Found list literal: ["hello world"]. Expecting scalar
at app.cfg.Manager.interpolatedCfg(Manager.java:111)
Is this not supported ?
--
Do not pursue the past. Do not lose yourself in the future.
The past no longer is. The future has not yet come.
Looking deeply at life as it is in the very here and now,
the practitioner dwells in stability and freedom.
(Thich Nhat Hanh)
--001a1145a5ee77f60d05242ce0c7
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">I tried to specify a list literal as hash item value like =
this,<div><div><br></div><div><#assign test=3D{</div><div><span class=3D=
"" style=3D"white-space:pre"> </span>hello=3D[ 'hello world' ]</div=
><div>}></div><div><br></div><div>And i got this exception:</div><div><d=
iv>java.lang.RuntimeException: freemarker.core.ParseException: Syntax error=
in template "my.cfg" in line 2713, column 15:</div><div>Found li=
st literal: ["hello world"]. Expecting scalar</div><div><span cla=
ss=3D"" style=3D"white-space:pre"> </span>at app.cfg.Manager.interpolatedCf=
g(Manager.java:111)</div><div><br></div></div><div><span style=3D"white-spa=
ce:pre">Is this not supported ?</span><br></div><div><span style=3D"white-s=
pace:pre"><br></span></div>-- <br><div class=3D"gmail_signature">Do not pur=
sue the past. Do not lose yourself in the future. <br>The past no longer is=
. The future has not yet come. <br>Looking deeply at life as it is in the v=
ery here and now, <br>the practitioner dwells in stability and freedom.<br>=
(Thich Nhat Hanh)</div>
</div></div>
--001a1145a5ee77f60d05242ce0c7--
--===============3585633731229156825==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
------------------------------------------------------------------------------
--===============3585633731229156825==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
FreeMarker-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freemarker-user
--===============3585633731229156825==--