Re: Short form of if..else

Denis Bredelet <[email protected]> Wed, 07 Aug 2013 13:46:00 +0100
Newsgroups gmane.comp.web.freemarker.user
Message-ID <[email protected]>
> Hi All,
> 
> What is the short form of
> <#if myDTO.field??>
>   ${myDTO.filed?size}
> <#else>
>   0
> <#/if>
> 
> Right now I have ${myDTO.field ! "0"} which *doesn't* print size if
> myDTO.field is not NULL.

Do you mean you have ${myDTO.field?size ! 0} ?


-- Denis. 

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk