no data content is now possible with null value.
This commit is contained in:
parent
ca2d4dd5f3
commit
1822b651c8
3 changed files with 21 additions and 15 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue