Contanate two strings in velocity -
i try contanate 2 strings in velocity build html table. want e.g. in java +=. possibility that? can't find something.
sourcecode looks this, know operation += doens't work:
#foreach ($event in $allevents) #set ($longstring = $longstring += "<th>$event</th>") #end
somebody idea how solve without array?
that be:
#foreach ($event in $allevents) #set ($longstring = "$!longstring<th>$event</th>") #end
or (maybe faster):
#set($longstring = '') #foreach ($event in $allevents) #set ($longstring = $longstring.concat("<th>$event</th>")) #end
Comments
Post a Comment