Skip to content

Commit 1297e35

Browse files
committed
Use Wicket Bootstrap - Fix example project
1 parent 9bdc438 commit 1297e35

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+1065
-815
lines changed

README.adoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
Current release version:
44

5-
* 4.0.x - http://wicket.apache.org/[Wicket 10.x] with Spring Boot 3.2.x - Branch master
5+
* 4.1.x - http://wicket.apache.org/[Wicket 10.2] with Spring Boot 3.3.4 - Branch master
6+
* 4.0.x - http://wicket.apache.org/[Wicket 10.0] with Spring Boot 3.2.x - Branch master
67
78
NOTE: http://search.maven.org/#search|ga|1|com.giffing.wicket.spring.boot
89

wicket-spring-boot-starter-example/pom.xml

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
<maven.deploy.skip>true</maven.deploy.skip>
1919
<maven-processor-plugin.version>5.1-jdk8</maven-processor-plugin.version>
2020
<maven.javadoc.skip>true</maven.javadoc.skip>
21+
<wicket-bootstrap.version>7.0.8</wicket-bootstrap.version>
2122
</properties>
2223

2324
<dependencies>
@@ -49,6 +50,29 @@
4950
<groupId>org.wicketstuff</groupId>
5051
<artifactId>wicketstuff-annotation</artifactId>
5152
</dependency>
53+
<dependency>
54+
<groupId>de.agilecoders.wicket</groupId>
55+
<artifactId>wicket-bootstrap-core</artifactId>
56+
<version>${wicket-bootstrap.version}</version>
57+
</dependency>
58+
59+
<dependency>
60+
<groupId>de.agilecoders.wicket</groupId>
61+
<artifactId>wicket-bootstrap-extensions</artifactId>
62+
<version>${wicket-bootstrap.version}</version>
63+
</dependency>
64+
65+
<dependency>
66+
<groupId>de.agilecoders.wicket</groupId>
67+
<artifactId>wicket-bootstrap-sass</artifactId>
68+
<version>${wicket-bootstrap.version}</version>
69+
</dependency>
70+
71+
<dependency>
72+
<groupId>de.agilecoders.wicket</groupId>
73+
<artifactId>wicket-bootstrap-themes</artifactId>
74+
<version>${wicket-bootstrap.version}</version>
75+
</dependency>
5276
<dependency>
5377
<groupId>org.wicketstuff</groupId>
5478
<artifactId>wicketstuff-htmlcompressor</artifactId>
@@ -81,11 +105,6 @@
81105
<groupId>org.wicketstuff</groupId>
82106
<artifactId>wicketstuff-serializer-fast2</artifactId>
83107
</dependency>
84-
<dependency>
85-
<groupId>org.webjars</groupId>
86-
<artifactId>bootstrap</artifactId>
87-
<version>5.3.3</version>
88-
</dependency>
89108
<dependency>
90109
<groupId>de.agilecoders.wicket</groupId>
91110
<artifactId>jquery-selectors</artifactId>

wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/model/Customer.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ public class Customer implements Domain<Long>, Serializable {
1818

1919
private String username;
2020

21-
private String password;
22-
2321
private String firstname;
2422

2523
private String lastname;
@@ -35,14 +33,6 @@ public void setId(Long id) {
3533
this.id = id;
3634
}
3735

38-
public String getPassword() {
39-
return password;
40-
}
41-
42-
public void setPassword(String password) {
43-
this.password = password;
44-
}
45-
4636
public String getUsername() {
4737
return username;
4838
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package com.giffing.wicket.spring.boot.example.web.assets.base;
2+
3+
import org.apache.wicket.request.resource.CssResourceReference;
4+
5+
public class FixBootstrapStylesCssResourceReference extends CssResourceReference {
6+
7+
public static final FixBootstrapStylesCssResourceReference INSTANCE = new FixBootstrapStylesCssResourceReference();
8+
9+
public FixBootstrapStylesCssResourceReference() {
10+
super(FixBootstrapStylesCssResourceReference.class, "fix.css");
11+
}
12+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.navbar {
2+
--bs-navbar-padding-x: 1;
3+
}

wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/web/general/action/panel/items/AbstractActionItemLink.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public void onClick(AjaxRequestTarget target) {
2121
};
2222
add(link);
2323
WebMarkupContainer webMarkupContainer = new WebMarkupContainer("icon-type");
24-
webMarkupContainer.add(new AttributeAppender("class", "glyphicon glyphicon-" + iconType.getCssName()));
24+
webMarkupContainer.add(new AttributeAppender("class", iconType.getCssName()));
2525
link.add(webMarkupContainer);
2626
}
2727

wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/web/general/action/panel/items/links/ActionItemLink.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public class ActionItemLink extends AbstrractActionItem {
1313
public ActionItemLink(IModel<String> label, IconType iconType, AbstractLink link) {
1414
add(link);
1515
WebMarkupContainer webMarkupContainer = new WebMarkupContainer("icon-type");
16-
webMarkupContainer.add(new AttributeAppender("class", "glyphicon glyphicon-" + iconType.getCssName()));
16+
webMarkupContainer.add(new AttributeAppender("class", "fa-solid fa-" + iconType.getCssName()));
1717
link.add(webMarkupContainer);
1818
}
1919

wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/web/general/action/panel/items/yesno/YesNoLink.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
package com.giffing.wicket.spring.boot.example.web.general.action.panel.items.yesno;
22

3+
import com.giffing.wicket.spring.boot.example.web.pages.BasePage;
34
import org.apache.wicket.ajax.AjaxRequestTarget;
5+
import org.apache.wicket.markup.html.panel.EmptyPanel;
46
import org.apache.wicket.model.IModel;
57

68
import com.giffing.wicket.spring.boot.example.web.general.action.panel.items.AbstractActionItemLink;
79
import com.giffing.wicket.spring.boot.example.web.general.icons.IconType;
810
import com.giffing.wicket.spring.boot.example.web.html.modal.YesNoModal;
9-
import com.giffing.wicket.spring.boot.example.web.pages.BasePage;
1011

1112
public abstract class YesNoLink<T> extends AbstractActionItemLink<T>{
1213

@@ -21,11 +22,12 @@ public void onClick(AjaxRequestTarget target) {
2122
@Override
2223
protected void yesClicked(AjaxRequestTarget target) {
2324
YesNoLink.this.yesClicked(target);
24-
this.close(target);
25+
close(target);
26+
((BasePage)getPage()).replaceDefaultModal( new EmptyPanel("defaultModal"), target);
2527
}
2628
};
27-
((BasePage)getPage()).replaceDefaultModal(yesNoModal);
28-
yesNoModal.open(target);
29+
((BasePage)getPage()).replaceDefaultModal(yesNoModal, target);
30+
yesNoModal.appendShowDialogJavaScript(target);
2931
}
3032

3133
protected abstract void yesClicked(AjaxRequestTarget target);

wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/web/general/icons/IconType.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
package com.giffing.wicket.spring.boot.example.web.general.icons;
22

3+
import de.agilecoders.wicket.extensions.markup.html.bootstrap.icon.FontAwesome6IconType;
4+
35
public enum IconType {
4-
CREATE("plus"),
5-
EDIT("edit"),
6-
DELETE("remove");
6+
CREATE(FontAwesome6IconType.plus_s.cssClassName()),
7+
EDIT(FontAwesome6IconType.pen_s.cssClassName()),
8+
DELETE(FontAwesome6IconType.minus_s.cssClassName());
79

810
private String cssType;
911

wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/web/html/border/LabeledFormBorder.html

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)