New notation for replacing null values with a specified string
--------------------------------------------------------------

                 Key: VELOCITY-756
                 URL: https://issues.apache.org/jira/browse/VELOCITY-756
             Project: Velocity
          Issue Type: New Feature
          Components: Engine
            Reporter: Ludwig Magnusson
            Priority: Minor


If I have a variable $foo and it is null, I have the option of using the silent 
notation $!foo for not writing it. But often when genrating HTML pages I want 
to express that the values is missing, e.g. by a "-". That means that I have to 
write my code like this:

#if($foo)
  $foo
#else
  -
#end

Wouldn't it be great if there were a new option like $?foo (or whatever 
chararter would be suitable instead of "?") that would print the variable $foo 
if it was not null and otherwise print a predefined character like "-".

/Ludwig

-- 
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]

Reply via email to