Uploaded image for project: 'Commons Jelly'
  1. Commons Jelly
  2. JELLY-164

New Tag for parallel iteration

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 1.0-beta-5
    • None
    • core / taglib.core
    • None
    • JDK 1.4_02 Windows XP

    Description

      IterateTag is like org.apache.commons.jelly.tags.core.ForEachTag but can iterate over several collections. Where org.apache.commons.jelly.tags.core.ForEachTag iterate over one collection and set Value in one variable like :
      <forEach var="oneVar" items="oneCollection">
      <do something value="${oneVar}"/>
      </forEach>

      IterateTag is like :

      <iterate var="var_1;var_2;...;var_P" items="Collection_1;Collection_2;....;Collection_P">
      <do something value="${var_1} ${var_2} ${var_3}"/>
      </iterate>

      Each Collection points at next element at the same time.

      Over the n iteration, for j = 1 to P : var_j = Collection_j.get;
      IterateTag stop on the first ended collection, so n = Min( Collection_1.size(), ..., Collection_P.size());

      Attachments

        1. patchIterateTag.txt
          6 kB
          Marc DeXeT
        2. testIterateTag.jelly
          3 kB
          Marc DeXeT
        3. TestIterateTag.java
          0.5 kB
          Marc DeXeT
        4. IterateTag.java
          5 kB
          Marc DeXeT

        Activity

          People

            Unassigned Unassigned
            marc_dexet Marc DeXeT
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: