tim
2015-02-13 12:16:27 UTC
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.
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.