[prev in list] [next in list] [prev in thread] [next in thread] 

List:       velocity-dev
Subject:    [jira] Commented: (VELOCITY-756) New notation for replacing null
From:       "Ludwig Magnusson (JIRA)" <dev () velocity ! apache ! org>
Date:       2010-03-29 8:01:27
Message-ID: 2031806738.542951269849687957.JavaMail.jira () brutus ! apache ! org
[Download RAW message or body]


    [ https://issues.apache.org/jira/browse/VELOCITY-756?page=com.atlassian.jira.plugi \
n.system.issuetabpanels:comment-tabpanel&focusedCommentId=12850820#action_12850820 ] 

Ludwig Magnusson commented on VELOCITY-756:
-------------------------------------------

I did not know that this feature existed and I agree that it is a better and more \
flexible solution.  Thanks for the comment.

> 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: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic