I HATE velocity and rarely ever use it but sometimes I am called upon at my job to do so. I can never really figure out just how to use it.
I have this
#foreach( $product in $browseSiteProducts )
alert("$product.productId");
#foreach( $stringList in $product.productId.split("|") )
alert("inner loop");
#end
#end
$browseSiteProducts
is an Array. Or List. Or whatever. I don't even know. The first alert of the productId works fine. I get "<stuff>|<morestuff>
" which is what I expected when printed out. The inner loop then should split that on the "|" as the delimiter and give me to alerts of "inner loop". But instead I always get 24 alerts because there are 24 characters in the productId. so split() is not delimiting correctly for me. What the heck am I doing wrong??
Thanks Kyle