Skip to content

Commit 1e3c2e9

Browse files
author
jpenren
committed
Publishing to Maven Central
2 parents f67c315 + 2b44052 commit 1e3c2e9

File tree

3 files changed

+69
-73
lines changed

3 files changed

+69
-73
lines changed

README.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,12 @@ Aligned links:
9898

9999
Multiple tables on the same page:
100100

101-
On @Controller
101+
On your @Controller
102102
```java
103103
@RequestMapping("/users")
104104
public String list(ModelMap model, @Qualifier("foo") Pageable first, @Qualifier("bar") Pageable second){
105105
model.addAttribute("page", userService.find(first));
106-
model.addAttribute("page", userService.find(second));
106+
model.addAttribute("barPage", userService.find(second));
107107

108108
return "users/list";
109109
}
@@ -172,3 +172,14 @@ public String list(ModelMap model, @Qualifier("foo") Pageable first, @Qualifier(
172172
![alt text](https://raw.githubusercontent.com/jpenren/thymeleaf-spring-data-dialect/master/doc/multiple-tables.png "Multiple tables")
173173

174174
By default SpringDataDialect search in the request for the attribute "page" or if one attribute of type org.springframework.data.domain.Page<?> exists. To use another model attribute, use sd:page-object="${attrName}"
175+
176+
To specify the pagination url use `sd:pagination-url` tag:
177+
```html
178+
<nav>
179+
<ul class="pagination" sd:pagination="pager" sd:pagination-url="@{/some-url}">
180+
<!-- Pagination created by SpringDataDialect, this content is just for mockup -->
181+
<li class="disabled"><a href="#" aria-label="Previous"><span aria-hidden="true">&laquo;</span></a></li>
182+
<li class="active"><a href="#">1 <span class="sr-only">(current)</span></a></li>
183+
</ul>
184+
</nav>
185+
```

pom.xml

Lines changed: 56 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<groupId>io.github.jpenren</groupId>
55
<artifactId>thymeleaf-spring-data-dialect</artifactId>
66
<version>1.0.0.BETA02-SNAPSHOT</version>
7-
7+
88
<name>Thymeleaf Spring Data Dialect</name>
99
<description>Data pagination made easy with Thymeleaf and Spring Data</description>
1010
<url>http://github.com/jpenren/thymeleaf-spring-data-dialect</url>
@@ -31,64 +31,61 @@
3131
<url>[email protected]:jpenren/thymeleaf-spring-data-dialect.git</url>
3232
</scm>
3333

34-
<profiles>
35-
<profile>
36-
<id>release</id>
37-
<build>
38-
<plugins>
39-
<plugin>
40-
<groupId>org.apache.maven.plugins</groupId>
41-
<artifactId>maven-source-plugin</artifactId>
42-
<executions>
43-
<execution>
44-
<id>attach-sources</id>
45-
<goals>
46-
<goal>jar</goal>
47-
</goals>
48-
</execution>
49-
</executions>
50-
</plugin>
51-
<plugin>
52-
<groupId>org.apache.maven.plugins</groupId>
53-
<artifactId>maven-javadoc-plugin</artifactId>
54-
<executions>
55-
<execution>
56-
<id>attach-javadocs</id>
57-
<goals>
58-
<goal>jar</goal>
59-
</goals>
60-
</execution>
61-
</executions>
62-
</plugin>
63-
<plugin>
64-
<groupId>org.apache.maven.plugins</groupId>
65-
<artifactId>maven-gpg-plugin</artifactId>
66-
<version>1.6</version>
67-
<executions>
68-
<execution>
69-
<id>sign-artifacts</id>
70-
<phase>verify</phase>
71-
<goals>
72-
<goal>sign</goal>
73-
</goals>
74-
</execution>
75-
</executions>
76-
</plugin>
77-
<plugin>
78-
<groupId>org.sonatype.plugins</groupId>
79-
<artifactId>nexus-staging-maven-plugin</artifactId>
80-
<version>1.6.3</version>
81-
<extensions>true</extensions>
82-
<configuration>
83-
<serverId>ossrh</serverId>
84-
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
85-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
86-
</configuration>
87-
</plugin>
88-
</plugins>
89-
</build>
90-
</profile>
91-
</profiles>
34+
<properties>
35+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
36+
</properties>
37+
38+
<build>
39+
<plugins>
40+
<plugin>
41+
<groupId>org.apache.maven.plugins</groupId>
42+
<artifactId>maven-compiler-plugin</artifactId>
43+
<version>3.3</version>
44+
<configuration>
45+
<source>1.6</source>
46+
<target>1.6</target>
47+
</configuration>
48+
</plugin>
49+
<plugin>
50+
<groupId>org.apache.maven.plugins</groupId>
51+
<artifactId>maven-source-plugin</artifactId>
52+
<executions>
53+
<execution>
54+
<id>attach-sources</id>
55+
<goals>
56+
<goal>jar</goal>
57+
</goals>
58+
</execution>
59+
</executions>
60+
</plugin>
61+
<plugin>
62+
<groupId>org.apache.maven.plugins</groupId>
63+
<artifactId>maven-javadoc-plugin</artifactId>
64+
<executions>
65+
<execution>
66+
<id>attach-javadocs</id>
67+
<goals>
68+
<goal>jar</goal>
69+
</goals>
70+
</execution>
71+
</executions>
72+
</plugin>
73+
<plugin>
74+
<groupId>org.apache.maven.plugins</groupId>
75+
<artifactId>maven-gpg-plugin</artifactId>
76+
<version>1.6</version>
77+
<executions>
78+
<execution>
79+
<id>sign-artifacts</id>
80+
<phase>verify</phase>
81+
<goals>
82+
<goal>sign</goal>
83+
</goals>
84+
</execution>
85+
</executions>
86+
</plugin>
87+
</plugins>
88+
</build>
9289

9390
<dependencies>
9491
<dependency>
@@ -109,15 +106,4 @@
109106
</dependency>
110107
</dependencies>
111108

112-
<distributionManagement>
113-
<snapshotRepository>
114-
<id>ossrh</id>
115-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
116-
</snapshotRepository>
117-
<repository>
118-
<id>ossrh</id>
119-
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
120-
</repository>
121-
</distributionManagement>
122-
123109
</project>

src/main/java/org/thymeleaf/dialect/springdata/util/PageUtils.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ public static String createPageUrl(final ITemplateContext context, int pageNumbe
9090

9191
/**
9292
* Creates an url to sort data by fieldName
93-
* @param page
9493
* @param context
9594
* @param fieldName
9695
* @return

0 commit comments

Comments
 (0)