[ 
http://issues.apache.org/jira/browse/VELOCITY-468?page=comments#action_12444049 
] 
            
Mojmir Hanes commented on VELOCITY-468:
---------------------------------------

I'd like to parse (process) various velocity templates from control template 
(eg I have control.vm file written in VTL and call various templates via 
$generator.parse(...) from control.vm). 

As far as I know there is no way to put more than one object into context 
before parsing particular template (in VTL). 

Suppose I have template where I generate text according to 2 VTL variables. I 
can "pass" only one parameter to that template (eg put it to context)

I know this can be solved via velocimacro, but I'm wondering then why it's 
possible to put one object in $generator.parse(...) to context but no more then 
one. Unfortunatelly field controlContext is private in class 
org.apache.velocity.texen.Generator so extending Generator class doesn't work.



> Allowing putting objects into control context from VTL
> ------------------------------------------------------
>
>                 Key: VELOCITY-468
>                 URL: http://issues.apache.org/jira/browse/VELOCITY-468
>             Project: Velocity
>          Issue Type: Improvement
>          Components: Texen
>    Affects Versions: 1.4
>            Reporter: Mojmir Hanes
>            Priority: Minor
>             Fix For: 1.6
>
>         Attachments: Generator.java.diff
>
>
> I think it would be nice to allow putting objects into control context in 
> VTL. 
> The motivation is straightforward - in some cases you need to put more than 
> one object into context before parsing particular template, so method 
> org.apache.velocity.texen.parse(String inputTemplate, String outputFile, 
> String objectID,Object object) doesn't match your need. 
> What do you think ?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to