I need to send some data to an external service that interacts with my
application. It's just a group of ids and values that the service needs. The
real code that I have is:
#set
($query="id_maq=escape($!{idMaq})&referer=escape($!{referer})&urlv=escape($!{urlv})&urlf=escape($!{idMaq}$!{url})&serv=escape($!{serv})")
The problem is that when any of the variables is null it tries to
"escape(null)", which I don't want. I only want to escape the values that I
do have.
Christopher Schultz-2 wrote:
>
> andyandy,
>
> andyandy wrote:
>> Hello. I want to do the following:
>>
>> #if ($a!="")
>> #set "${all}escape(${a})"
>> #end
>> #if ($b!="")
>> #set "${all}escape(${b})"
>> #end
>> #if ($c!="")
>> #set "${all}escape(${c})"
>> #end
>>
>> $all
>
> Can you give some sample data and expected output? I'm not entirely sure
> what you want to accomplish, here.
>
> -chris
>
>
>
>
--
View this message in context:
http://www.nabble.com/problem-parsing-references-in-Velocity-tp17741235p17787746.html
Sent from the Velocity - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]