velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Serge Matveenko <...@i-free.ru>
Subject Re: Regarding #set & newline
Date Fri, 25 Aug 2006 10:13:39 GMT
i think you might don't know that you can use $string.concat() method to
concatenate two strings
( http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html#concat(java.lang.String) )
try to assemble your query string in one variable and then use it in
ever place you want

On Птн, 2006-08-25 at 12:50 +0530, Santosh Puranshettiwar wrote:

> Consider:
> #set( $idNo = 0 )
> TestServlet?top_id=1#foreach($id in 
> [1..10])&amp;id:$idNo=$id#set($idNo=$idNo+1)#end#foreach($id in 
> [20..30])&amp;id:$idNo=$id#set($idNo=$idNo+1)#end
> 
> We all know #set does not rip-off the newline. Then what would be the 
> possible solution to make the above snippet work.
> 
> Santosh
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-user-help@jakarta.apache.org
> 

-- 
Serge Matveenko 
mailto:lig@i-free.ru 
http://company.i-free.ru 
+7 (911) 777 42 44 
+7 (905) 22 44 386 

"As I know more of mankind I expect less of them, and am ready now to
call a man a good man upon easier terms than I was formerly." 
Samuel Johnson



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message