Example usage for javax.servlet.jsp.jstl.core LoopTagSupport getLoopStatus

List of usage examples for javax.servlet.jsp.jstl.core LoopTagSupport getLoopStatus

Introduction

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

Prototype

public LoopTagStatus getLoopStatus() 

Source Link

Usage

From source file:com.jada.taglib.language.LanguageTagSupport.java

public String findName() {
    if (indexed == null || !indexed.equals("true")) {
        return property;
    }/*from   w  ww  . jav  a2s .c o  m*/
    LoopTagSupport loopTag = (LoopTagSupport) TagSupport.findAncestorWithClass(this, LoopTagSupport.class);

    String result = "";
    result += name + "[" + loopTag.getLoopStatus().getIndex() + "]." + property;
    return result;
}

From source file:com.jada.taglib.language.LanguageTagSupport.java

public String findName(String prop) {
    if (indexed == null || !indexed.equals("true")) {
        return prop;
    }/*from  w  ww.j av a2 s.  c om*/
    LoopTagSupport loopTag = (LoopTagSupport) TagSupport.findAncestorWithClass(this, LoopTagSupport.class);

    String result = "";
    result += name + "[" + loopTag.getLoopStatus().getIndex() + "]." + prop;
    return result;
}