freemarker-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Dekany (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FREEMARKER-13) Negate as built in for numbers
Date Sun, 29 Nov 2015 00:42:10 GMT

    [ https://issues.apache.org/jira/browse/FREEMARKER-13?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15030721#comment-15030721
] 

Daniel Dekany commented on FREEMARKER-13:
-----------------------------------------

Java methods aren't exposed in FreeMarker, unless the class wasn't recognized as something
that corresponds to an FTL type (such as number), so yes, you can't call that. But doesn't
{{(-depositReturn)?string.currency}} work?

> Negate as built in for numbers
> ------------------------------
>
>                 Key: FREEMARKER-13
>                 URL: https://issues.apache.org/jira/browse/FREEMARKER-13
>             Project: Apache Freemarker
>          Issue Type: Improvement
>          Components: engine
>            Reporter: Marco Janc
>            Priority: Minor
>
> In some cases in domain object numbers are stored as positive but have negative meaning
when displaying.
> I have a BigDecimal `depositReturn` and I tried to use negate() in markup which is not
working.
> ${depositReturn.negate()?string.currency}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message