Greetings to everybody,

I am new to Velocity and currently I�m using it to create a javascript file, which is 
the configuration for a dynamic menu.

The specific part of my script that is not printing fine is:



...                     

Menu$counterL1=new 
Array("$pull.getDisplay()","$pull.url","",#countChildren($pull.getItemList() 
$counter)$counter,#firstLevelHeight($menu.barMenu 
$height)$height,#firstLevelWidth($pull $width)$width,"","","","","","",-1,-1,-1,"","");
...
This fragment of code calls the macro:

#macro ( countChildren $allOptions $counter )
        #set( $counter=0 )
        #foreach($item in $allOptions)
                #if($permissions.contains($item.getSecurityId()))
                        #set( $counter=$counter+1 )
                #end
        #end
#end

.....

and is generating the output:

Menu2=new Array("File","/file.jsp","",                                                 
                                 2,5,80,"","","","","","",-1,-1,-1,"","");

With a couple of extra spaces in the fourth element of the array (just before the 2) 
which is where the macro gets called.

My question is how can I modify the macro to prevent extra blank spaces from appearing 
in the output generation....

Thanks to everyone for your time to read this.

Jorge Andr�s V�squez
Analista de Desarrollo 
PSL-Medellin



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to