From 3fcbbe2e161a12da611ddc1cce1832e73029e6b3 Mon Sep 17 00:00:00 2001 From: Vit Rozkovec Date: Thu, 15 Feb 2024 13:29:17 +0100 Subject: [PATCH] NavbarFormBehavior that adds .navbar-form (unused since v4) (#1032) (cherry picked from commit ee39b1caa5013fa1a0f30c6d91dc9660bd836186) --- .../html/bootstrap/navbar/NavbarForm.java | 7 ----- .../bootstrap/navbar/NavbarFormBehavior.java | 27 ------------------- 2 files changed, 34 deletions(-) delete mode 100644 bootstrap-core/src/main/java/de/agilecoders/wicket/core/markup/html/bootstrap/navbar/NavbarFormBehavior.java diff --git a/bootstrap-core/src/main/java/de/agilecoders/wicket/core/markup/html/bootstrap/navbar/NavbarForm.java b/bootstrap-core/src/main/java/de/agilecoders/wicket/core/markup/html/bootstrap/navbar/NavbarForm.java index 38f5386bf..296585347 100644 --- a/bootstrap-core/src/main/java/de/agilecoders/wicket/core/markup/html/bootstrap/navbar/NavbarForm.java +++ b/bootstrap-core/src/main/java/de/agilecoders/wicket/core/markup/html/bootstrap/navbar/NavbarForm.java @@ -34,13 +34,6 @@ public NavbarForm(String componentId, IModel model) { super(componentId, model); } - @Override - protected void onInitialize() { - super.onInitialize(); - - add(new NavbarFormBehavior()); - } - @Override public void onComponentTag(ComponentTag tag) { if (!"form".equals(tag.getName())) { diff --git a/bootstrap-core/src/main/java/de/agilecoders/wicket/core/markup/html/bootstrap/navbar/NavbarFormBehavior.java b/bootstrap-core/src/main/java/de/agilecoders/wicket/core/markup/html/bootstrap/navbar/NavbarFormBehavior.java deleted file mode 100644 index 7f1c94461..000000000 --- a/bootstrap-core/src/main/java/de/agilecoders/wicket/core/markup/html/bootstrap/navbar/NavbarFormBehavior.java +++ /dev/null @@ -1,27 +0,0 @@ -package de.agilecoders.wicket.core.markup.html.bootstrap.navbar; - -import de.agilecoders.wicket.core.markup.html.bootstrap.behavior.BootstrapBaseBehavior; -import de.agilecoders.wicket.core.util.Attributes; - -import org.apache.wicket.Component; -import org.apache.wicket.markup.ComponentTag; - -/** - * Adds all necessary css class names to a navbar form. - * - * @author miha - */ -public class NavbarFormBehavior extends BootstrapBaseBehavior { - - @Override - public void onComponentTag(Component component, ComponentTag tag) { - if (!"form".equals(tag.getName())) { - tag.setName("form"); - } - - Attributes.addClass(tag, "navbar-form"); - - super.onComponentTag(component, tag); - } - -}