Example usage for javax.servlet.jsp.jstl.core LoopTagStatus getCount

List of usage examples for javax.servlet.jsp.jstl.core LoopTagStatus getCount

Introduction

In this page you can find the example usage for javax.servlet.jsp.jstl.core LoopTagStatus getCount.

Prototype

public int getCount();

Source Link

Document

Retrieves the "count" of the current round of the iteration.

Usage

From source file:net.longfalcon.taglib.TextFunctions.java

public static String cycle(LoopTagStatus loopTagStatus, String... strings) {
    int cycle = loopTagStatus.getCount() % strings.length;
    return (strings[cycle]);
}