开发者

Apache Velocity foreach loop #continue

开发者 https://www.devze.com 2023-04-08 11:37 出处:网络
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 an

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消