This is an automated email from the ASF dual-hosted git repository. rombert pushed a commit to annotated tag org.apache.sling.jcr.webconsole-1.0.0 in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-webconsole.git
commit 458f2c64fadf3aaad4e9ec770961bbcf811daac8 Author: Justin Edelson <[email protected]> AuthorDate: Wed Nov 10 01:57:23 2010 +0000 SLING-1868 - adding FELIX-2570 service property git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/webconsole@1033322 13f79535-47bb-0310-9956-ffa450edef68 --- .../internal/NodeTypeConfigurationPrinter.java | 27 +++++++++++++++------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/src/main/java/org/apache/sling/jcr/webconsole/internal/NodeTypeConfigurationPrinter.java b/src/main/java/org/apache/sling/jcr/webconsole/internal/NodeTypeConfigurationPrinter.java index b075b02..47d561a 100644 --- a/src/main/java/org/apache/sling/jcr/webconsole/internal/NodeTypeConfigurationPrinter.java +++ b/src/main/java/org/apache/sling/jcr/webconsole/internal/NodeTypeConfigurationPrinter.java @@ -44,8 +44,11 @@ import org.apache.sling.jcr.api.SlingRepository; */ @Component(label = "%nodetype.printer.name", description = "%nodetype.printer.description", metatype = false) @Service(ConfigurationPrinter.class) -@Properties({ @Property(name = "service.description", value = "JCR Nodetype Configuration Printer"), - @Property(name = "service.vendor", value = "The Apache Software Foundation") }) +@Properties({ + @Property(name = "service.description", value = "JCR Nodetype Configuration Printer"), + @Property(name = "service.vendor", value = "The Apache Software Foundation"), + @Property(name = "felix.webconsole.configprinter.web.unescaped", boolValue = true) +}) public class NodeTypeConfigurationPrinter implements ModeAwareConfigurationPrinter { @Reference(policy = ReferencePolicy.DYNAMIC) @@ -82,7 +85,7 @@ public class NodeTypeConfigurationPrinter implements ModeAwareConfigurationPrint if (nt.isMixin()) { pw.print(" mixin"); } - pw.println(); + linebreak(pw, mode); for (PropertyDefinition prop : nt.getPropertyDefinitions()) { if (prop.getDeclaringNodeType() == nt) { @@ -113,7 +116,7 @@ public class NodeTypeConfigurationPrinter implements ModeAwareConfigurationPrint stopBold(pw, mode); } - pw.println(); + linebreak(pw, mode); } for (NodeDefinition child : nt.getChildNodeDefinitions()) { if (child.getDeclaringNodeType() == nt) { @@ -146,10 +149,10 @@ public class NodeTypeConfigurationPrinter implements ModeAwareConfigurationPrint stopBold(pw, mode); } - pw.println(); + linebreak(pw, mode); } - pw.println(); + linebreak(pw, mode); } } catch (RepositoryException e) { @@ -171,15 +174,23 @@ public class NodeTypeConfigurationPrinter implements ModeAwareConfigurationPrint } + private void linebreak(PrintWriter pw, String mode) { + if (ConfigurationPrinter.MODE_WEB.equals(mode)) { + pw.println("<br/>"); + } else { + pw.println(); + } + } + private void stopBold(PrintWriter pw, String mode) { if (ConfigurationPrinter.MODE_WEB.equals(mode)) { - // pw.print("</b>"); + pw.print("</b>"); } } private void startBold(PrintWriter pw, String mode) { if (ConfigurationPrinter.MODE_WEB.equals(mode)) { - // pw.print("<b>"); + pw.print("<b>"); } } -- To stop receiving notification emails like this one, please contact "[email protected]" <[email protected]>.
