Add TODO file.
This commit is contained in:
parent
f8cb652129
commit
3e6e9c87a0
3 changed files with 64 additions and 4 deletions
7
TODO
Normal file
7
TODO
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
|
||||||
|
20070126, to Epo:
|
||||||
|
<div id="zob">bla</div>
|
||||||
|
<div>blabla</div>
|
||||||
|
datas.setAttribute ("<div>", "class", "border-color: red;")
|
||||||
|
|
||||||
|
content too.
|
|
@ -298,10 +298,63 @@ public class Presenter
|
||||||
|
|
||||||
// TODO Analyze IterationStragy if datas is a TagsData.
|
// TODO Analyze IterationStragy if datas is a TagsData.
|
||||||
|
|
||||||
|
// Determine
|
||||||
|
NamedNodeMap attrs = node.getAttributes ();
|
||||||
|
Node idAttr = attrs.getNamedItem ("id");
|
||||||
|
String tag = node.getNodeName();
|
||||||
|
String idValue = idAttr.getNodeValue();
|
||||||
|
|
||||||
|
TagDataCore tagDataCore = datas.getId (idValue);
|
||||||
|
if (tagDataCore instanceof TagsDataByIndex)
|
||||||
|
{
|
||||||
|
TagsDataByIndex tagsData = (TagsDataByIndex) tagDataCore;
|
||||||
|
switch (tagsData.getIterationStrategy ())
|
||||||
|
{
|
||||||
|
case TagsDataByIndex.ONLY_FIRST_ROW:
|
||||||
|
result.append (process (children.item (0), datas, webappPath, prefix, errorOutput));
|
||||||
|
break;
|
||||||
|
|
||||||
|
case TagsDataByIndex.ONLY_ROWS_WITH_ID:
|
||||||
|
for (int i = 0; i < childrenCount; i++)
|
||||||
|
{
|
||||||
|
NamedNodeMap attrs2 = children.item (i);
|
||||||
|
Node idAttr2 = attrs2.getNamedItem ("id");
|
||||||
|
|
||||||
|
if (idAttr2 != null)
|
||||||
|
{
|
||||||
|
result.append (process (children.item(i), datas, webappPath, prefix, errorOutput));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case TagsDataByIndex.ONLY_ROWS_WITHOUT_ID:
|
||||||
|
for (int i = 0; i < childrenCount; i++)
|
||||||
|
{
|
||||||
|
NamedNodeMap attrs2 = children.item (i);
|
||||||
|
Node idAttr2 = attrs2.getNamedItem ("id");
|
||||||
|
|
||||||
|
if (idAttr2 == null)
|
||||||
|
{
|
||||||
|
result.append (process (children.item(i), datas, webappPath, prefix, errorOutput));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case TagsDataByIndex.ALL_ROWS:
|
||||||
for (int i = 0; i < childrenCount; i++)
|
for (int i = 0; i < childrenCount; i++)
|
||||||
{
|
{
|
||||||
result.append (process (children.item(i), datas, webappPath, prefix, errorOutput));
|
result.append (process (children.item(i), datas, webappPath, prefix, errorOutput));
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
for (int i = 0; i < childrenCount; i++)
|
||||||
|
{
|
||||||
|
result.append (process (children.item(i), datas, webappPath, prefix, errorOutput));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
|
@ -8,7 +8,7 @@ import java.io.*;
|
||||||
*/
|
*/
|
||||||
public class TagsDataByIndex extends Vector<TagDataCore> implements TagDataCore
|
public class TagsDataByIndex extends Vector<TagDataCore> implements TagDataCore
|
||||||
{
|
{
|
||||||
public enum IterationStrategy {ONLY_FIRST_ROW, ONLY_ROW_WITH_ID, ONLY_ROW_WITHOU_ID, ALL_ROWS}
|
public enum IterationStrategy {ONLY_FIRST_ROW, ONLY_ROWS_WITH_ID, ONLY_ROWS_WITHOU_ID, ALL_ROWS}
|
||||||
|
|
||||||
protected IterationStrategy iterationStrategy;
|
protected IterationStrategy iterationStrategy;
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ public class TagsDataByIndex extends Vector<TagDataCore> implements TagDataCore
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public IterationStrategy setIterationStrategy ()
|
public IterationStrategy getIterationStrategy ()
|
||||||
{
|
{
|
||||||
IterationStrategy result;
|
IterationStrategy result;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue