no data content is now possible with null value.

This commit is contained in:
administrateur 2007-03-09 16:11:38 +01:00
parent ca2d4dd5f3
commit 1822b651c8
3 changed files with 21 additions and 15 deletions

View file

@ -37,7 +37,7 @@ public class IdData implements Serializable, IdDataCore
this.attributes = null; this.attributes = null;
this.excludeSection = false; this.excludeSection = false;
this.displayMode = MODE.REPLACE; this.displayMode = MODE.REPLACE;
this.content = ""; this.content = null;
this.iterationStrategy = IterationStrategy.ALL_ROWS; this.iterationStrategy = IterationStrategy.ALL_ROWS;
} }
@ -62,14 +62,7 @@ public class IdData implements Serializable, IdDataCore
{ {
String result; String result;
if (this.content == null)
{
result = "";
}
else
{
result = this.content; result = this.content;
}
// //
return (result); return (result);
@ -89,9 +82,16 @@ public class IdData implements Serializable, IdDataCore
* *
*/ */
public void appendContent (String text) public void appendContent (String text)
{
if (this.content == null)
{
this.content = text;
}
else
{ {
this.content += text; this.content += text;
} }
}
/* /*

View file

@ -538,7 +538,7 @@ public class Presenter
result.append (processAttributes (attrs, data.getAttributes (), tagAttributes, suffix)); result.append (processAttributes (attrs, data.getAttributes (), tagAttributes, suffix));
if ((node.getChildNodes () == null) && if ((node.getChildNodes () == null) &&
((data == null) || data.display ().equals (""))) ((data == null) || (data.display () == null)))
{ {
// Close the tag. // Close the tag.
result.append (" />"); result.append (" />");
@ -547,9 +547,11 @@ public class Presenter
{ {
result.append ('>'); result.append ('>');
// CHANGED, cpm:
// Insert data. // Insert data.
if ((data == null) || if ((data == null) ||
(data.display ().equals (""))) (data.display () == null))
{ {
result.append (processChildren (node, datas, tagsData, webappPath, suffix, errorOutput)); result.append (processChildren (node, datas, tagsData, webappPath, suffix, errorOutput));
} }
@ -602,7 +604,7 @@ public class Presenter
result.append (processAttributes (attrs, data.getAttributes (), tagAttributes, Integer.toString (nLine))); result.append (processAttributes (attrs, data.getAttributes (), tagAttributes, Integer.toString (nLine)));
if ((node.getChildNodes () == null) && if ((node.getChildNodes () == null) &&
((data == null) || data.display ().equals (""))) ((data == null) || (data.display () == null)))
{ {
// Close the tag. // Close the tag.
result.append (" />\n"); result.append (" />\n");
@ -611,9 +613,11 @@ public class Presenter
{ {
result.append ('>'); result.append ('>');
// CHANGED, cpm
// Insert data. // Insert data.
if ((data == null) || if ((data == null) || (data.display () == null))
(data.display ().equals ("")))
{ {
result.append (processChildren (node, datas, tagsData, webappPath, suffix, errorOutput)); result.append (processChildren (node, datas, tagsData, webappPath, suffix, errorOutput));
} }

View file

@ -60,6 +60,7 @@ class Test
return (result); return (result);
} }
public enum MONTHS {JANUARY, FEBRUARY, MARCH, APRIL, MAY, JUNE, JULY, AUGUST, SEPTEMBER, OCTOBER, NOVEMBRE, DECEMBRE};
/** /**
* *
@ -68,6 +69,7 @@ class Test
{ {
System.out.println("Automatic test action for Xid!"); System.out.println("Automatic test action for Xid!");
Data datas; Data datas;
IdData tag; IdData tag;