You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by "Claude Brisson (JIRA)" <ji...@apache.org> on 2018/10/13 22:37:00 UTC

[jira] [Resolved] (VELOCITY-898) Implement default values in formal references

     [ https://issues.apache.org/jira/browse/VELOCITY-898?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claude Brisson resolved VELOCITY-898.
-------------------------------------
       Resolution: Fixed
    Fix Version/s: 2.1

Implemented as {{$\{foo|'foo'}}} where 'foo' can be any valid VTL expression.

{{$\{foo|${bar|'baz'}}}} is valid.

> Implement default values in formal references
> ---------------------------------------------
>
>                 Key: VELOCITY-898
>                 URL: https://issues.apache.org/jira/browse/VELOCITY-898
>             Project: Velocity
>          Issue Type: Improvement
>          Components: Engine
>    Affects Versions: 2.1.x
>            Reporter: Claude Brisson
>            Assignee: Claude Brisson
>            Priority: Major
>             Fix For: 2.1
>
>
> We should take profit of the formal reference syntax to implement default values:
> {{  ${foo|"bar"}}}
> It could even be repeated, or nested...
> {{  ${foo|$bar|"baz"}}}
> {{  ${foo|${bar|"baz}}}}
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org