Try #set($value1="${value1}WCC")

So value1 is set to the String within the quotes. That String is written as you 
would any String in a Velocity template, but within quotes.



Barbara Baughman
Systems Analyst
X2157


Anil h k wrote:
Hi Alexander.

compare does not work, in a variable say "a" i have Quebec,Northen territory
(these are the selected values from the multiple checkboxes) now say if in "a" I have quebec I need to set a value for varible as WCC.
then if "a" has "northen territory" I need to set is as "wcc" + wccB" this
wccb will get  added (concatinate) if northern territory is present.

any idea how this works ? i tried concatincation but the output comes as wcc
+ wccb :(

Alexander Krasnukhin wrote:
Are you sure about *compare*?

On 25 March 2010 01:20, Robert Lee <[email protected]> wrote:

compare:   #if($a = "test")
assign:    #set($a = "test")



On 3/24/2010 2:47 PM, Anil h k wrote:

Hi ,

I am trying to read a multiple checkbox in velocity this is my code.

#foreach( $additional_province in
$opportunity.additional_provinces_821102568)
{
       #if ($opportunity.additional_provinces_821102568.checked == true)
       {
               #if ($opportunity.additional_provinces_821102568.value ==
"Quebec")
               {
                       #set($value1 = "CSST");
               }
               #end
               #if (additional_provinces_821102568.value == "Ontario")
               {
                       #set($value1 = $value1 + "WSIB");
               }
               #else
               {
                       #set($value1 = $value1 + "WSB");
               }
               #end
       }
       #end
}
#end

can anyone let me know what is wrong in this.. i just cannot get this
right
.

thanks !


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



--
Regards,
Alexander




---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to