Did you get any exceptions in the log to provide a clue? Looking in the
manual it appears the "+" approach is correct:
http://freemarker.org/docs/dgui_template_exp.html#dgui_template_exp_arit
Can you report back when you get a working example so we can add it to our
docs please?
--
Jody Garnett
On 30 October 2017 at 08:22, Uwe Seher <uwe.se...@gmail.com> wrote:
> Hello group!
>
> I created a GetFeatureInfo-template for a 2-band raster layer. This works
> fine and i can get the band values and convert them into numbers and write
> the into a table:
>
> <td>${cell.attributes["dgm"].value?number}</td>
> <td>${cell.attributes["wd"].value?number}</td>
>
> Now i want to add these two values, this is the part that does not work.
>
> this creates a text output like n1 + n2 (n1,2 are the correct numbers)
> ${cell.attributes["dgm"].value?number} + ${cell.attributes["wd"].value?
> number}
>
> This does not work:
> ${${cell.attributes["dgm"].value?number} + ${cell.attributes["wd"].value?
> number}}
>
> Writing a function sum does also not work with the expressions only with
> fixed numbers like 10or 20:
> <#function sum a b>
> <#return a + b>
> </#function>
> ...
> <td>${sum(${cell.attributes["dgm"].value?number},${cell.
> attributes["wd"].value?number})}</td>
>
> Changing the localization does not have an effect:
> <#setting locale="de_DE">
>
> Can someone give me a hint how to add two expressions with freemarker?
>
> Thank you in advance
>
> Uwe
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Geoserver-users mailing list
>
> Please make sure you read the following two resources before posting to
> this list:
> - Earning your support instead of buying it, but Ian Turton:
> http://www.ianturton.com/talks/foss4g.html#/
> - The GeoServer user list posting guidelines: http://geoserver.org/comm/
> userlist-guidelines.html
>
> Geoserver-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-users mailing list
Please make sure you read the following two resources before posting to this
list:
- Earning your support instead of buying it, but Ian Turton:
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines:
http://geoserver.org/comm/userlist-guidelines.html
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users