You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by "Byron Foster (JIRA)" <de...@velocity.apache.org> on 2009/02/17 22:05:04 UTC
[jira] Created: (VELOCITY-699) Add a #return directive for
returning from a macro
Add a #return directive for returning from a macro
--------------------------------------------------
Key: VELOCITY-699
URL: https://issues.apache.org/jira/browse/VELOCITY-699
Project: Velocity
Issue Type: New Feature
Components: Engine
Affects Versions: 2.0
Reporter: Byron Foster
The #return directive would be used to return from a macro call, for example:
#macro(foo)
green
#return
eggs and ham
#end
would render:
green
--
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: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org
[jira] Closed: (VELOCITY-699) Add a #return directive for returning
from a macro
Posted by "Byron Foster (JIRA)" <de...@velocity.apache.org>.
[ https://issues.apache.org/jira/browse/VELOCITY-699?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Byron Foster closed VELOCITY-699.
---------------------------------
Resolution: Won't Fix
Fix Version/s: 2.0
> Add a #return directive for returning from a macro
> --------------------------------------------------
>
> Key: VELOCITY-699
> URL: https://issues.apache.org/jira/browse/VELOCITY-699
> Project: Velocity
> Issue Type: New Feature
> Components: Engine
> Affects Versions: 2.0
> Reporter: Byron Foster
> Fix For: 2.0
>
>
> The #return directive would be used to return from a macro call, for example:
> #macro(foo)
> green
> #return
> eggs and ham
> #end
> would render:
> green
--
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: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org
[jira] Commented: (VELOCITY-699) Add a #return directive for
returning from a macro
Posted by "Byron Foster (JIRA)" <de...@velocity.apache.org>.
[ https://issues.apache.org/jira/browse/VELOCITY-699?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12674433#action_12674433 ]
Byron Foster commented on VELOCITY-699:
---------------------------------------
Hmm, I didn't expect resistance on this one, and I really didn't expect to be accused of complicating Velocity with it :). I'm confused by your implication that return == Java. I added it because as a Velocity user I would find it useful.
Anywho, I created a 'contrib' directory under 'directive', and I threw it in there.
> Add a #return directive for returning from a macro
> --------------------------------------------------
>
> Key: VELOCITY-699
> URL: https://issues.apache.org/jira/browse/VELOCITY-699
> Project: Velocity
> Issue Type: New Feature
> Components: Engine
> Affects Versions: 2.0
> Reporter: Byron Foster
>
> The #return directive would be used to return from a macro call, for example:
> #macro(foo)
> green
> #return
> eggs and ham
> #end
> would render:
> green
--
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: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org
[jira] Commented: (VELOCITY-699) Add a #return directive for
returning from a macro
Posted by "Nathan Bubna (JIRA)" <de...@velocity.apache.org>.
[ https://issues.apache.org/jira/browse/VELOCITY-699?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12674364#action_12674364 ]
Nathan Bubna commented on VELOCITY-699:
---------------------------------------
-1 let's keep VTL simple and quick to learn and not turn it into java. no return statements.
if you really, really feel like it would be useful, i suppose i wouldn't veto enhancing #break to work like this, but even that i won't really like. do not add a directive called #return. macros are not java methods.
> Add a #return directive for returning from a macro
> --------------------------------------------------
>
> Key: VELOCITY-699
> URL: https://issues.apache.org/jira/browse/VELOCITY-699
> Project: Velocity
> Issue Type: New Feature
> Components: Engine
> Affects Versions: 2.0
> Reporter: Byron Foster
>
> The #return directive would be used to return from a macro call, for example:
> #macro(foo)
> green
> #return
> eggs and ham
> #end
> would render:
> green
--
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: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org
[jira] Issue Comment Edited: (VELOCITY-699) Add a #return directive
for returning from a macro
Posted by "Byron Foster (JIRA)" <de...@velocity.apache.org>.
[ https://issues.apache.org/jira/browse/VELOCITY-699?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12674433#action_12674433 ]
byronvf edited comment on VELOCITY-699 at 2/17/09 6:45 PM:
----------------------------------------------------------------
Hmm, I didn't expect resistance on this one, and I really didn't expect to be accused of complicating Velocity with it :). I'm confused by your implication that return == Java. I proposed it because as a Velocity user I would find it useful.
Anywho, I created a 'contrib' directory under 'directive', and I threw it in there. To use it a user will need to manually add the directive.
was (Author: byronvf):
Hmm, I didn't expect resistance on this one, and I really didn't expect to be accused of complicating Velocity with it :). I'm confused by your implication that return == Java. I added it because as a Velocity user I would find it useful.
Anywho, I created a 'contrib' directory under 'directive', and I threw it in there.
> Add a #return directive for returning from a macro
> --------------------------------------------------
>
> Key: VELOCITY-699
> URL: https://issues.apache.org/jira/browse/VELOCITY-699
> Project: Velocity
> Issue Type: New Feature
> Components: Engine
> Affects Versions: 2.0
> Reporter: Byron Foster
>
> The #return directive would be used to return from a macro call, for example:
> #macro(foo)
> green
> #return
> eggs and ham
> #end
> would render:
> green
--
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: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org
[jira] Commented: (VELOCITY-699) Add a #return directive for
returning from a macro
Posted by "Byron Foster (JIRA)" <de...@velocity.apache.org>.
[ https://issues.apache.org/jira/browse/VELOCITY-699?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12674464#action_12674464 ]
Byron Foster commented on VELOCITY-699:
---------------------------------------
Ok, this is an optional directive now which can be accessed with:
userdirective = org.apache.velocity.runtime.directive.contrib.Return
But, unofficial.
> Add a #return directive for returning from a macro
> --------------------------------------------------
>
> Key: VELOCITY-699
> URL: https://issues.apache.org/jira/browse/VELOCITY-699
> Project: Velocity
> Issue Type: New Feature
> Components: Engine
> Affects Versions: 2.0
> Reporter: Byron Foster
>
> The #return directive would be used to return from a macro call, for example:
> #macro(foo)
> green
> #return
> eggs and ham
> #end
> would render:
> green
--
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: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org