diff --git a/src/xid/IdData.java b/src/xid/IdData.java index 60c2eb0..708e8bb 100644 --- a/src/xid/IdData.java +++ b/src/xid/IdData.java @@ -37,7 +37,7 @@ public class IdData implements Serializable, IdDataCore this.attributes = null; this.excludeSection = false; this.displayMode = MODE.REPLACE; - this.content = ""; + this.content = null; this.iterationStrategy = IterationStrategy.ALL_ROWS; } @@ -62,14 +62,7 @@ public class IdData implements Serializable, IdDataCore { String result; - if (this.content == null) - { - result = ""; - } - else - { - result = this.content; - } + result = this.content; // return (result); @@ -90,7 +83,14 @@ public class IdData implements Serializable, IdDataCore */ public void appendContent (String text) { - this.content += text; + if (this.content == null) + { + this.content = text; + } + else + { + this.content += text; + } } diff --git a/src/xid/Presenter.java b/src/xid/Presenter.java index faeb250..5924e87 100644 --- a/src/xid/Presenter.java +++ b/src/xid/Presenter.java @@ -538,7 +538,7 @@ public class Presenter result.append (processAttributes (attrs, data.getAttributes (), tagAttributes, suffix)); if ((node.getChildNodes () == null) && - ((data == null) || data.display ().equals (""))) + ((data == null) || (data.display () == null))) { // Close the tag. result.append (" />"); @@ -547,9 +547,11 @@ public class Presenter { result.append ('>'); + // CHANGED, cpm: + // Insert data. if ((data == null) || - (data.display ().equals (""))) + (data.display () == null)) { 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))); if ((node.getChildNodes () == null) && - ((data == null) || data.display ().equals (""))) + ((data == null) || (data.display () == null))) { // Close the tag. result.append (" />\n"); @@ -611,9 +613,11 @@ public class Presenter { result.append ('>'); + + // CHANGED, cpm + // Insert data. - if ((data == null) || - (data.display ().equals (""))) + if ((data == null) || (data.display () == null)) { result.append (processChildren (node, datas, tagsData, webappPath, suffix, errorOutput)); } diff --git a/test/xid/test/Test.java b/test/xid/test/Test.java index 8bc4307..b12acf6 100644 --- a/test/xid/test/Test.java +++ b/test/xid/test/Test.java @@ -60,6 +60,7 @@ class Test 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!"); + Data datas; IdData tag;