Fix error in tagData remove action.

This commit is contained in:
Christian P. MOMON 2010-02-24 16:54:53 +01:00
parent 58ffaea88d
commit e473833ccc

View file

@ -117,11 +117,11 @@ public class Presenter
/* /*
* *
*/ */
static protected StringBuffer processChildren (Node node, IdsDataById datas, String webappPath, StringBuffer errorOutput) static protected StringBuffer processChildren (Node node, IdsDataById datas, StringBuffer errorOutput)
{ {
StringBuffer result; StringBuffer result;
result = processChildren (node, datas, webappPath, "", errorOutput); result = processChildren (node, datas, "", errorOutput);
// //
return (result); return (result);
@ -133,7 +133,6 @@ public class Presenter
*/ */
static protected StringBuffer processChildren (Node node, static protected StringBuffer processChildren (Node node,
IdsDataById datas, IdsDataById datas,
String webappPath,
String suffix, String suffix,
StringBuffer errorOutput) StringBuffer errorOutput)
{ {
@ -288,13 +287,12 @@ public class Presenter
NamedNodeMap attrs, NamedNodeMap attrs,
Node idAttr, Node idAttr,
IdsDataById datas, IdsDataById datas,
String webappPath,
StringBuffer errorOutput) StringBuffer errorOutput)
{ {
StringBuffer result; StringBuffer result;
result = processElementWithId (node, attrs, idAttr, datas, "", webappPath, errorOutput); result = processElementWithId (node, attrs, idAttr, datas, "", errorOutput);
// //
return (result); return (result);
@ -316,7 +314,6 @@ public class Presenter
NamedNodeMap attrs, NamedNodeMap attrs,
Node idAttr, Node idAttr,
IdsDataById datas, IdsDataById datas,
String webappPath,
String suffix, String suffix,
StringBuffer errorOutput) StringBuffer errorOutput)
{ {
@ -334,7 +331,7 @@ public class Presenter
if (dataCore == null) if (dataCore == null)
{ {
result.append (Presenter.processElementBasically (node, datas, webappPath, suffix, errorOutput)); result.append (Presenter.processElementBasically (node, datas, suffix, errorOutput));
} }
else if (dataCore instanceof IdData) else if (dataCore instanceof IdData)
{ {
@ -376,7 +373,7 @@ public class Presenter
if ((data == null) || if ((data == null) ||
(data.display () == null)) (data.display () == null))
{ {
result.append (processChildren (node, datas, webappPath, suffix, errorOutput)); result.append (processChildren (node, datas, suffix, errorOutput));
} }
else else
{ {
@ -423,7 +420,7 @@ public class Presenter
// Insert data. // Insert data.
if ((data == null) || (data.display () == null)) if ((data == null) || (data.display () == null))
{ {
result.append (processChildren (node, datas, webappPath, suffix, errorOutput)); result.append (processChildren (node, datas, suffix, errorOutput));
} }
else else
{ {
@ -441,7 +438,7 @@ public class Presenter
// Manage a Hashmap. // Manage a Hashmap.
IdsDataById data = (IdsDataById) tags.elementAt (nLine); IdsDataById data = (IdsDataById) tags.elementAt (nLine);
result.append (Presenter.processElementWithId (node, attrs, idAttr, data, webappPath, Integer.toString (nLine), errorOutput)); result.append (Presenter.processElementWithId (node, attrs, idAttr, data, Integer.toString (nLine), errorOutput));
result.append ('\n'); result.append ('\n');
} }
} }
@ -478,7 +475,7 @@ public class Presenter
*/ */
static protected StringBuffer process (Node node, IdsDataById datas, String suffix, StringBuffer errorOutput) static protected StringBuffer process (Node node, IdsDataById datas, String suffix, StringBuffer errorOutput)
{ {
logger.debug ("Enter"); logger.debug ("process - started");
String TRANSITIONAL_DTD = "xhtml1-transitional.dtd"; String TRANSITIONAL_DTD = "xhtml1-transitional.dtd";
String TRANSITIONAL_DOCTYPE = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 " String TRANSITIONAL_DOCTYPE = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 "
+ "Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n"; + "Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n";
@ -602,7 +599,7 @@ public class Presenter
// //
//logger.info ("result=" + result); //logger.info ("result=" + result);
logger.debug ("Exit"); logger.debug ("process - ended");
return (result); return (result);
} }
@ -610,11 +607,11 @@ public class Presenter
/* /*
* *
*/ */
static StringBuffer processElementBasically (Node node, IdsDataById datas, String webappPath, StringBuffer errorOutput) static StringBuffer processElementBasically (Node node, IdsDataById datas,StringBuffer errorOutput)
{ {
StringBuffer result; StringBuffer result;
result = processElementBasically (node, datas, webappPath, "", errorOutput); result = processElementBasically (node, datas, "", errorOutput);
// //
return (result); return (result);
@ -624,15 +621,24 @@ public class Presenter
/* /*
* *
*/ */
static StringBuffer processElementBasically (Node node, IdsDataById datas, String webappPath, String suffix, StringBuffer errorOutput) static StringBuffer processElementBasically (Node node, IdsDataById datas, String suffix, StringBuffer errorOutput)
{ {
StringBuffer result; StringBuffer result;
logger.debug("processElementBasically - started");
result = new StringBuffer (); result = new StringBuffer ();
// Open the tag. // Open the tag.
result.append ('<'); result.append ('<');
result.append (node.getNodeName()); result.append (node.getNodeName());
// Build the tag attributes.
Attributes tagAttributes;
result.append (processAttributes (node.getAttributes (),
null,
suffix));
// //
if (node.getChildNodes () == null) if (node.getChildNodes () == null)
{ {
@ -642,13 +648,14 @@ public class Presenter
{ {
result.append('>'); result.append('>');
result.append (processChildren (node, datas, webappPath, suffix, errorOutput)); result.append (processChildren (node, datas, suffix, errorOutput));
result.append("</"); result.append("</");
result.append(node.getNodeName()); result.append(node.getNodeName());
result.append('>'); result.append('>');
} }
logger.debug("processElementBasically - ended");
// //
return (result); return (result);