ONLY_FIRST_ROW perfectionist act.
This commit is contained in:
parent
c5893435ec
commit
1b32ee50f7
6 changed files with 24 additions and 6 deletions
Binary file not shown.
Binary file not shown.
BIN
dist/test.jar
vendored
BIN
dist/test.jar
vendored
Binary file not shown.
BIN
dist/xid.jar
vendored
BIN
dist/xid.jar
vendored
Binary file not shown.
|
@ -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");
|
||||
|
|
|
@ -222,7 +222,6 @@ class Test
|
|||
source.append (" <tr><td>noid</td><td id='nom3'>un nom</td><td id='prenom3'>un prenom</td></tr>\n");
|
||||
source.append ("</table>");
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue