No other way of handling missing values?

tim <[email protected]> Fri, 13 Feb 2015 04:16:27 -0800 (PST)
Newsgroups gmane.comp.web.freemarker.user
Message-ID <[email protected]>
I am checking on a flag that sometimes is missing/NULL and sometimes it
exists in the model but is false.

The only way to securely check on the flag I found is:

<#if (c.royaltyTerms.OffsetLimit.perProductYn)??> (see if it is NULL)
<#if (c.royaltyTerms.OffsetLimit.perProductYn=="Y")> (see if is true/set)

Is there no better way? I appreciate the possibility of differentiating
between NULL and existing, but it is only very rare cases in which such a
check is required. In 90% of the cases you want a missing value be treated
as an existing but not matching value... In the freemarker docs it says that
Freemarker is picky about NULL values in its standard configuration. But I
found no configuration to change this behavior. Is there any?

Cheers,
Tim



--
View this message in context: http://freemarker.624813.n4.nabble.com/No-other-way-of-handling-missing-values-tp4655373.html
Sent from the freemarker-user mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/