diff --git a/README.adoc b/README.adoc
index 94b48ead..1e4563c9 100644
--- a/README.adoc
+++ b/README.adoc
@@ -2,7 +2,8 @@
Current release version:
-* 4.0.x - http://wicket.apache.org/[Wicket 10.x] with Spring Boot 3.2.x - Branch master
+* 4.1.x - http://wicket.apache.org/[Wicket 10.2] with Spring Boot 3.3.4 - Branch master
+* 4.0.x - http://wicket.apache.org/[Wicket 10.0] with Spring Boot 3.2.x - Branch master
NOTE: http://search.maven.org/#search|ga|1|com.giffing.wicket.spring.boot
diff --git a/wicket-spring-boot-starter-example/pom.xml b/wicket-spring-boot-starter-example/pom.xml
index 474cb0be..7c470263 100644
--- a/wicket-spring-boot-starter-example/pom.xml
+++ b/wicket-spring-boot-starter-example/pom.xml
@@ -18,6 +18,7 @@
true
5.1-jdk8
true
+ 7.0.8
@@ -49,6 +50,29 @@
org.wicketstuff
wicketstuff-annotation
+
+ de.agilecoders.wicket
+ wicket-bootstrap-core
+ ${wicket-bootstrap.version}
+
+
+
+ de.agilecoders.wicket
+ wicket-bootstrap-extensions
+ ${wicket-bootstrap.version}
+
+
+
+ de.agilecoders.wicket
+ wicket-bootstrap-sass
+ ${wicket-bootstrap.version}
+
+
+
+ de.agilecoders.wicket
+ wicket-bootstrap-themes
+ ${wicket-bootstrap.version}
+
org.wicketstuff
wicketstuff-htmlcompressor
@@ -81,11 +105,6 @@
org.wicketstuff
wicketstuff-serializer-fast2
-
- org.webjars
- bootstrap
- 5.3.3
-
de.agilecoders.wicket
jquery-selectors
diff --git a/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/model/Customer.java b/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/model/Customer.java
index 48fbda7c..676cdb88 100644
--- a/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/model/Customer.java
+++ b/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/model/Customer.java
@@ -18,8 +18,6 @@ public class Customer implements Domain, Serializable {
private String username;
- private String password;
-
private String firstname;
private String lastname;
@@ -35,14 +33,6 @@ public void setId(Long id) {
this.id = id;
}
- public String getPassword() {
- return password;
- }
-
- public void setPassword(String password) {
- this.password = password;
- }
-
public String getUsername() {
return username;
}
diff --git a/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/web/assets/base/FixBootstrapStylesCssResourceReference.java b/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/web/assets/base/FixBootstrapStylesCssResourceReference.java
new file mode 100644
index 00000000..44ec0aab
--- /dev/null
+++ b/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/web/assets/base/FixBootstrapStylesCssResourceReference.java
@@ -0,0 +1,12 @@
+package com.giffing.wicket.spring.boot.example.web.assets.base;
+
+import org.apache.wicket.request.resource.CssResourceReference;
+
+public class FixBootstrapStylesCssResourceReference extends CssResourceReference {
+
+ public static final FixBootstrapStylesCssResourceReference INSTANCE = new FixBootstrapStylesCssResourceReference();
+
+ public FixBootstrapStylesCssResourceReference() {
+ super(FixBootstrapStylesCssResourceReference.class, "fix.css");
+ }
+}
diff --git a/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/web/assets/base/fix.css b/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/web/assets/base/fix.css
new file mode 100644
index 00000000..485a2ff7
--- /dev/null
+++ b/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/web/assets/base/fix.css
@@ -0,0 +1,3 @@
+.navbar {
+ --bs-navbar-padding-x: 1;
+}
\ No newline at end of file
diff --git a/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/web/general/action/panel/items/AbstractActionItemLink.java b/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/web/general/action/panel/items/AbstractActionItemLink.java
index cfe92519..32895302 100644
--- a/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/web/general/action/panel/items/AbstractActionItemLink.java
+++ b/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/web/general/action/panel/items/AbstractActionItemLink.java
@@ -21,7 +21,7 @@ public void onClick(AjaxRequestTarget target) {
};
add(link);
WebMarkupContainer webMarkupContainer = new WebMarkupContainer("icon-type");
- webMarkupContainer.add(new AttributeAppender("class", "glyphicon glyphicon-" + iconType.getCssName()));
+ webMarkupContainer.add(new AttributeAppender("class", iconType.getCssName()));
link.add(webMarkupContainer);
}
diff --git a/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/web/general/action/panel/items/links/ActionItemLink.java b/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/web/general/action/panel/items/links/ActionItemLink.java
index 88e22646..5166cdf0 100644
--- a/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/web/general/action/panel/items/links/ActionItemLink.java
+++ b/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/web/general/action/panel/items/links/ActionItemLink.java
@@ -13,7 +13,7 @@ public class ActionItemLink extends AbstrractActionItem {
public ActionItemLink(IModel label, IconType iconType, AbstractLink link) {
add(link);
WebMarkupContainer webMarkupContainer = new WebMarkupContainer("icon-type");
- webMarkupContainer.add(new AttributeAppender("class", "glyphicon glyphicon-" + iconType.getCssName()));
+ webMarkupContainer.add(new AttributeAppender("class", "fa-solid fa-" + iconType.getCssName()));
link.add(webMarkupContainer);
}
diff --git a/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/web/general/action/panel/items/yesno/YesNoLink.java b/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/web/general/action/panel/items/yesno/YesNoLink.java
index d9c78f6c..b4062967 100644
--- a/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/web/general/action/panel/items/yesno/YesNoLink.java
+++ b/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/web/general/action/panel/items/yesno/YesNoLink.java
@@ -1,12 +1,13 @@
package com.giffing.wicket.spring.boot.example.web.general.action.panel.items.yesno;
+import com.giffing.wicket.spring.boot.example.web.pages.BasePage;
import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.markup.html.panel.EmptyPanel;
import org.apache.wicket.model.IModel;
import com.giffing.wicket.spring.boot.example.web.general.action.panel.items.AbstractActionItemLink;
import com.giffing.wicket.spring.boot.example.web.general.icons.IconType;
import com.giffing.wicket.spring.boot.example.web.html.modal.YesNoModal;
-import com.giffing.wicket.spring.boot.example.web.pages.BasePage;
public abstract class YesNoLink extends AbstractActionItemLink{
@@ -21,11 +22,12 @@ public void onClick(AjaxRequestTarget target) {
@Override
protected void yesClicked(AjaxRequestTarget target) {
YesNoLink.this.yesClicked(target);
- this.close(target);
+ close(target);
+ ((BasePage)getPage()).replaceDefaultModal( new EmptyPanel("defaultModal"), target);
}
};
- ((BasePage)getPage()).replaceDefaultModal(yesNoModal);
- yesNoModal.open(target);
+ ((BasePage)getPage()).replaceDefaultModal(yesNoModal, target);
+ yesNoModal.appendShowDialogJavaScript(target);
}
protected abstract void yesClicked(AjaxRequestTarget target);
diff --git a/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/web/general/icons/IconType.java b/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/web/general/icons/IconType.java
index ce4b3b24..5944837b 100644
--- a/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/web/general/icons/IconType.java
+++ b/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/web/general/icons/IconType.java
@@ -1,9 +1,11 @@
package com.giffing.wicket.spring.boot.example.web.general.icons;
+import de.agilecoders.wicket.extensions.markup.html.bootstrap.icon.FontAwesome6IconType;
+
public enum IconType {
- CREATE("plus"),
- EDIT("edit"),
- DELETE("remove");
+ CREATE(FontAwesome6IconType.plus_s.cssClassName()),
+ EDIT(FontAwesome6IconType.pen_s.cssClassName()),
+ DELETE(FontAwesome6IconType.minus_s.cssClassName());
private String cssType;
diff --git a/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/web/html/border/LabeledFormBorder.html b/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/web/html/border/LabeledFormBorder.html
deleted file mode 100644
index 7ab61c35..00000000
--- a/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/web/html/border/LabeledFormBorder.html
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/web/html/border/LabeledFormBorder.java b/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/web/html/border/LabeledFormBorder.java
deleted file mode 100644
index 84074322..00000000
--- a/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/web/html/border/LabeledFormBorder.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package com.giffing.wicket.spring.boot.example.web.html.border;
-
-import org.apache.wicket.AttributeModifier;
-import org.apache.wicket.markup.html.basic.Label;
-import org.apache.wicket.markup.html.border.Border;
-import org.apache.wicket.markup.html.form.FormComponent;
-import org.apache.wicket.markup.html.form.FormComponentLabel;
-import org.apache.wicket.model.Model;
-
-public class LabeledFormBorder extends Border {
-
- private static final long serialVersionUID = 1L;
-
- private FormComponent formComponent;
-
- public LabeledFormBorder(String labelText, FormComponent container) {
- super(container.getId() + "Border");
- this.formComponent = container;
- FormComponentLabel label = new FormComponentLabel("label", container);
- label.add(new AttributeModifier("class", "control-label"));
- Label somethingLabelSpan = new Label("labelText", labelText);
- somethingLabelSpan.setRenderBodyOnly(true);
- label.add(somethingLabelSpan);
-
- addToBorder(label);
- add(container);
- }
-
- @Override
- protected void onBeforeRender() {
-
- if (!formComponent.isValid()) {
- add(new AttributeModifier("class", Model.of("form-group has-error")));
- } else {
- add(new AttributeModifier("class", "form-group"));
- }
-
- super.onBeforeRender();
- }
-
-}
diff --git a/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/web/html/border/behavior/ValidationMsgBehavior.java b/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/web/html/border/behavior/ValidationMsgBehavior.java
index f1da9110..3d28418f 100644
--- a/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/web/html/border/behavior/ValidationMsgBehavior.java
+++ b/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/web/html/border/behavior/ValidationMsgBehavior.java
@@ -35,7 +35,7 @@ public void afterRender(Component component) {
} else {
error = "Your input is invalid.";
}
- fc.getResponse().write("*"+error+"");
+ fc.getResponse().write("*"+error+"");
super.afterRender(component);
}
}
diff --git a/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/web/html/form/ValidationForm.java b/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/web/html/form/ValidationForm.java
index d00487fa..5254f8b8 100644
--- a/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/web/html/form/ValidationForm.java
+++ b/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/web/html/form/ValidationForm.java
@@ -1,10 +1,10 @@
package com.giffing.wicket.spring.boot.example.web.html.form;
-import org.apache.wicket.markup.html.form.Form;
+import de.agilecoders.wicket.core.markup.html.bootstrap.form.BootstrapForm;
import org.apache.wicket.model.IModel;
import org.apache.wicket.util.visit.IVisitor;
-public class ValidationForm extends Form{
+public class ValidationForm extends BootstrapForm {
private static final long serialVersionUID = 1L;
diff --git a/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/web/html/form/ValidationFormVisitor.java b/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/web/html/form/ValidationFormVisitor.java
index 1b944e20..80e24ebc 100644
--- a/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/web/html/form/ValidationFormVisitor.java
+++ b/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/web/html/form/ValidationFormVisitor.java
@@ -11,7 +11,7 @@
import com.giffing.wicket.spring.boot.example.web.html.border.behavior.ValidationMsgBehavior;
-public class ValidationFormVisitor implements IVisitor, IClusterable {
+public class ValidationFormVisitor implements IVisitor, IClusterable {
private static final long serialVersionUID = 1L;
@@ -19,14 +19,10 @@ public class ValidationFormVisitor implements IVisitor, IClu
@Override
public void component(Component c, IVisit visit) {
- if (!visited.contains(c)) {
- if(c instanceof FormComponent){
- FormComponent fc = (FormComponent) c;
+ if(c instanceof FormComponent fc && !visited.contains(c)) {
c.add(new ValidationMsgBehavior());
-// c.add(new PropertyValidator<>());
visited.add(fc);
}
- }
}
}
diff --git a/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/web/html/modal/YesNoModal.html b/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/web/html/modal/YesNoModal.html
new file mode 100644
index 00000000..3c88c17f
--- /dev/null
+++ b/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/web/html/modal/YesNoModal.html
@@ -0,0 +1,10 @@
+
+
+ TextContentModal
+
+
+
+
+
+
+
diff --git a/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/web/html/modal/YesNoModal.java b/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/web/html/modal/YesNoModal.java
index 14131d4d..b6338483 100644
--- a/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/web/html/modal/YesNoModal.java
+++ b/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/web/html/modal/YesNoModal.java
@@ -1,32 +1,33 @@
package com.giffing.wicket.spring.boot.example.web.html.modal;
+import de.agilecoders.wicket.core.markup.html.bootstrap.dialog.Modal;
import org.apache.wicket.ajax.AjaxRequestTarget;
-import org.apache.wicket.extensions.ajax.markup.html.modal.ModalDialog;
-
-public abstract class YesNoModal extends ModalDialog {
-
- public YesNoModal(String id) {
- super(id);
- YesNoPanel yesNoPanel = new YesNoPanel(CONTENT_ID){
-
- @Override
- protected void yesClicked(AjaxRequestTarget target) {
- YesNoModal.this.yesClicked(target);
- }
-
- @Override
- protected void noClicked(AjaxRequestTarget target) {
- YesNoModal.this.noClicked(target);
- }
-
- };
- setContent(yesNoPanel);
- }
-
- protected void noClicked(AjaxRequestTarget target) {
- close(target);
- }
-
- protected abstract void yesClicked(AjaxRequestTarget target);
-
+import org.apache.wicket.markup.html.panel.Panel;
+
+public abstract class YesNoModal extends Modal {
+
+ public YesNoModal(String id) {
+ super(id);
+ YesNoPanel yesNoPanel = new YesNoPanel("content") {
+
+ @Override
+ protected void yesClicked(AjaxRequestTarget target) {
+ YesNoModal.this.yesClicked(target);
+ }
+
+ @Override
+ protected void noClicked(AjaxRequestTarget target) {
+ YesNoModal.this.noClicked(target);
+ }
+
+ };
+ add(yesNoPanel);
+ }
+
+ protected void noClicked(AjaxRequestTarget target) {
+ close(target);
+ }
+
+ protected abstract void yesClicked(AjaxRequestTarget target);
+
}
diff --git a/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/web/html/modal/YesNoPanel.html b/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/web/html/modal/YesNoPanel.html
index 86fcf1ad..7120ddad 100644
--- a/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/web/html/modal/YesNoPanel.html
+++ b/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/web/html/modal/YesNoPanel.html
@@ -1,5 +1,13 @@
+
+
+ TextContentModal
+
+
- yes
- no
+
+ yes
+ no
+
+
\ No newline at end of file
diff --git a/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/web/html/modal/YesNoPanel.java b/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/web/html/modal/YesNoPanel.java
index 4aeab754..d0df5853 100644
--- a/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/web/html/modal/YesNoPanel.java
+++ b/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/web/html/modal/YesNoPanel.java
@@ -6,46 +6,46 @@
import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.model.IModel;
-public abstract class YesNoPanel extends Panel{
-
-
- public YesNoPanel(String id) {
- super(id);
-
- add(new AjaxLink("yes") {
-
- @Override
- public void onClick(AjaxRequestTarget target) {
- YesNoPanel.this.yesClicked(target);
- }
-
- @Override
- public MarkupContainer setDefaultModel(IModel model) {
- return super.setDefaultModel( model );
- }
-
- });
-
- add(new AjaxLink("no") {
-
- @Override
- public void onClick(AjaxRequestTarget target) {
- YesNoPanel.this.noClicked(target);
- }
-
- @Override
- public MarkupContainer setDefaultModel(IModel model) {
- return super.setDefaultModel( model );
- }
-
-
- });
-
- }
-
- protected abstract void noClicked(AjaxRequestTarget target);
-
- protected abstract void yesClicked(AjaxRequestTarget target);
-
+public abstract class YesNoPanel extends Panel {
+
+
+ public YesNoPanel(String id) {
+ super(id);
+
+ add(new AjaxLink<>("yes") {
+
+ @Override
+ public void onClick(AjaxRequestTarget target) {
+ YesNoPanel.this.yesClicked(target);
+ }
+
+ @Override
+ public MarkupContainer setDefaultModel(IModel model) {
+ return super.setDefaultModel(model);
+ }
+
+ });
+
+ add(new AjaxLink<>("no") {
+
+ @Override
+ public void onClick(AjaxRequestTarget target) {
+ YesNoPanel.this.noClicked(target);
+ }
+
+ @Override
+ public MarkupContainer setDefaultModel(IModel model) {
+ return super.setDefaultModel(model);
+ }
+
+
+ });
+
+ }
+
+ protected abstract void noClicked(AjaxRequestTarget target);
+
+ protected abstract void yesClicked(AjaxRequestTarget target);
+
}
diff --git a/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/web/pages/BaseAuthenticatedPage.html b/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/web/pages/BaseAuthenticatedPage.html
new file mode 100644
index 00000000..93e047d2
--- /dev/null
+++ b/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/web/pages/BaseAuthenticatedPage.html
@@ -0,0 +1,15 @@
+
+
+
+
+ Spring Boot - Apache Wicket Quickstart
+
+
+
+
+
+
+
+
+
+
diff --git a/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/web/pages/BaseAuthenticatedPage.java b/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/web/pages/BaseAuthenticatedPage.java
new file mode 100644
index 00000000..34e77cb5
--- /dev/null
+++ b/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/web/pages/BaseAuthenticatedPage.java
@@ -0,0 +1,106 @@
+package com.giffing.wicket.spring.boot.example.web.pages;
+
+import com.giffing.wicket.spring.boot.example.web.pages.customers.CustomerListPage;
+import com.giffing.wicket.spring.boot.example.web.pages.footer.Footer;
+import com.giffing.wicket.spring.boot.example.web.pages.websocket.ChatPage;
+import de.agilecoders.wicket.core.Bootstrap;
+import de.agilecoders.wicket.core.markup.html.bootstrap.button.BootstrapExternalLink;
+import de.agilecoders.wicket.core.markup.html.bootstrap.button.dropdown.DropDownButton;
+import de.agilecoders.wicket.core.markup.html.bootstrap.button.dropdown.MenuBookmarkablePageLink;
+import de.agilecoders.wicket.core.markup.html.bootstrap.button.dropdown.MenuDivider;
+import de.agilecoders.wicket.core.markup.html.bootstrap.button.dropdown.MenuHeader;
+import de.agilecoders.wicket.core.markup.html.bootstrap.navbar.*;
+import de.agilecoders.wicket.core.markup.html.bootstrap.utilities.BackgroundColorBehavior;
+import de.agilecoders.wicket.core.settings.IBootstrapSettings;
+import de.agilecoders.wicket.core.settings.ITheme;
+import de.agilecoders.wicket.extensions.markup.html.bootstrap.icon.FontAwesome6IconType;
+import org.apache.wicket.Component;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.link.AbstractLink;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.request.mapper.parameter.PageParameters;
+import org.apache.wicket.util.string.StringValue;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public abstract class BaseAuthenticatedPage extends BasePage {
+
+ public BaseAuthenticatedPage(final PageParameters parameters) {
+ super(parameters);
+ add(newNavbar("navbar"));
+ add(newNavigation("navigation"));
+ add(new Footer("footer"));
+ }
+
+ protected Navbar newNavbar(String markupId) {
+ Navbar navbar = new Navbar(markupId)
+ .setPosition(Navbar.Position.TOP)
+ .setInverted(true)
+ .setBackgroundColor(BackgroundColorBehavior.Color.Dark);
+
+ navbar.setBrandName(Model.of("Wicket"));
+ navbar.addComponents(NavbarComponents.transform(Navbar.ComponentPosition.LEFT,
+ new NavbarButton(CustomerListPage.class, Model.of("Customers")).setIconType(FontAwesome6IconType.person_s),
+ new NavbarButton(ChatPage.class, Model.of("Chat")).setIconType(FontAwesome6IconType.rocketchat),
+ new NavbarExternalLink(Model.of("https://github.com/MarcGiffing/wicket-spring-boot"))
+ .setLabel(Model.of("Github"))
+ .setTarget(BootstrapExternalLink.Target.blank)
+ .setIconType(FontAwesome6IconType.upload_s))
+ );
+ DropDownButton dropdown = new NavbarDropDownButton(Model.of("Themes")) {
+
+ @Override
+ public boolean isActive(Component item) {
+ return false;
+ }
+
+ @Override
+ protected List newSubMenuButtons(final String buttonMarkupId) {
+ final List subMenu = new ArrayList<>();
+ subMenu.add(new MenuHeader(Model.of("all available themes:")));
+ subMenu.add(new MenuDivider());
+
+ final IBootstrapSettings settings = Bootstrap.getSettings(getApplication());
+ final List themes = settings.getThemeProvider().available();
+
+ for (final ITheme theme : themes) {
+ PageParameters params = new PageParameters();
+ params.set("theme", theme.name());
+
+ subMenu.add(new MenuBookmarkablePageLink(getPageClass(), params, Model.of(theme.name())));
+ }
+
+ return subMenu;
+ }
+ }.setIconType(FontAwesome6IconType.book_s);
+
+ navbar.addComponents(new ImmutableNavbarComponent(dropdown, Navbar.ComponentPosition.RIGHT));
+ return navbar;
+ }
+
+ private void configureTheme(PageParameters pageParameters) {
+ StringValue theme = pageParameters.get("theme");
+
+ if (!theme.isEmpty()) {
+ IBootstrapSettings settings = Bootstrap.getSettings(getApplication());
+ settings.getActiveThemeProvider().setActiveTheme(theme.toString(""));
+ }
+ }
+
+ @Override
+ protected void onConfigure() {
+ super.onConfigure();
+ configureTheme(getPageParameters());
+ }
+
+ protected boolean hasNavigation() {
+ return false;
+ }
+
+ private Component newNavigation(String markupId) {
+ WebMarkupContainer navigation = new WebMarkupContainer(markupId);
+ navigation.setVisible(hasNavigation());
+ return navigation;
+ }
+}
diff --git a/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/web/pages/BasePage.properties b/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/web/pages/BaseAuthenticatedPage.properties
similarity index 86%
rename from wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/web/pages/BasePage.properties
rename to wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/web/pages/BaseAuthenticatedPage.properties
index a56b82c5..2abf52c0 100644
--- a/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/web/pages/BasePage.properties
+++ b/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/web/pages/BaseAuthenticatedPage.properties
@@ -4,6 +4,9 @@ firstname=Firstname
lastname=Lastname
active=Active
password=Password
+usernameLike=Username
+firstnameLike=Firstname
+lastnameLike=Lastname
yes=Yes
no=No
diff --git a/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/web/pages/BasePage.html b/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/web/pages/BasePage.html
index 0a56be93..24afbcba 100644
--- a/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/web/pages/BasePage.html
+++ b/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/web/pages/BasePage.html
@@ -1,12 +1,21 @@
-
- Wicket!
-
-
-
-
-
-
-
-
\ No newline at end of file
+
+
+ Apache Wicket & Spring Bootstrap
+
+
+
+
+
+
+
+
+ Skip navigation
+
+
+
+
+
+
+