You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Steven Shaw <st...@eiger.co.uk> on 2007/04/13 17:33:56 UTC

RE: velocimacro.context.localscope

It seems to be impossible to use velocimacro.context.localscope=true
with Spring MVC Velocity support. Spring has a macro called springBind
which side effects a global values called $status. Have the Velocity
team any thoughts on ideal solutions to this problem?

Cheers,
Steve.

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


Re: velocimacro.context.localscope

Posted by Will Glass-Husain <wg...@gmail.com>.
Why does this not work?  Can you

WILL

On 4/13/07, Steven Shaw <st...@eiger.co.uk> wrote:
>
> It seems to be impossible to use velocimacro.context.localscope=true
> with Spring MVC Velocity support. Spring has a macro called springBind
> which side effects a global values called $status. Have the Velocity
> team any thoughts on ideal solutions to this problem?
>
> Cheers,
> Steve.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
> For additional commands, e-mail: user-help@velocity.apache.org
>
>


-- 
Forio Business Simulations

Will Glass-Husain
wglass@forio.com
www.forio.com

RE: velocimacro.context.localscope

Posted by Steven Shaw <st...@eiger.co.uk>.
> Why does this not work -- can you be more explicit?

The springBind macro is defined like this:

#macro( springBind $path )
    #if("$!springHtmlEscape" != "")
        #set( $status = $springMacroRequestContext.getBindStatus($path,
$springHtmlEscape) )
    #else
        #set( $status = $springMacroRequestContext.getBindStatus($path)
)
    #end
#end

My understand is that when using velocimacro.context.localscope=true,
the $status variable will be local to the macro. The $status variable is
supposed to be used by subsequent macros.

Steve.

On 4/13/07, Steven Shaw <st...@eiger.co.uk> wrote:
> It seems to be impossible to use velocimacro.context.localscope=true
> with Spring MVC Velocity support. Spring has a macro called springBind

> which side effects a global values called $status. Have the Velocity 
> team any thoughts on ideal solutions to this problem?
>
> Cheers,
> Steve.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
> For additional commands, e-mail: user-help@velocity.apache.org
>
>


--
Forio Business Simulations

Will Glass-Husain
wglass@forio.com
www.forio.com

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


Re: velocimacro.context.localscope

Posted by Will Glass-Husain <wg...@gmail.com>.
Why does this not work -- can you be more explicit?

On 4/13/07, Steven Shaw <st...@eiger.co.uk> wrote:
>
> It seems to be impossible to use velocimacro.context.localscope=true
> with Spring MVC Velocity support. Spring has a macro called springBind
> which side effects a global values called $status. Have the Velocity
> team any thoughts on ideal solutions to this problem?
>
> Cheers,
> Steve.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
> For additional commands, e-mail: user-help@velocity.apache.org
>
>


-- 
Forio Business Simulations

Will Glass-Husain
wglass@forio.com
www.forio.com