From a8a9bcbeacff1f766998803d5b256cd8fcaeb0bd Mon Sep 17 00:00:00 2001 From: Scott Murphy Date: Sun, 27 Aug 2023 16:56:50 -0700 Subject: [PATCH] Add config to sitemesh3.xml to allow setting decorator prefix --- .../org/sitemesh/config/xml/XmlFilterConfigurator.java | 7 ++++++- sitemesh/src/main/resources/org/sitemesh/sitemesh3.xsd | 3 +++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/sitemesh/src/main/java/org/sitemesh/config/xml/XmlFilterConfigurator.java b/sitemesh/src/main/java/org/sitemesh/config/xml/XmlFilterConfigurator.java index 0ef64adb..2298ad42 100644 --- a/sitemesh/src/main/java/org/sitemesh/config/xml/XmlFilterConfigurator.java +++ b/sitemesh/src/main/java/org/sitemesh/config/xml/XmlFilterConfigurator.java @@ -30,7 +30,12 @@ public XmlFilterConfigurator(ObjectFactory objectFactory, Element siteMeshElemen if (customDecoratorSelector != null) { builder.setCustomDecoratorSelector((DecoratorSelector) getObjectFactory().create(customDecoratorSelector)); } - + + String decoratorPrefix = xml.child("decorator-prefix").text(); + if (decoratorPrefix != null) { + builder.setDecoratorPrefix(decoratorPrefix); + } + // Error pages inclusion String includeErrorPagesString = xml.child("include-error-pages").text("false"); if ("true".equals(includeErrorPagesString) || "1".equals(includeErrorPagesString)) { diff --git a/sitemesh/src/main/resources/org/sitemesh/sitemesh3.xsd b/sitemesh/src/main/resources/org/sitemesh/sitemesh3.xsd index fb0d980b..5b346773 100644 --- a/sitemesh/src/main/resources/org/sitemesh/sitemesh3.xsd +++ b/sitemesh/src/main/resources/org/sitemesh/sitemesh3.xsd @@ -12,6 +12,9 @@ +