brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Svetoslav Neykov <svetoslav.ney...@cloudsoftcorp.com>
Subject Re: Port formatting in template
Date Wed, 28 Sep 2016 14:25:37 GMT
Hi Graham,

You can tell freemarker (the template engine used) not to format the number by appending "?c"
to the expression.
See [1] for an example.

Best,
Svet.


[1] https://github.com/apache/brooklyn-library/blob/master/software/database/src/main/resources/org/apache/brooklyn/entity/database/mysql/mysql_master.conf#L2


> On 28.09.2016 г., at 16:53, Graham Ashby <Graham.Ashby@ca.ibm.com> wrote:
> 
> I'm having trouble with including a port in a template.
> 
> If the template has: 
> <value>${attribute['http.port']}</value>
> 
> And http.port is, say 9305, then the substituted value is "9,305" and not 
> "9305" This causes errors.
> <value>9,305</value>
> 
> I could create an enricher to format the value, but is there another way? 
> Is there a way to force the substitution into just the digits, for 
> instance?
> 
> Thanks
> Graham Ashby
> IBM Canada
> 


Mime
View raw message