You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Pascual Queralt <pq...@yahoo.es> on 2006/03/31 18:33:03 UTC
Printing the contents of a String variable
Well, I have a problem printing the contents of a variable, but it only
happens sometimes and it's getting me crazy because I don't know why.
As you can see in the code below , I call to the Java method parseOcl2Maude
ant it returns a string. This string is printed I after that or at least it
shoult do it , because it is only printed sometimes.
#* *##set($sResult =
${i_oeExp2.parseOCL2Maude(${io_sExpVal.trim()},${sContext.trim()},
${sModelName.trim ()})} ) ##
$sResult ##
Nevertheless, if a put the next code it prints the result
#* *##set($sResult =
${i_oeExp2.parseOCL2Maude(${io_sExpVal.trim()},${sContext.trim()},
${sModelName.trim ()})} ) ##
$sResult +-+
${i_oeExp2.parseOCL2Maude(${io_sExpVal.trim()},${sContext.trim()},
${sModelName.trim ()})}##
Does anybody know why? Any help will be great.
Many thanks.
Pascual
----- Original Message -----
From: "Gunnar Wagenknecht" <gu...@wagenknecht.org>
To: <ve...@jakarta.apache.org>
Sent: Tuesday, March 28, 2006 8:49 PM
Subject: Re: Macro not executed on first load
> Gunnar Wagenknecht wrote:
>> I've defined a macro in a file that is included in a template using
>> #parse. On the first page load the macro call is not executed but
>> printed as is. If I reload the page immediately it works as desired.
>
> Some additional debug output. The first time the include file is parsed
> I get something like the following statement.
>
> ---
> Velocimacro : added new VM : #myMacro( ... )
> ---
>
> However, on every reload, I get the following log output.
>
> ---
> Velocimacro : VM addition rejected : myMacro: inline not allowed to
> replace existing VM
> ---
>
> Cu, Gunnar
>
>
>
> --
> Gunnar Wagenknecht
> gunnar@wagenknecht.org
> http://wagenknecht.org/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-user-help@jakarta.apache.org
>
______________________________________________
LLama Gratis a cualquier PC del Mundo.
Llamadas a fijos y móviles desde 1 céntimo por minuto.
http://es.voice.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org