}
@Override
public void doExecute(Map<String, Object> bindings, TagNode tag, Writer out) throws TemplateEvaluationException, IOException {
try {
Iter iter = new Iter();
int n = number.asInt(bindings);
for (int i = 0; i != n; i++) {
bindings.put(Expressions.CURRENT_OBJECT, i);
bindings.put(Expressions.ITER_OBJECT, iter);
tag.execute(bindings, out);
iter.next();
}
} catch (ExpressionEvaluationException e) {
throw new TemplateEvaluationException(e, "Could not execute the expression: " +
e.getMessage() + ", on line: " + tag.getBeginLine() + ", column: " +
tag.getBeginColumn(), tag.getBeginLine(), tag.getBeginColumn(), tag.getTagName());