congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
LoopTag
Code IndexAdd Tabnine to your IDE (free)

How to use
LoopTag
in
jodd.servlet.tag

Best Java code snippets using jodd.servlet.tag.LoopTag (Showing top 4 results out of 315)

origin: oblac/jodd

/**
 * Sets loop count.
 */
public void setCount(final int count) {
  setEnd(count);
  isCount = true;
}
origin: oblac/jodd

loopTag.setStart(0);
loopTag.setEnd(2);
loopTag.doTag();
loopTag.setStep(2);
loopTag.doTag();
assertEquals(2, jspFragment.count);
loopTag.setEnd(5);
loopTag.setStep(1);
loopTag.doTag();
assertEquals(6, jspFragment.count);
loopTag.setStatus("s");
loopTag.doTag();
assertNull(jspContext.getAttribute("s"));    // attribute was cleared
loopTag.setModulus(3);
loopTag.doTag();
origin: oblac/jodd

  @Override
  public void doTag() throws JspException {
    if (!isEndSpecified) {
      throw new IllegalArgumentException("End boundary of the loop is not specified");
    }

    prepareStepDirection();
    if (isCount) {
      if (end < 0) {
        throw new IllegalArgumentException("Negative count value");
      }
      end = start + step * (end - 1);
    }
    prepareStepDirection(autoDirection, false);


    // exclusive
    if (isExclusive) {
      if (step > 0) {
        this.end--;
      } else if (step < 0) {
        this.end++;
      }
    }

    loopBody();
  }
}
origin: oblac/jodd

/**
 * Sets TO loop value (exclusive).
 */
public void setTo(final int to) {
  setEnd(to);
  isExclusive = true;
}
jodd.servlet.tagLoopTag

Javadoc

Loop tag performs enhanced looping in both directions.

Most used methods

  • setEnd
  • doTag
  • loopBody
  • prepareStepDirection
  • setModulus
  • setStart
  • setStatus
  • setStep

Popular in Java

  • Running tasks concurrently on multiple threads
  • getContentResolver (Context)
  • requestLocationUpdates (LocationManager)
  • runOnUiThread (Activity)
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • Menu (java.awt)
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now