From notifications-return-6968-archive-asf-public=cust-asf.ponee.io@freemarker.apache.org Mon Sep 14 07:17:03 2020 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mxout1-he-de.apache.org (mxout1-he-de.apache.org [95.216.194.37]) by mx-eu-01.ponee.io (Postfix) with ESMTPS id CC25418066D for ; Mon, 14 Sep 2020 09:17:03 +0200 (CEST) Received: from mail.apache.org (mailroute1-lw-us.apache.org [207.244.88.153]) by mxout1-he-de.apache.org (ASF Mail Server at mxout1-he-de.apache.org) with SMTP id 47044635B8 for ; Mon, 14 Sep 2020 07:17:03 +0000 (UTC) Received: (qmail 40722 invoked by uid 500); 14 Sep 2020 07:17:02 -0000 Mailing-List: contact notifications-help@freemarker.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@freemarker.apache.org Delivered-To: mailing list notifications@freemarker.apache.org Received: (qmail 40694 invoked by uid 99); 14 Sep 2020 07:17:02 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Sep 2020 07:17:02 +0000 Received: from jira-he-de.apache.org (static.172.67.40.188.clients.your-server.de [188.40.67.172]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id B51644287F for ; Mon, 14 Sep 2020 07:17:01 +0000 (UTC) Received: from jira-he-de.apache.org (localhost.localdomain [127.0.0.1]) by jira-he-de.apache.org (ASF Mail Server at jira-he-de.apache.org) with ESMTP id 528D2780BBD for ; Mon, 14 Sep 2020 07:17:00 +0000 (UTC) Date: Mon, 14 Sep 2020 07:17:00 +0000 (UTC) From: "G Kal (Jira)" To: notifications@freemarker.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (FREEMARKER-157) Custom number formats MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/FREEMARKER-157?page=3Dcom.atlas= sian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D= 17195243#comment-17195243 ]=20 G Kal commented on FREEMARKER-157: ---------------------------------- Thank you again for your valuable input. > Custom number formats > --------------------- > > Key: FREEMARKER-157 > URL: https://issues.apache.org/jira/browse/FREEMARKER-157 > Project: Apache Freemarker > Issue Type: Bug > Components: documentation > Affects Versions: 2.3.28, 2.3.29, 2.3.30 > Reporter: G Kal > Priority: Major > Labels: customNumberFormats > > Followed the exact steps as described at the project's [documentation|htt= ps://freemarker.apache.org/docs/pgui_config_custom_formats.html#pgui_config= _custom_formats_ex_model_aware] but I cannot make my custom number formats = to work. > For example when I run the template bellow: > {code:java} > ${map.key?string.@base_8} > {code} > =C2=A0I get this error: > =C2=A0 > {code:java} > For "." left-hand operand: Expected a hash, but this has evaluated to a s= tring (wrapper: f.t.SimpleScalar): > =3D=3D> map.key?string > {code} > I tried various combinations of . and @ operator, tried to wrap my map in= side () but nothing seems to work. > =C2=A0 > Setting the number format globally (<#setting number_format=3D"@base_8">)= works, but this is not an option for me, as well as the model - aware form= ats. Is this functionality broken or removed, can I at least have a custom = format function ? How can I achieve this? -- This message was sent by Atlassian Jira (v8.3.4#803005)