Re: [FMPP] Dealing with reserved names
Brought to you by:
ddekany
|
From: Bruce P. <bpe...@ya...> - 2006-06-01 18:15:38
|
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 it displayed with FreeMarker when the key name is 'default'. If I change the name from 'default' to something else, everyone's happy.
Are you saying that you have a map with a key named 'default' and the value is displayed correctly?
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?
Daniel Dekany <dd...@fr...> wrote: Thursday, June 1, 2006, 3:01:44 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'.
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.
--
Best regards,
Daniel Dekany
_______________________________________________
fmpp-open mailing list
fmp...@li...
https://lists.sourceforge.net/lists/listinfo/fmpp-open
---------------------------------
Feel free to call! Free PC-to-PC calls. Low rates on PC-to-Phone. Get Yahoo! Messenger with Voice |