O'Reilly logo

ExtGWT Rich Internet Application Cookbook by Odili Charles Opute

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Doing math in templates

It is my sincere hope that our talk of math doesn't give you goose bumps, dispelling such fears this early is necessary for some to be able to complete this recipe especially since we are not attempting such things as used in RSA cryptography.

We basically want to be able to count stuff and do simple arithmetic operations which in my humble opinion is quite safe.

Doing math in templates

How to do it...

Make an XTemplate object with the HTML format string which should contain property names from the intended data wrapped in curly brackets. Arithmetic operations can be done on a property value by applying an arithmetic operator to the property and a ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required