Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wicket 10 #204

Merged
merged 16 commits into from
Mar 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '11'
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Build with Maven
Expand Down
6 changes: 1 addition & 5 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@

Current release version:

* 3.1.x - http://wicket.apache.org/[Wicket 9.x] with Spring Boot 2.6.1 - Branch master
* 3.0.x - http://wicket.apache.org/[Wicket 9.x] with Spring Boot 2.1 - Branch master (deprecated)
* 2.1.x - http://wicket.apache.org/[Wicket 8.x] with Spring Boot 2 - Branch wicket-8
* 2.0.x - http://wicket.apache.org/[Wicket 8.x] with Spring Boot 1 - Branch wicket-8
* 1.x.x - http://wicket.apache.org/[Wicket 7.x] with Spring Boot 1 - Branch wicket-7
* 4.0.x - http://wicket.apache.org/[Wicket 10.x] with Spring Boot 3.2.x - Branch master

NOTE: http://search.maven.org/#search|ga|1|com.giffing.wicket.spring.boot

Expand Down
63 changes: 40 additions & 23 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.giffing.wicket.spring.boot.starter</groupId>
<artifactId>wicket-spring-boot-starter-parent</artifactId>
<version>3.1.7</version>
<version>4.0.0</version>
<packaging>pom</packaging>

<name>Wicket Spring Boot Starter Parent</name>
Expand All @@ -20,7 +22,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.7.5</version>
<version>3.2.4</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>

Expand Down Expand Up @@ -50,12 +52,10 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>11</java.version>
<java.version>17</java.version>
<apache-shiro.version>1.8.0</apache-shiro.version>
<wicket.version>9.12.0</wicket.version>
<wicketstuff.version>9.12.0</wicketstuff.version>
<dependency-check-maven.version>5.3.0</dependency-check-maven.version>
<log4j2.version>2.16.0</log4j2.version>
<wicket.version>10.0.0</wicket.version>
<wicketstuff.version>10.0.0</wicketstuff.version>
</properties>

<dependencyManagement>
Expand Down Expand Up @@ -141,7 +141,7 @@
<dependency>
<groupId>org.wicketstuff.htmlvalidator</groupId>
<artifactId>wicketstuff-htmlvalidator</artifactId>
<version>1.11</version>
<version>${wicketstuff.version}</version>
</dependency>
<dependency>
<groupId>org.wicketstuff</groupId>
Expand All @@ -158,7 +158,7 @@
<dependency>
<groupId>de.agilecoders.wicket.webjars</groupId>
<artifactId>wicket-webjars</artifactId>
<version>3.0.0-M3</version>
<version>3.0.7</version>
</dependency>
<!-- Wicket datastore dependencies -->
<dependency>
Expand Down Expand Up @@ -203,6 +203,11 @@
<artifactId>wicket-source</artifactId>
<version>9.0.0</version>
</dependency>
<dependency>
<groupId>org.apache.wicket</groupId>
<artifactId>wicket-tester</artifactId>
<version>${wicket.version}</version>
</dependency>
<!-- Security - Apache Shiro -->
<dependency>
<groupId>org.wicketstuff</groupId>
Expand Down Expand Up @@ -240,7 +245,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
<version>3.0.1</version>
<executions>
<execution>
<id>sign-artifacts</id>
Expand Down Expand Up @@ -275,7 +280,7 @@
</execution>
</executions>
<configuration>
<source>11</source>
<source>${java.version}</source>
</configuration>
</plugin>
</plugins>
Expand All @@ -294,20 +299,11 @@
</profile>
</profiles>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.3</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.8</version>
<version>1.6.13</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
Expand All @@ -316,6 +312,27 @@
</configuration>
</plugin>
</plugins>

</build>
<repositories>
<repository>
<id>apache.snapshots.https</id>
<url>https://repository.apache.org/content/repositories/snapshots</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>sonatype</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
</project>
2 changes: 1 addition & 1 deletion wicket-spring-boot-context/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.giffing.wicket.spring.boot.starter</groupId>
<artifactId>wicket-spring-boot-starter-parent</artifactId>
<version>3.1.7</version>
<version>4.0.0</version>
</parent>

<artifactId>wicket-spring-boot-context</artifactId>
Expand Down
51 changes: 46 additions & 5 deletions wicket-spring-boot-starter-example/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.giffing.wicket.spring.boot.starter</groupId>
<artifactId>wicket-spring-boot-starter-parent</artifactId>
<version>3.1.7</version>
<version>4.0.0</version>
<relativePath>..</relativePath>
</parent>

Expand Down Expand Up @@ -73,6 +73,10 @@
<groupId>de.agilecoders.wicket.webjars</groupId>
<artifactId>wicket-webjars</artifactId>
</dependency>
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
</dependency>
<dependency>
<groupId>org.wicketstuff</groupId>
<artifactId>wicketstuff-serializer-fast2</artifactId>
Expand All @@ -85,7 +89,7 @@
<dependency>
<groupId>de.agilecoders.wicket</groupId>
<artifactId>jquery-selectors</artifactId>
<version>2.0.11</version>
<version>4.0.2</version>
</dependency>
<dependency>
<groupId>org.liquibase</groupId>
Expand All @@ -109,9 +113,14 @@
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.wicket</groupId>
<artifactId>wicket-tester</artifactId>
<scope>test</scope>
</dependency>
<!-- To provide the annotation processor in the IDE's classpath -->
<dependency>
<groupId>org.hibernate</groupId>
<groupId>org.hibernate.orm</groupId>
<artifactId>hibernate-jpamodelgen</artifactId>
<scope>provided</scope>
</dependency>
Expand Down Expand Up @@ -160,7 +169,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.3</version>
<executions>
<execution>
<phase>none</phase>
Expand All @@ -178,6 +186,39 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<release>${java.version}</release>
<compilerArgument>-proc:none</compilerArgument>
</configuration>
</plugin>
<plugin>
<groupId>org.bsc.maven</groupId>
<artifactId>maven-processor-plugin</artifactId>
<version>${maven-processor-plugin.version}</version>
<executions>
<execution>
<id>process</id>
<goals>
<goal>process</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<processors>
<processor>org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor</processor>
</processors>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.hibernate.orm</groupId>
<artifactId>hibernate-jpamodelgen</artifactId>
<version>${hibernate.version}</version>
</dependency>
</dependencies>
</plugin>
<!-- Assist eclipse in recognizing the classes generated -->
<!-- by jpa-modelgen (via maven-processor-plugin) as source files -->
<plugin>
Expand All @@ -201,7 +242,7 @@
<plugin>
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoctor-maven-plugin</artifactId>
<version>1.5.2</version>
<version>2.2.2</version>
<executions>
<execution>
<id>output-html</id>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;

import com.giffing.wicket.spring.boot.example.repository.Domain;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,17 @@
import java.util.List;
import java.util.Optional;

import javax.annotation.Resource;
import javax.inject.Inject;
import javax.persistence.EntityManager;
import javax.persistence.TypedQuery;
import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.CriteriaQuery;
import javax.persistence.criteria.Predicate;
import javax.persistence.criteria.Root;
import jakarta.annotation.Resource;
import jakarta.persistence.EntityManager;
import jakarta.persistence.TypedQuery;
import jakarta.persistence.criteria.CriteriaBuilder;
import jakarta.persistence.criteria.CriteriaQuery;
import jakarta.persistence.criteria.Predicate;
import jakarta.persistence.criteria.Root;

import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Sort;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import com.giffing.wicket.spring.boot.example.model.Customer;
import com.giffing.wicket.spring.boot.example.model.Customer_;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ protected void yesClicked(AjaxRequestTarget target) {
}
};
((BasePage)getPage()).replaceDefaultModal(yesNoModal);
yesNoModal.showUnloadConfirmation(false);
yesNoModal.show(target);

yesNoModal.open(target);
}

protected abstract void yesClicked(AjaxRequestTarget target);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,13 @@
package com.giffing.wicket.spring.boot.example.web.html.modal;

import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
import org.apache.wicket.model.Model;
import org.apache.wicket.extensions.ajax.markup.html.modal.ModalDialog;

public abstract class YesNoModal extends ModalWindow {
public abstract class YesNoModal extends ModalDialog {

public YesNoModal(String id) {
super(id);
setMinimalHeight(200);
setMinimalWidth(400);
setInitialHeight(200);
setInitialWidth(400);
setAutoSize(false);
setTitle(Model.of("Are you sure?"));
String contentId = getContentId();
YesNoPanel yesNoPanel = new YesNoPanel(contentId){
YesNoPanel yesNoPanel = new YesNoPanel(CONTENT_ID){

@Override
protected void yesClicked(AjaxRequestTarget target) {
Expand All @@ -29,16 +21,12 @@ protected void noClicked(AjaxRequestTarget target) {

};
setContent(yesNoPanel);

}

protected void noClicked(AjaxRequestTarget target) {
close(target);

}

protected abstract void yesClicked(AjaxRequestTarget target);



}
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<wicket:panel>
<label>Are you sure?</label>
<a wicket:id="yes">yes</a>
<a wicket:id="no">no</a>
</wicket:panel>
<a wicket:id="no">no</a>
</wicket:panel>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.giffing.wicket.spring.boot.example.web.pages;

import org.apache.wicket.MarkupContainer;
import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
import org.apache.wicket.extensions.ajax.markup.html.modal.ModalDialog;
import org.apache.wicket.markup.head.CssHeaderItem;
import org.apache.wicket.markup.head.IHeaderResponse;
import org.apache.wicket.markup.head.JavaScriptHeaderItem;
Expand Down Expand Up @@ -34,7 +34,7 @@ private void initPage(){
add(defaultModal);
}

public void replaceDefaultModal(ModalWindow newModal){
public void replaceDefaultModal(ModalDialog newModal){
defaultModal.replaceWith(newModal);
defaultModal = newModal;
defaultModal.setOutputMarkupId(true);
Expand Down
Loading
Loading