Skip to content

Commit

Permalink
Fix xml configuration issue. Set customDecoratorSelector before setti…
Browse files Browse the repository at this point in the history
…ngs paths such that if it extends PathBasedDecoratorSelector, the paths will be correctly applied.
  • Loading branch information
codeconsole committed Oct 25, 2023
1 parent 1010b85 commit 408077f
Showing 1 changed file with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,25 +37,25 @@ public XmlFilterConfigurator(ObjectFactory objectFactory, Element siteMeshElemen
"rawtypes", "unchecked"
}) public void configureFilter(BaseSiteMeshFilterBuilder builder) {

// Common configuration
configureCommon(builder);

// Filter specific configuration...

String customDecoratorSelector = xml.child("decorator-selector").text();
if (customDecoratorSelector != null) {
builder.setCustomDecoratorSelector((DecoratorSelector) getObjectFactory().create(customDecoratorSelector));
}

// Common configuration
configureCommon(builder);

// Filter specific configuration...

String decoratorPrefix = xml.child("decorator-prefix").text();
if (decoratorPrefix != null) {
builder.setDecoratorPrefix(decoratorPrefix);
builder.setDecoratorPrefix(decoratorPrefix.trim());
}

// Error pages inclusion
String includeErrorPagesString = xml.child("include-error-pages").text("false");
if ("true".equals(includeErrorPagesString) || "1".equals(includeErrorPagesString)) {
builder.setIncludeErrorPages(true);
// Decorator error pages inclusion
String includeErrorPagesString = xml.child("include-error-pages").text();
if (includeErrorPagesString != null) {
builder.setIncludeErrorPages(isTrue(includeErrorPagesString));
}

// Excludes
Expand Down

0 comments on commit 408077f

Please sign in to comment.