[
https://issues.apache.org/jira/browse/VELOCITY-101?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Henning Schmiedehausen closed VELOCITY-101.
-------------------------------------------
> "Velicimacro Miscellany" example in velocity-user doc does not work with
> inline macros.
> ---------------------------------------------------------------------------------------
>
> Key: VELOCITY-101
> URL: https://issues.apache.org/jira/browse/VELOCITY-101
> Project: Velocity
> Issue Type: Bug
> Components: Engine
> Affects Versions: 1.3-rc1
> Environment: Operating System: other
> Platform: PC
> Reporter: Chris Felaco
> Assigned To: Velocity-Dev List
> Fix For: 1.3
>
>
> According to the documentation, it should be possible to use a macro in an
> interpolated string passed to another macro. However, the example given
> demonstrates clearly that this does NOT work with inline macros. The example
> given is this:
> #macro( inner $foo )
> inner : $foo
> #end
> #macro( outer $foo )
> #set($bar = "outerlala")
> outer : $foo
> #end
> #set($bar = 'calltimelala')
> #outer( "#inner($bar)" )
> The result according to the docs should be:
> outer: inner: outerlala
> What you instead get is:
> outer : #inner(outerlala)
> The macro expansion does work in the following example, where the string
> evaluation is immediate:
> #set ($aref = "#inner($bar)")
> The following config settings were used:
> velocimacro.permissions.allow.inline = true
> velocimacro.permissions.allow.inline.to.replace.global = true
> velocimacro.permissions.allow.inline.local.scope = true
> velocimacro.context.localscope = false
> But no single change to these settings made a difference.
> If the inner and outer macros are instead defined in a macro library, the
> example does work. But if the template attempts to override the "inner"
> macro,
> it will not work (the original "inner" macro from the library will be used).
> Changing the inline.local.scope setting to false did not help.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]