diff --git a/build/classes/xid/Presenter.class b/build/classes/xid/Presenter.class index 77f9c06..2f5b08e 100644 Binary files a/build/classes/xid/Presenter.class and b/build/classes/xid/Presenter.class differ diff --git a/build_test/classes/xid/test/Test.class b/build_test/classes/xid/test/Test.class index f4e1f03..a2560f4 100644 Binary files a/build_test/classes/xid/test/Test.class and b/build_test/classes/xid/test/Test.class differ diff --git a/dist/test.jar b/dist/test.jar index ef44092..ffe9f01 100644 Binary files a/dist/test.jar and b/dist/test.jar differ diff --git a/dist/xid.jar b/dist/xid.jar index e264bab..433fd7c 100644 Binary files a/dist/xid.jar and b/dist/xid.jar differ diff --git a/src/xid/Presenter.java b/src/xid/Presenter.java index f08d1f7..c9d2834 100644 --- a/src/xid/Presenter.java +++ b/src/xid/Presenter.java @@ -385,7 +385,10 @@ public class Presenter switch (tagsData.getIterationStrategy ()) { case ONLY_FIRST_ROW: - result.append (process (child, datas, webappPath, prefix, errorOutput)); + for (int i = 0; i <= childIndex; i++) + { + result.append (process (children.item (i), datas, webappPath, prefix, errorOutput)); + } break; case ONLY_ROWS_WITH_ID: @@ -704,10 +707,6 @@ public class Presenter } } } - else if (dataCore instanceof TagsDataById) - { - TagsDataById data = (TagsDataById) dataCore; - } else { log.warn ("Unknow type of TagDataId"); diff --git a/test/xid/test/Test.java b/test/xid/test/Test.java index 4ee5a0c..f827eb9 100644 --- a/test/xid/test/Test.java +++ b/test/xid/test/Test.java @@ -222,7 +222,6 @@ class Test source.append (" noidun nomun prenom\n"); source.append (""); htmlSource = source.toString (); - html = Presenter.doXid (htmlSource, datas, "", errorMessage); System.out.println ("----------------------------"); System.out.println ("datas = new TagsData ();"); @@ -236,6 +235,26 @@ class Test System.out.println ("+"); System.out.println (htmlSource); System.out.println ("=>"); + + + datas.setIterationStrategy ("identity", TagsDataByIndex.IterationStrategy.ONLY_FIRST_ROW); + System.out.println ("ONLY_FIRST_ROW:"); + html = Presenter.doXid (htmlSource, datas, "", errorMessage); + System.out.println (html); + + datas.setIterationStrategy ("identity", TagsDataByIndex.IterationStrategy.ONLY_ROWS_WITH_ID); + System.out.println ("ONLY_ROWS_WITH_ID:"); + html = Presenter.doXid (htmlSource, datas, "", errorMessage); + System.out.println (html); + + datas.setIterationStrategy ("identity", TagsDataByIndex.IterationStrategy.ONLY_ROWS_WITHOUT_ID); + System.out.println ("ONLY_ROWS_WITHOUT_ID:"); + html = Presenter.doXid (htmlSource, datas, "", errorMessage); + System.out.println (html); + + datas.setIterationStrategy ("identity", TagsDataByIndex.IterationStrategy.ALL_ROWS); + System.out.println ("ALL_ROWS:"); + html = Presenter.doXid (htmlSource, datas, "", errorMessage); System.out.println (html); } }