[jira] Created: (VELOCITY-594) null-values cannot be set in macros

View: New views
6 Messages — Rating Filter:   Alert me  

[jira] Created: (VELOCITY-594) null-values cannot be set in macros

by Velocity - Dev mailing list-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

null-values cannot be set in macros
-----------------------------------

                 Key: VELOCITY-594
                 URL: https://issues.apache.org/jira/browse/VELOCITY-594
             Project: Velocity
          Issue Type: Bug
    Affects Versions: 1.5
         Environment: Windows XP SP2

            Reporter: jukefox


There is an issue with the new supported feature of assigning null-values to velocity variables. The following scenarios illustrate the error. The configuration parameter <i>directive.set.null.allowed</i> must be set to <i>true</i>.

Scenario 1 (correct behaviour outside macro):
<pre>
#set ($test = "test")
$test
#set ($test = $null)
$test
</pre>
yields to the output:
<pre>
test
$NULL
</pre>
Scenario 2 (erroneous behaviour using macro):
<pre>
#macro (test)
    #set ($test = "test")
    $test
    #set ($test = $null)
    $test
#end

#test()
</pre>
yields to the output:
<pre>
test
test
</pre>
and the varibale test has not been resetted to null which is the error.


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


[jira] Updated: (VELOCITY-594) null-values cannot be set in macros

by Velocity - Dev mailing list-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

jukefox updated VELOCITY-594:
-----------------------------

    Description:
There is an issue with the new supported feature of assigning null-values to velocity variables. The following scenarios illustrate the error. The configuration parameter _directive.set.null.allowed_ must be set to _true_.

Scenario 1 (correct behaviour outside macro):
{code:title=Bar.java|borderStyle=solid}
#set ($test = "test")
$test
#set ($test = $null)
$test
{code}
yields to the output:
{code|borderStyle=solid}
test
$NULL
{code}
Scenario 2 (erroneous behaviour using macro):
{code|borderStyle=solid}
#macro (test)
    #set ($test = "test")
    $test
    #set ($test = $null)
    $test
#end

#test()
{code}
yields to the output:
{code|borderStyle=solid}
test
test
{code}
and the varibale test has not been resetted to null which is the error.


  was:
There is an issue with the new supported feature of assigning null-values to velocity variables. The following scenarios illustrate the error. The configuration parameter <i>directive.set.null.allowed</i> must be set to <i>true</i>.

Scenario 1 (correct behaviour outside macro):
<pre>
#set ($test = "test")
$test
#set ($test = $null)
$test
</pre>
yields to the output:
<pre>
test
$NULL
</pre>
Scenario 2 (erroneous behaviour using macro):
<pre>
#macro (test)
    #set ($test = "test")
    $test
    #set ($test = $null)
    $test
#end

#test()
</pre>
yields to the output:
<pre>
test
test
</pre>
and the varibale test has not been resetted to null which is the error.



> null-values cannot be set in macros
> -----------------------------------
>
>                 Key: VELOCITY-594
>                 URL: https://issues.apache.org/jira/browse/VELOCITY-594
>             Project: Velocity
>          Issue Type: Bug
>    Affects Versions: 1.5
>         Environment: Windows XP SP2
>            Reporter: jukefox
>
> There is an issue with the new supported feature of assigning null-values to velocity variables. The following scenarios illustrate the error. The configuration parameter _directive.set.null.allowed_ must be set to _true_.
> Scenario 1 (correct behaviour outside macro):
> {code:title=Bar.java|borderStyle=solid}
> #set ($test = "test")
> $test
> #set ($test = $null)
> $test
> {code}
> yields to the output:
> {code|borderStyle=solid}
> test
> $NULL
> {code}
> Scenario 2 (erroneous behaviour using macro):
> {code|borderStyle=solid}
> #macro (test)
>     #set ($test = "test")
>     $test
>     #set ($test = $null)
>     $test
> #end
> #test()
> {code}
> yields to the output:
> {code|borderStyle=solid}
> test
> test
> {code}
> and the varibale test has not been resetted to null which is the error.

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


[jira] Updated: (VELOCITY-594) null-values cannot be set in macros

by Velocity - Dev mailing list-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

jukefox updated VELOCITY-594:
-----------------------------

    Description:
There is an issue with the new supported feature of assigning null-values to velocity variables. The following scenarios illustrate the error. The configuration parameter "directive.set.null.allowed" must be set to "true".

Scenario 1 (correct behaviour outside macro):

#set ($test = "test")
$test
#set ($test = $null)
$test

yields to the output:

test
$NULL

Scenario 2 (erroneous behaviour using macro):

#macro (test)
    #set ($test = "test")
    $test
    #set ($test = $null)
    $test
#end

#test()

yields to the output:

test
test

and the varibale test has not been resetted to null which is the error.


  was:
There is an issue with the new supported feature of assigning null-values to velocity variables. The following scenarios illustrate the error. The configuration parameter _directive.set.null.allowed_ must be set to _true_.

Scenario 1 (correct behaviour outside macro):
{code:title=Bar.java|borderStyle=solid}
#set ($test = "test")
$test
#set ($test = $null)
$test
{code}
yields to the output:
{code|borderStyle=solid}
test
$NULL
{code}
Scenario 2 (erroneous behaviour using macro):
{code|borderStyle=solid}
#macro (test)
    #set ($test = "test")
    $test
    #set ($test = $null)
    $test
#end

#test()
{code}
yields to the output:
{code|borderStyle=solid}
test
test
{code}
and the varibale test has not been resetted to null which is the error.



> null-values cannot be set in macros
> -----------------------------------
>
>                 Key: VELOCITY-594
>                 URL: https://issues.apache.org/jira/browse/VELOCITY-594
>             Project: Velocity
>          Issue Type: Bug
>    Affects Versions: 1.5
>         Environment: Windows XP SP2
>            Reporter: jukefox
>
> There is an issue with the new supported feature of assigning null-values to velocity variables. The following scenarios illustrate the error. The configuration parameter "directive.set.null.allowed" must be set to "true".
> Scenario 1 (correct behaviour outside macro):
> #set ($test = "test")
> $test
> #set ($test = $null)
> $test
> yields to the output:
> test
> $NULL
> Scenario 2 (erroneous behaviour using macro):
> #macro (test)
>     #set ($test = "test")
>     $test
>     #set ($test = $null)
>     $test
> #end
> #test()
> yields to the output:
> test
> test
> and the varibale test has not been resetted to null which is the error.

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


[jira] Commented: (VELOCITY-594) null-values cannot be set in macros

by Velocity - Dev mailing list-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ https://issues.apache.org/jira/browse/VELOCITY-594?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12595232#action_12595232 ]

jukefox commented on VELOCITY-594:
----------------------------------

Sorry for the multiple edits. That is my fist ticket posted in JIRA. My hope was that some text-formatting would be possible within the description field but this seems not be the case.


> null-values cannot be set in macros
> -----------------------------------
>
>                 Key: VELOCITY-594
>                 URL: https://issues.apache.org/jira/browse/VELOCITY-594
>             Project: Velocity
>          Issue Type: Bug
>    Affects Versions: 1.5
>         Environment: Windows XP SP2
>            Reporter: jukefox
>
> There is an issue with the new supported feature of assigning null-values to velocity variables. The following scenarios illustrate the error. The configuration parameter "directive.set.null.allowed" must be set to "true".
> Scenario 1 (correct behaviour outside macro):
> #set ($test = "test")
> $test
> #set ($test = $null)
> $test
> yields to the output:
> test
> $NULL
> Scenario 2 (erroneous behaviour using macro):
> #macro (test)
>     #set ($test = "test")
>     $test
>     #set ($test = $null)
>     $test
> #end
> #test()
> yields to the output:
> test
> test
> and the varibale test has not been resetted to null which is the error.

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


[jira] Updated: (VELOCITY-594) null-values cannot be set in macros

by Velocity - Dev mailing list-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

jukefox updated VELOCITY-594:
-----------------------------

    Description:
There is an issue with the new supported feature of assigning null-values to velocity variables. The following scenarios illustrate the error. The configuration parameter "directive.set.null.allowed" must be set to "true".

Scenario 1 (correct behaviour outside macro):

#set ($test = "test")
$test
#set ($test = $null)
$test

yields to the output:

test
$test

Scenario 2 (erroneous behaviour using macro):

#macro (test)
    #set ($test = "test")
    $test
    #set ($test = $null)
    $test
#end

#test()

yields to the output:

test
test

and the varibale test has not been resetted to null which is the error.


  was:
There is an issue with the new supported feature of assigning null-values to velocity variables. The following scenarios illustrate the error. The configuration parameter "directive.set.null.allowed" must be set to "true".

Scenario 1 (correct behaviour outside macro):

#set ($test = "test")
$test
#set ($test = $null)
$test

yields to the output:

test
$NULL

Scenario 2 (erroneous behaviour using macro):

#macro (test)
    #set ($test = "test")
    $test
    #set ($test = $null)
    $test
#end

#test()

yields to the output:

test
test

and the varibale test has not been resetted to null which is the error.



Corrected my output in scenario 1.


> null-values cannot be set in macros
> -----------------------------------
>
>                 Key: VELOCITY-594
>                 URL: https://issues.apache.org/jira/browse/VELOCITY-594
>             Project: Velocity
>          Issue Type: Bug
>    Affects Versions: 1.5
>         Environment: Windows XP SP2
>            Reporter: jukefox
>
> There is an issue with the new supported feature of assigning null-values to velocity variables. The following scenarios illustrate the error. The configuration parameter "directive.set.null.allowed" must be set to "true".
> Scenario 1 (correct behaviour outside macro):
> #set ($test = "test")
> $test
> #set ($test = $null)
> $test
> yields to the output:
> test
> $test
> Scenario 2 (erroneous behaviour using macro):
> #macro (test)
>     #set ($test = "test")
>     $test
>     #set ($test = $null)
>     $test
> #end
> #test()
> yields to the output:
> test
> test
> and the varibale test has not been resetted to null which is the error.

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


[jira] Resolved: (VELOCITY-594) null-values cannot be set in macros

by Velocity - Dev mailing list-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

Will Glass-Husain resolved VELOCITY-594.
----------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.6

Hi,

Thanks for reporting this.  This is now fixed in svn trunk.   context.remove wasn't working properly within macros when the local scope was off.

WILL

> null-values cannot be set in macros
> -----------------------------------
>
>                 Key: VELOCITY-594
>                 URL: https://issues.apache.org/jira/browse/VELOCITY-594
>             Project: Velocity
>          Issue Type: Bug
>    Affects Versions: 1.5
>         Environment: Windows XP SP2
>            Reporter: jukefox
>             Fix For: 1.6
>
>
> There is an issue with the new supported feature of assigning null-values to velocity variables. The following scenarios illustrate the error. The configuration parameter "directive.set.null.allowed" must be set to "true".
> Scenario 1 (correct behaviour outside macro):
> #set ($test = "test")
> $test
> #set ($test = $null)
> $test
> yields to the output:
> test
> $test
> Scenario 2 (erroneous behaviour using macro):
> #macro (test)
>     #set ($test = "test")
>     $test
>     #set ($test = $null)
>     $test
> #end
> #test()
> yields to the output:
> test
> test
> and the varibale test has not been resetted to null which is the error.

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