Apache Velocity foreach loop #continue
Is there a #continue
command for jump to nex开发者_如何转开发t iteration in foreach
loop?
I have a bunch of velocity code but I don't think I've ever seen this. I believe you have to use a #foreach
and then use and #if
to check your skip condition within the loop. The VTL guide doesn't seem have a better approach.
Based on the documentation, Apache Velocity does not appear to have a #continue function for its foreach loop.
In case it might help, it does have a foreach break directive, added in 2008.
精彩评论