Handling null values

koevet <[email protected]>
Newsgroups gmane.comp.web.freemarker.user
Message-ID <[email protected]>
Hello, I have just started using Freemarker.

I have a basic problem. How do I set the template to handle null values of
an int field of a pojo as String and display no values? 
Currently my template looks like:

Event: "${event.eventSource!""}","${event.eventType!""}

eventType is a int field of a pojo. If the field is null, Freemarker
displays 0 (default for int). I would like to change the behavior to display
an empty String. And no, I can't change the type to Integer.

Thanks
Luciano
-- 
View this message in context: http://www.nabble.com/Handling-null-values-tp18997775p18997775.html
Sent from the freemarker-user mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.