double evaluation

[email protected]
Newsgroups gmane.comp.jakarta.velocity.user
Message-ID <[email protected]>
Hello Velocity Users,

in our VelocityContext, there is a list called "sourceIds", which lists the available ids. In addition, there are HashMaps in the VelocityContext registered under the available ids. Maps are as many as ids, of course.

So, for example we have: sourceIds = [src1, scr2] and therefore two maps src1 and src2 in the context.

How can we refer to the map object?

Using #foreach ( $id in $sourceIds ), first of all the String "src1" is the value of id ($id). But how can wie refer to the object stored under "src1" in the VelocityContext?

$($id).getContent() did not work (it was (src).getContent()).

Kind regards,
Kieran
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.