Put the context in the context:

context.put("context", context);

Then do:

$context.get($id).content

On Fri, Jul 6, 2012 at 4:49 AM,  <kieran...@gmx.net> wrote:
> 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
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@velocity.apache.org
> For additional commands, e-mail: user-h...@velocity.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@velocity.apache.org
For additional commands, e-mail: user-h...@velocity.apache.org

Reply via email to