projects
/
lgpl
/
argeo-commons.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Improve ACR print
[lgpl/argeo-commons.git]
/
org.argeo.cms
/
src
/
org
/
argeo
/
cms
/
acr
/
ContentUtils.java
diff --git
a/org.argeo.cms/src/org/argeo/cms/acr/ContentUtils.java
b/org.argeo.cms/src/org/argeo/cms/acr/ContentUtils.java
index facb5933bf3ebe743ce99eeed8e57c300d0cb11b..f01a3b017569e78dc7796748b1deb70d12195790 100644
(file)
--- a/
org.argeo.cms/src/org/argeo/cms/acr/ContentUtils.java
+++ b/
org.argeo.cms/src/org/argeo/cms/acr/ContentUtils.java
@@
-55,15
+55,20
@@
public class ContentUtils {
sb.append(" ");
}
String prefix = sb.toString();
sb.append(" ");
}
String prefix = sb.toString();
- out.println(prefix + content.getName());
- for (QName key : content.keySet()) {
- out.println(prefix + " " + key + "=" + content.get(key));
- }
+ String txt = "";
if (printText) {
if (content.hasText()) {
if (printText) {
if (content.hasText()) {
- out.println("<![CDATA[" + content.getText().trim() + "]]>");
+ final int MAX_LENGTH = 64;
+ txt = content.getText().trim();
+ if (txt.length() > MAX_LENGTH)
+ txt = txt.substring(0, 64) + " ...";
+ txt = " : " + txt;
}
}
}
}
+ out.println(prefix + content.getName() + txt);
+ for (QName key : content.keySet()) {
+ out.println(prefix + " " + key + "=" + content.get(key));
+ }
}
// public static <T> boolean isString(T t) {
}
// public static <T> boolean isString(T t) {