Skip to content

Commit caf03d2

Browse files
committed
Thymeleaf BETA03 fixes
1 parent 9265b61 commit caf03d2

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>io.github.jpenren</groupId>
55
<artifactId>thymeleaf-spring-data-dialect</artifactId>
6-
<version>3.0.0.BETA02</version>
6+
<version>3.0.0.BETA03</version>
77

88
<name>Thymeleaf Spring Data Dialect</name>
99
<description>Data pagination made easy with Thymeleaf and Spring Data</description>
@@ -102,7 +102,7 @@
102102
<dependency>
103103
<groupId>org.thymeleaf</groupId>
104104
<artifactId>thymeleaf</artifactId>
105-
<version>3.0.0.BETA02</version>
105+
<version>3.0.0.BETA03</version>
106106
</dependency>
107107
</dependencies>
108108

src/main/java/org/thymeleaf/dialect/springdata/PaginationAttrProcessor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ protected void doProcess(ITemplateContext context,
2626
String attrValue = String.valueOf(attributeValue).trim();
2727
PaginationDecorator decorator = PaginationDecoratorRegistry.getInstance().getDecorator(attrValue);
2828
String html = decorator.decorate(tag, context);
29-
30-
boolean isUlNode = Strings.UL.equalsIgnoreCase(tag.getElementName());
29+
30+
boolean isUlNode = Strings.UL.equalsIgnoreCase(tag.getElementCompleteName());
3131
if (isUlNode) {
3232
structureHandler.replaceWith(html, false);
3333
} else {

src/main/java/org/thymeleaf/dialect/springdata/PaginationSortAttrProcessor.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ protected void doProcess(ITemplateContext context,
3434
Sort sort = page.getSort();
3535
boolean isSorted = sort != null && sort.getOrderFor(attributeValue) != null;
3636
String clas = isSorted ? SORTED_PREFIX.concat(sort.getOrderFor(attributeValue).getDirection().toString().toLowerCase()) : EMPTY;
37-
38-
tag.getAttributes().setAttribute(HREF, url);
39-
String currentClass = tag.getAttributes().getValue(CLASS);
40-
tag.getAttributes().setAttribute(CLASS, Strings.concat(currentClass, BLANK, clas));
37+
38+
structureHandler.setAttribute(HREF, url);
39+
String currentClass = tag.getAttributeValue(CLASS);
40+
structureHandler.setAttribute(CLASS, Strings.concat(currentClass, BLANK, clas));
4141
}
4242

4343
}

src/main/java/org/thymeleaf/dialect/springdata/decorator/FullPaginationDecorator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ public String decorate(final IProcessableElementTag tag, final ITemplateContext
4343
String lastPage = PageUtils.createPageUrl(context, page.getTotalPages()-1);
4444
String raquo = isLastPage ? getRaquo(locale) : getRaquo(lastPage, locale);
4545

46-
boolean isUl = Strings.UL.equalsIgnoreCase(tag.getElementName());
47-
String currentClass = tag.getAttributes().getValue(Strings.CLASS);
46+
boolean isUl = Strings.UL.equalsIgnoreCase(tag.getElementCompleteName());
47+
String currentClass = tag.getAttributeValue(Strings.CLASS);
4848
String clas = (isUl && !Strings.isEmpty(currentClass)) ? currentClass : DEFAULT_CLASS;
4949

5050
return Messages.getMessage(BUNDLE_NAME, "pagination", locale, clas, laquo, previous, pageLinks, next, raquo);

0 commit comments

Comments
 (0)