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

Will Glass-Husain resolved VELOCITY-50.
---------------------------------------

    Resolution: Won't Fix

This is expected behavior for Velocity at this point.  #if can be used to 
detect boolean values or to detect existence of a reference.

> RFE: invalid parameters for #if directive should be a parse error?
> ------------------------------------------------------------------
>
>                 Key: VELOCITY-50
>                 URL: https://issues.apache.org/jira/browse/VELOCITY-50
>             Project: Velocity
>          Issue Type: Improvement
>          Components: Engine
>    Affects Versions: 1.5
>         Environment: Operating System: All
> Platform: PC
>            Reporter: Daniel Dekany
>            Priority: Minor
>             Fix For: 1.6
>
>
> The 3 lines below will print two No-s and one Yes:
>   #if('foo') Yes #else No #end
>   #if(1) Yes #else 
> No #end
>   #if(true) Yes #else No #end
> while the 4 lines bellow will print two Yes-es as 
> expected:
>   #set($x = 'foo')
>   #if($x) Yes #else No #end
>   #set($x = 1)
>   #if($x) Yes #else No 
> #end
> Also, the 2 lines below will print false:
>   #set($x = 'x' && true)
>   $x
> (Please 
> ignore possible false line breaks inserted by bugzilla.)
> Tried with 1.2 Stable and 1.3 
> Nightly 22/03

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