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/16 22:22:02 UTC
[jira] Created: (VELOCITY-697) Add macro default parameters
Add macro default parameters
----------------------------
Key: VELOCITY-697
URL: https://issues.apache.org/jira/browse/VELOCITY-697
Project: Velocity
Issue Type: New Feature
Components: Engine
Affects Versions: 2.0
Reporter: Byron Foster
Add the ability to specify default parameters to macros, for example:
#macro(foo $x $y="legit")$x$y#end
calling this with #foo(2) would give:
2legit
Any number of default parameters can be specified, but no non-default parameters can not follow default parameters. Assignment of calling values begins from left to right and all left over default arguments are assigned their default values.
--
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-697) Add macro default parameters
Posted by "Byron Foster (JIRA)" <de...@velocity.apache.org>.
[ https://issues.apache.org/jira/browse/VELOCITY-697?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12681451#action_12681451 ]
Byron Foster commented on VELOCITY-697:
---------------------------------------
Sounds good, I was leaving it open for any comments/criticism, otherwise the implementation is complete.
> Add macro default parameters
> ----------------------------
>
> Key: VELOCITY-697
> URL: https://issues.apache.org/jira/browse/VELOCITY-697
> Project: Velocity
> Issue Type: New Feature
> Components: Engine
> Affects Versions: 2.0
> Reporter: Byron Foster
> Fix For: 2.0
>
>
> Add the ability to specify default parameters to macros, for example:
> #macro(foo $x $y="legit")$x$y#end
> calling this with #foo(2) would give:
> 2legit
> Any number of default parameters can be specified, but no non-default parameters can not follow default parameters. Assignment of calling values begins from left to right and all left over default arguments are assigned their default values.
--
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] Resolved: (VELOCITY-697) Add macro default parameters
Posted by "Nathan Bubna (JIRA)" <de...@velocity.apache.org>.
[ https://issues.apache.org/jira/browse/VELOCITY-697?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Nathan Bubna resolved VELOCITY-697.
-----------------------------------
Resolution: Fixed
Fix Version/s: 2.0
Byron, i'm marking this resolved, because the feature looks pretty complete in 2.0 to me. If there's something that remains to be done for this, feel free to re-open.
> Add macro default parameters
> ----------------------------
>
> Key: VELOCITY-697
> URL: https://issues.apache.org/jira/browse/VELOCITY-697
> Project: Velocity
> Issue Type: New Feature
> Components: Engine
> Affects Versions: 2.0
> Reporter: Byron Foster
> Fix For: 2.0
>
>
> Add the ability to specify default parameters to macros, for example:
> #macro(foo $x $y="legit")$x$y#end
> calling this with #foo(2) would give:
> 2legit
> Any number of default parameters can be specified, but no non-default parameters can not follow default parameters. Assignment of calling values begins from left to right and all left over default arguments are assigned their default values.
--
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