Re: Dealing with reserved names

Bruce Perryman <[email protected]> Thu, 1 Jun 2006 11:15:24 -0700 (PDT)
Newsgroups gmane.comp.text.fmpp
Message-ID <[email protected]>
--===============1322926770==
Content-Type: multipart/alternative; boundary="0-1246439812-1149185724=:27562"
Content-Transfer-Encoding: 7bit

--0-1246439812-1149185724=:27562
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

It must be something else that I'm doing wrong with my FreeMarker syntax =
then. The data is correct in the map. I can see it in java. I can't see i=
t displayed with FreeMarker when the key name is 'default'. If I change t=
he name from 'default' to something else, everyone's happy.

Are you saying that you have a map with a key named 'default' and the val=
ue is displayed correctly?

If I find out anything that I'm doing wrong, I'll post. What version of F=
reeMarker are you testing with? And how can I know what version my applic=
ation is using?

Daniel Dekany <[email protected]> wrote: Thursday, June 1, 2006, 3:01:4=
4 PM, Bruce Perryman wrote:

> Thanks for responding.
>
> It's a nested Map populated in java from a db resultset. One of the
> keys' name is 'default'. When I evaluate it, it is always empty
> (""). If the name is something other than 'default', I retrieve the
> value of the key. I'm assuming that the problem is that FreeMarker
> is confused by the reserved name 'default'.=20

That name is not reserved in FreeMarker. (It's used like
foo?default('-'), but the possible words after the ? are specified by
the template language, so it's not like reserving them.)

> If that is true, renaming the key name would be a project. I was
> wondering if FreeMarker could somehow 'escape' the name 'default' so
> that I can retrieve the value associated with that key.

FreeMarker doesn't reserve any map keys. But to be sure that there is
no bug with the "default" key, I tried that and it works for me. I
guess the problem is rather with the data source that you use to read
the database. Or maybe simply the SQL statement is wrong.

> Thanks.

--=20
Best regards,
 Daniel Dekany



_______________________________________________
fmpp-open mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fmpp-open


	=09
---------------------------------
Feel free to call! Free PC-to-PC calls. Low rates on PC-to-Phone.  Get Ya=
hoo! Messenger with Voice
--0-1246439812-1149185724=:27562
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

It must be something else that I'm doing wrong with my FreeMarker syntax =
then. The data is correct in the map. I can see it in java. I can't see i=
t displayed with FreeMarker when the key name is 'default'. If I change t=
he name from 'default' to something else, everyone's happy.<br><br>Are yo=
u saying that you have a map with a key named 'default' and the value is =
displayed correctly?<br><br>If I find out anything that I'm doing wrong, =
I'll post. What version of FreeMarker are you testing with? And how can I=
 know what version my application is using?<br><br><b><i>Daniel Dekany &l=
t;[email protected]&gt;</i></b> wrote:<blockquote class=3D"replbq" styl=
e=3D"border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-l=
eft: 5px;"> Thursday, June 1, 2006, 3:01:44 PM, Bruce Perryman wrote:<br>=
<br>&gt; Thanks for responding.<br>&gt;<br>&gt; It's a nested Map populat=
ed in java from a db resultset. One of the<br>&gt; keys' name is 'default=
'. When I evaluate it, it is always
 empty<br>&gt; (""). If the name is something other than 'default', I ret=
rieve the<br>&gt; value of the key. I'm assuming that the problem is that=
 FreeMarker<br>&gt; is confused by the reserved name 'default'. <br><br>T=
hat name is not reserved in FreeMarker. (It's used like<br>foo?default('-=
'), but the possible words after the ? are specified by<br>the template l=
anguage, so it's not like reserving them.)<br><br>&gt; If that is true, r=
enaming the key name would be a project. I was<br>&gt; wondering if FreeM=
arker could somehow 'escape' the name 'default' so<br>&gt; that I can ret=
rieve the value associated with that key.<br><br>FreeMarker doesn't reser=
ve any map keys. But to be sure that there is<br>no bug with the "default=
" key, I tried that and it works for me. I<br>guess the problem is rather=
 with the data source that you use to read<br>the database. Or maybe simp=
ly the SQL statement is wrong.<br><br>&gt; Thanks.<br><br>-- <br>Best reg=
ards,<br> Daniel
 Dekany<br><br><br><br>_______________________________________________<br=
>fmpp-open mailing list<br>[email protected]<br>https://lis=
ts.sourceforge.net/lists/listinfo/fmpp-open<br></blockquote><br><p>
		<hr size=3D1>Feel free to call! Free PC-to-PC calls. Low rates on PC-to=
-Phone. <a href=3D"http://us.rd.yahoo.com/mail_us/taglines/postman10/*htt=
p://us.rd.yahoo.com/evt=3D39663/*http://messenger.yahoo.com"> Get Yahoo! =
Messenger with Voice</a>
--0-1246439812-1149185724=:27562--


--===============1322926770==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


--===============1322926770==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
fmpp-open mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fmpp-open

--===============1322926770==--