Project

Contents

Issue #00005509

<tml:foreach>: iterate over java.util.map-s
Feature/Improvement

Currently it is not possible to iterate over entrysets of java-util.map objects. This now has been improved / implemented.

The var specified by "currentvalue" is an object of class Map.Entry. This object has properties "key" and "value" to retrieve the data.

Sample:

<tml:script>
    _map = WGA.createMap({
        firstname: "walter",
        lastname: "wichtig"
    })
</tml:script>
<tml:foreach item="_map" currentvalue="_entryset">
    key: <tml:item name="_entryset.key"/>
    value: <tml:item name="_entryset.value"/>
</tml:foreach>

The result is

key: firstname
value: walter
key: lastname
value: wichtig