diff --git a/jdk-1.7-parent/pom.xml b/jdk-1.7-parent/pom.xml
index fa4d935e51..f1e55abe38 100644
--- a/jdk-1.7-parent/pom.xml
+++ b/jdk-1.7-parent/pom.xml
@@ -93,6 +93,7 @@
wicketstuff-glassfish4-integrationserializer-fast2
+ wicket-foundation
diff --git a/jdk-1.7-parent/wicket-foundation/.gitignore b/jdk-1.7-parent/wicket-foundation/.gitignore
new file mode 100644
index 0000000000..841e8d948a
--- /dev/null
+++ b/jdk-1.7-parent/wicket-foundation/.gitignore
@@ -0,0 +1,8 @@
+# Eclipse
+.classpath
+.project
+.settings/
+
+# Maven
+log/
+target/
diff --git a/jdk-1.7-parent/wicket-foundation/.travis.yml b/jdk-1.7-parent/wicket-foundation/.travis.yml
new file mode 100644
index 0000000000..aa5e8b7c1b
--- /dev/null
+++ b/jdk-1.7-parent/wicket-foundation/.travis.yml
@@ -0,0 +1,3 @@
+language: java
+after_success:
+ - mvn clean cobertura:cobertura coveralls:cobertura
diff --git a/jdk-1.7-parent/wicket-foundation/LICENSE.md b/jdk-1.7-parent/wicket-foundation/LICENSE.md
new file mode 100644
index 0000000000..5c304d1a4a
--- /dev/null
+++ b/jdk-1.7-parent/wicket-foundation/LICENSE.md
@@ -0,0 +1,201 @@
+Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "{}"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright {yyyy} {name of copyright owner}
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/jdk-1.7-parent/wicket-foundation/README.md b/jdk-1.7-parent/wicket-foundation/README.md
new file mode 100644
index 0000000000..48ec9edf48
--- /dev/null
+++ b/jdk-1.7-parent/wicket-foundation/README.md
@@ -0,0 +1,24 @@
+#wicket-foundation
+
+Integrates [Apache Wicket](http://wicket.apache.org/) 7.x and [Zurb Foundation](http://foundation.zurb.com/) 5.x
+
+
+
+## Build instructions
+
+```
+mvn clean install
+cd wicket-foundation-samples
+mvn jetty:run
+```
+Now open browser and navigate to http://localhost:8080 to see the sample application.
+
+
+
+## License
+
+Wicket-foundation is distributed under the terms of the Apache Software Foundation
+license, version 2.0. The text is included in the file LICENSE.md in the root
+of the project.
+
+
diff --git a/jdk-1.7-parent/wicket-foundation/pom.xml b/jdk-1.7-parent/wicket-foundation/pom.xml
new file mode 100644
index 0000000000..4b7130c467
--- /dev/null
+++ b/jdk-1.7-parent/wicket-foundation/pom.xml
@@ -0,0 +1,38 @@
+
+
+ 4.0.0
+
+
+ org.wicketstuff
+ jdk-1.7-parent
+ 7.0-SNAPSHOT
+
+
+ org.wicketstuff.foundation
+ wicket-foundation-parent
+ pom
+ Wicket Foundation Parent
+ Integration for Apache Wicket and Zurb Foundation.
+ https://github.com/iluwatar/wicket-foundation
+
+
+
+ The Apache License, Version 2.0
+ http://www.apache.org/licenses/LICENSE-2.0.txt
+
+
+
+
+
+ Ilkka Seppälä
+ https://github.com/iluwatar
+
+
+
+
+ wicket-foundation-samples
+ wicket-foundation-core
+
+
+
diff --git a/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/pom.xml b/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/pom.xml
new file mode 100644
index 0000000000..1dc61dedd1
--- /dev/null
+++ b/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/pom.xml
@@ -0,0 +1,42 @@
+
+
+ 4.0.0
+
+
+ org.wicketstuff.foundation
+ wicket-foundation-parent
+ 7.0-SNAPSHOT
+
+
+ wicket-foundation-core
+
+
+
+ org.apache.wicket
+ wicket-core
+
+
+ junit
+ junit
+
+
+ org.slf4j
+ slf4j-log4j12
+ test
+
+
+ log4j
+ log4j
+ test
+
+
+ javax.servlet
+ servlet-api
+ 2.5
+ test
+
+
+
+
diff --git a/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/Foundation.java b/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/Foundation.java
new file mode 100644
index 0000000000..0838823a2a
--- /dev/null
+++ b/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/Foundation.java
@@ -0,0 +1,72 @@
+package org.wicketstuff.foundation;
+
+import org.apache.wicket.request.resource.CssResourceReference;
+import org.apache.wicket.request.resource.JavaScriptResourceReference;
+import org.apache.wicket.request.resource.ResourceReference;
+
+/**
+ * Foundation resources container. It is typically used by component base classes.
+ * The resources are available through static getters.
+ * @author ilkka
+ *
+ */
+public class Foundation {
+
+ private static ResourceReference foundationCssReference;
+
+ private static ResourceReference foundationIconsCssReference;
+
+ private static ResourceReference normalizeCssReference;
+
+ private static ResourceReference foundationJsReference;
+
+ private static ResourceReference modernizrJsReference;
+
+ private static ResourceReference fastclickJsReference;
+
+ public static ResourceReference getFoundationCssReference() {
+ if (foundationCssReference == null) {
+ foundationCssReference = new CssResourceReference(Foundation.class, "foundation.css");
+ }
+ return foundationCssReference;
+ }
+
+ public static ResourceReference getFoundationIconsCssReference() {
+ if (foundationIconsCssReference == null) {
+ foundationIconsCssReference = new CssResourceReference(Foundation.class, "foundation-icons.css");
+ }
+ return foundationIconsCssReference;
+ }
+
+ public static ResourceReference getNormalizeCssReference() {
+ if (normalizeCssReference == null) {
+ normalizeCssReference = new CssResourceReference(Foundation.class, "normalize.css");
+ }
+ return normalizeCssReference;
+ }
+
+ public static ResourceReference getFoundationJsReference() {
+ if (foundationJsReference == null) {
+ foundationJsReference = new JavaScriptResourceReference(Foundation.class, "foundation.min.js");
+ }
+ return foundationJsReference;
+ }
+
+ public static ResourceReference getModernizrJsReference() {
+ if (modernizrJsReference == null) {
+ modernizrJsReference = new JavaScriptResourceReference(Foundation.class, "modernizr.js");
+ }
+ return modernizrJsReference;
+ }
+
+ public static ResourceReference getFastclickJsReference() {
+ if (fastclickJsReference == null) {
+ fastclickJsReference = new JavaScriptResourceReference(Foundation.class, "fastclick.js");
+ }
+ return fastclickJsReference;
+ }
+
+ public static String getFoundationInitScript() {
+ return "$(document).foundation();";
+ }
+}
diff --git a/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/alert/AlertColor.java b/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/alert/AlertColor.java
new file mode 100644
index 0000000000..ef004375d7
--- /dev/null
+++ b/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/alert/AlertColor.java
@@ -0,0 +1,5 @@
+package org.wicketstuff.foundation.alert;
+
+public enum AlertColor {
+ SECONDARY, SUCCESS, ALERT, WARNING, INFO;
+}
diff --git a/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/alert/AlertOptions.java b/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/alert/AlertOptions.java
new file mode 100644
index 0000000000..a60d1aac6f
--- /dev/null
+++ b/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/alert/AlertOptions.java
@@ -0,0 +1,57 @@
+package org.wicketstuff.foundation.alert;
+
+import java.io.Serializable;
+
+import org.wicketstuff.foundation.button.ButtonRadius;
+
+/**
+ * Options for FoundationAlert.
+ * @author ilkka
+ *
+ */
+public class AlertOptions implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ private AlertColor color;
+ private ButtonRadius radius;
+
+ public AlertOptions() {
+ }
+
+ public AlertOptions(AlertColor color) {
+ this.color = color;
+ }
+
+ public AlertOptions(ButtonRadius radius) {
+ this.radius = radius;
+ }
+
+ public AlertOptions(AlertColor color, ButtonRadius radius) {
+ this.color = color;
+ this.radius = radius;
+ }
+
+ public AlertOptions(AlertOptions other) {
+ this.color = other.color;
+ this.radius = other.radius;
+ }
+
+ public AlertColor getColor() {
+ return color;
+ }
+
+ public AlertOptions setColor(AlertColor color) {
+ this.color = color;
+ return this;
+ }
+
+ public ButtonRadius getRadius() {
+ return radius;
+ }
+
+ public AlertOptions setRadius(ButtonRadius radius) {
+ this.radius = radius;
+ return this;
+ }
+}
diff --git a/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/alert/FoundationAlert.html b/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/alert/FoundationAlert.html
new file mode 100644
index 0000000000..fa2c7c7c33
--- /dev/null
+++ b/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/alert/FoundationAlert.html
@@ -0,0 +1,13 @@
+
+
+
+
+wicket-foundation
+
+
+
+
+ ×
+
+
+
diff --git a/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/alert/FoundationAlert.java b/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/alert/FoundationAlert.java
new file mode 100644
index 0000000000..4b25203a2e
--- /dev/null
+++ b/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/alert/FoundationAlert.java
@@ -0,0 +1,73 @@
+package org.wicketstuff.foundation.alert;
+
+import org.apache.wicket.markup.ComponentTag;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.Model;
+import org.wicketstuff.foundation.component.FoundationJsPanel;
+import org.wicketstuff.foundation.util.Attribute;
+import org.wicketstuff.foundation.util.StringUtil;
+
+/**
+ * Alert boxes are elements you can use to communicate success, warnings, failure or just information.
+ * http://foundation.zurb.com/docs/components/alert_boxes.html
+ * @author ilkka
+ *
+ */
+public class FoundationAlert extends FoundationJsPanel {
+
+ private static final long serialVersionUID = 1L;
+
+ private IModel optionsModel;
+
+ /**
+ * Create FoundationAlert component.
+ * @param id - Wicket id.
+ * @param titleModel - Model for getting the alert text.
+ */
+ public FoundationAlert(String id, IModel titleModel) {
+ this(id, titleModel, new AlertOptions());
+ }
+
+ /**
+ * Create FoundationAlert component.
+ * @param id - Wicket id.
+ * @param titleModel - Model for getting the alert text.
+ * @param options - Options for the component.
+ */
+ public FoundationAlert(String id, IModel titleModel, AlertOptions options) {
+ this(id, titleModel, Model.of(options));
+ }
+
+ /**
+ * Create FoundationAlert component.
+ * @param id - Wicket id.
+ * @param titleModel - Model for getting the alert text.
+ * @param optionsModel - Model for getting the component options.
+ */
+ public FoundationAlert(String id, IModel titleModel, IModel optionsModel) {
+ super(id);
+ add(new Label("body", titleModel));
+ this.optionsModel = optionsModel;
+ }
+
+ @Override
+ protected void onComponentTag(ComponentTag tag) {
+ Attribute.addAttribute(tag, "data-alert");
+ Attribute.setClass(tag, "alert-box");
+ AlertOptions options = optionsModel.getObject();
+ if (options.getColor() != null) {
+ Attribute.addClass(tag, StringUtil.EnumNameToCssClassName(options.getColor().name()));
+ }
+ if (options.getRadius() != null) {
+ Attribute.addClass(tag, StringUtil.EnumNameToCssClassName(options.getRadius().name()));
+ }
+ super.onComponentTag(tag);
+ }
+
+ @Override
+ protected void onDetach() {
+ optionsModel.detach();
+ super.onDetach();
+ }
+}
diff --git a/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/behavior/FoundationBaseBehavior.java b/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/behavior/FoundationBaseBehavior.java
new file mode 100644
index 0000000000..c3043d2e53
--- /dev/null
+++ b/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/behavior/FoundationBaseBehavior.java
@@ -0,0 +1,23 @@
+package org.wicketstuff.foundation.behavior;
+
+import org.apache.wicket.Component;
+import org.apache.wicket.behavior.Behavior;
+import org.apache.wicket.markup.head.CssHeaderItem;
+import org.apache.wicket.markup.head.IHeaderResponse;
+import org.wicketstuff.foundation.Foundation;
+
+/**
+ * Behavior that includes Foundation CSS.
+ * @author ilkka
+ *
+ */
+public abstract class FoundationBaseBehavior extends Behavior {
+
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public void renderHead(Component component, IHeaderResponse response) {
+ super.renderHead(component, response);
+ response.render(CssHeaderItem.forReference(Foundation.getFoundationCssReference()));
+ }
+}
diff --git a/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/behavior/FoundationJsBehavior.java b/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/behavior/FoundationJsBehavior.java
new file mode 100644
index 0000000000..2aa5896218
--- /dev/null
+++ b/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/behavior/FoundationJsBehavior.java
@@ -0,0 +1,28 @@
+package org.wicketstuff.foundation.behavior;
+
+import org.apache.wicket.Application;
+import org.apache.wicket.Component;
+import org.apache.wicket.markup.head.IHeaderResponse;
+import org.apache.wicket.markup.head.JavaScriptHeaderItem;
+import org.apache.wicket.markup.head.OnDomReadyHeaderItem;
+import org.wicketstuff.foundation.Foundation;
+
+/**
+ * Behavior that includes Foundation CSS and JS libraries.
+ * @author ilkka
+ *
+ */
+public class FoundationJsBehavior extends FoundationBaseBehavior {
+
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public void renderHead(Component component, IHeaderResponse response) {
+ super.renderHead(component, response);
+ response.render(JavaScriptHeaderItem.forReference(Foundation.getModernizrJsReference()));
+ response.render(JavaScriptHeaderItem.forReference(Application.get().getJavaScriptLibrarySettings().getJQueryReference()));
+ response.render(JavaScriptHeaderItem.forReference(Foundation.getFastclickJsReference()));
+ response.render(JavaScriptHeaderItem.forReference(Foundation.getFoundationJsReference()));
+ response.render(OnDomReadyHeaderItem.forScript(Foundation.getFoundationInitScript()));
+ }
+}
diff --git a/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/blockgrid/BlockGridOptions.java b/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/blockgrid/BlockGridOptions.java
new file mode 100644
index 0000000000..4b5d61a0c2
--- /dev/null
+++ b/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/blockgrid/BlockGridOptions.java
@@ -0,0 +1,42 @@
+package org.wicketstuff.foundation.blockgrid;
+
+import java.io.Serializable;
+
+/**
+ * Options for FoundationBlockGrid.
+ * @author ilkka
+ *
+ */
+public class BlockGridOptions implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ private BlockGridType type;
+ private int columnCount;
+
+ public BlockGridOptions(BlockGridType type, int columnCount) {
+ this.type = type;
+ this.columnCount = columnCount;
+ }
+
+ public BlockGridOptions(BlockGridOptions other) {
+ this.type = other.type;
+ this.columnCount = other.columnCount;
+ }
+
+ public BlockGridType getType() {
+ return type;
+ }
+
+ public void setType(BlockGridType type) {
+ this.type = type;
+ }
+
+ public int getColumnCount() {
+ return columnCount;
+ }
+
+ public void setColumnCount(int columnCount) {
+ this.columnCount = columnCount;
+ }
+}
diff --git a/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/blockgrid/BlockGridType.java b/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/blockgrid/BlockGridType.java
new file mode 100644
index 0000000000..2e3adb204f
--- /dev/null
+++ b/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/blockgrid/BlockGridType.java
@@ -0,0 +1,5 @@
+package org.wicketstuff.foundation.blockgrid;
+
+public enum BlockGridType {
+ SMALL_BLOCK_GRID, MEDIUM_BLOCK_GRID, LARGE_BLOCK_GRID;
+}
diff --git a/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/blockgrid/FoundationBlockGrid.html b/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/blockgrid/FoundationBlockGrid.html
new file mode 100644
index 0000000000..d015f0e126
--- /dev/null
+++ b/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/blockgrid/FoundationBlockGrid.html
@@ -0,0 +1,14 @@
+
+
+
+
+wicket-foundation
+
+
+
+
+
+
+
+
+
diff --git a/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/blockgrid/FoundationBlockGrid.java b/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/blockgrid/FoundationBlockGrid.java
new file mode 100644
index 0000000000..f64bb5da50
--- /dev/null
+++ b/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/blockgrid/FoundationBlockGrid.java
@@ -0,0 +1,108 @@
+package org.wicketstuff.foundation.blockgrid;
+
+import java.util.Arrays;
+import java.util.List;
+
+import org.apache.wicket.markup.ComponentTag;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.list.ListItem;
+import org.apache.wicket.markup.html.list.ListView;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.util.ListModel;
+import org.wicketstuff.foundation.component.FoundationBasePanel;
+import org.wicketstuff.foundation.util.Attribute;
+import org.wicketstuff.foundation.util.StringUtil;
+
+/**
+ * Block grids give you a way to evenly split contents of a list within the grid.
+ * http://foundation.zurb.com/docs/components/block_grid.html
+ * @author ilkka
+ * @param - The type of model object.
+ */
+public abstract class FoundationBlockGrid extends FoundationBasePanel {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Create FoundationBlockGrid component.
+ * @param id - Wicket id.
+ * @param options - Options for the component.
+ * @param modelObjects - The model objects passed to client through createContent models parameter.
+ */
+ public FoundationBlockGrid(String id, BlockGridOptions options, List modelObjects) {
+ this(id, new ListModel(Arrays.asList(options)), new ListModel(modelObjects));
+ }
+
+ /**
+ * Create FoundationBlockGrid component.
+ * @param id - Wicket id.
+ * @param optionsList - List of component options.
+ * @param modelObjects - The model objects passed to client through createContent models parameter.
+ */
+ public FoundationBlockGrid(String id, List optionsList, List modelObjects) {
+ this(id, new ListModel(optionsList), new ListModel(modelObjects));
+ }
+
+ /**
+ * Create FoundationBlockGrid component.
+ * @param id - Wicket id.
+ * @param optionsListModel - Model providing list of options for the component.
+ * @param models - The models passed to client through createContent models parameter.
+ */
+ public FoundationBlockGrid(String id, IModel> optionsListModel, IModel> models) {
+ super(id);
+ BlockGridContainer container = new BlockGridContainer("container", optionsListModel);
+ add(container);
+ container.add(new ListView("item", models) {
+
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ protected void populateItem(ListItem item) {
+ WebMarkupContainer content = FoundationBlockGrid.this.createContent(item.getIndex(), "content", item.getModel());
+ item.add(content);
+ }
+ });
+ }
+
+ /**
+ *
+ * @param idx - Index number of the content item.
+ * @param id - Wicket id for the content item.
+ * @param model - Model for the content item.
+ * @return Content item to be placed into the FoundationBlockGrid.
+ */
+ public abstract WebMarkupContainer createContent(int idx, String id, IModel model);
+
+ private class BlockGridContainer extends WebMarkupContainer {
+
+ private static final long serialVersionUID = 1L;
+
+ private IModel> optionsListModel;
+
+ public BlockGridContainer(String id, IModel> optionsListModel) {
+ super(id);
+ this.optionsListModel = optionsListModel;
+ }
+
+ @Override
+ protected void onComponentTag(ComponentTag tag) {
+ for (BlockGridOptions options: optionsListModel.getObject()) {
+ String cssClass = resolveCssClass(options);
+ Attribute.addClass(tag, cssClass);
+ }
+ super.onComponentTag(tag);
+ }
+
+ private String resolveCssClass(BlockGridOptions options) {
+ String typeName = StringUtil.EnumNameToCssClassName(options.getType().name());
+ return String.format("%s-%d", typeName, options.getColumnCount());
+ }
+
+ @Override
+ protected void onDetach() {
+ optionsListModel.detach();
+ super.onDetach();
+ }
+ }
+}
diff --git a/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/blockgrid/FoundationBlockGridImageContent.html b/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/blockgrid/FoundationBlockGridImageContent.html
new file mode 100644
index 0000000000..75c8e9ae0f
--- /dev/null
+++ b/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/blockgrid/FoundationBlockGridImageContent.html
@@ -0,0 +1,12 @@
+
+
+
+
+wicket-foundation
+
+
+
+
+
+
+
diff --git a/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/blockgrid/FoundationBlockGridImageContent.java b/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/blockgrid/FoundationBlockGridImageContent.java
new file mode 100644
index 0000000000..8a8f6f7e31
--- /dev/null
+++ b/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/blockgrid/FoundationBlockGridImageContent.java
@@ -0,0 +1,25 @@
+package org.wicketstuff.foundation.blockgrid;
+
+import org.apache.wicket.markup.html.image.Image;
+import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.request.resource.PackageResourceReference;
+
+/**
+ * Image content item for the FoundationBlockGrid component.
+ * @author ilkka
+ *
+ */
+public class FoundationBlockGridImageContent extends Panel {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ *
+ * @param id - Wicket id.
+ * @param resourceReference - Resource reference for the image.
+ */
+ public FoundationBlockGridImageContent(String id, PackageResourceReference resourceReference) {
+ super(id);
+ add(new Image("img", resourceReference));
+ }
+}
diff --git a/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/border/FoundationBaseBorder.java b/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/border/FoundationBaseBorder.java
new file mode 100644
index 0000000000..dbc30c7479
--- /dev/null
+++ b/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/border/FoundationBaseBorder.java
@@ -0,0 +1,40 @@
+package org.wicketstuff.foundation.border;
+
+import org.apache.wicket.markup.head.CssHeaderItem;
+import org.apache.wicket.markup.head.IHeaderResponse;
+import org.apache.wicket.markup.html.border.Border;
+import org.apache.wicket.model.IModel;
+import org.wicketstuff.foundation.Foundation;
+
+/**
+ * Base class for Borders that includes Foundation CSS.
+ * @author ilkka
+ *
+ */
+public abstract class FoundationBaseBorder extends Border {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Create FoundationBaseBorder.
+ * @param id - Wicket id.
+ */
+ public FoundationBaseBorder(String id) {
+ super(id);
+ }
+
+ /**
+ * Create FoundationBaseBorder.
+ * @param id - Wicket id.
+ * @param model - Model for the component.
+ */
+ public FoundationBaseBorder(String id, IModel> model) {
+ super(id, model);
+ }
+
+ @Override
+ public void renderHead(IHeaderResponse response) {
+ super.renderHead(response);
+ response.render(CssHeaderItem.forReference(Foundation.getFoundationCssReference()));
+ }
+}
diff --git a/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/breadcrumbs/BreadcrumbsItem.java b/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/breadcrumbs/BreadcrumbsItem.java
new file mode 100644
index 0000000000..e196b25b44
--- /dev/null
+++ b/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/breadcrumbs/BreadcrumbsItem.java
@@ -0,0 +1,54 @@
+package org.wicketstuff.foundation.breadcrumbs;
+
+import java.io.Serializable;
+
+/**
+ * Item for FoundationBreadcrumbs component.
+ * @author ilkka
+ *
+ */
+public class BreadcrumbsItem implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ private String title;
+ private boolean disabled;
+ private boolean current;
+
+ public BreadcrumbsItem(String title) {
+ this.title = title;
+ }
+
+ public BreadcrumbsItem(String title, boolean disabled, boolean current) {
+ this.title = title;
+ this.disabled = disabled;
+ this.current = current;
+ }
+
+ public String getTitle() {
+ return title;
+ }
+
+ public BreadcrumbsItem setTitle(String title) {
+ this.title = title;
+ return this;
+ }
+
+ public boolean isDisabled() {
+ return disabled;
+ }
+
+ public BreadcrumbsItem setDisabled(boolean disabled) {
+ this.disabled = disabled;
+ return this;
+ }
+
+ public boolean isCurrent() {
+ return current;
+ }
+
+ public BreadcrumbsItem setCurrent(boolean current) {
+ this.current = current;
+ return this;
+ }
+}
diff --git a/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/breadcrumbs/FoundationBreadcrumbs.html b/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/breadcrumbs/FoundationBreadcrumbs.html
new file mode 100644
index 0000000000..2d128d0e6b
--- /dev/null
+++ b/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/breadcrumbs/FoundationBreadcrumbs.html
@@ -0,0 +1,14 @@
+
+
+
+
+wicket-foundation
+
+
+
+
+
+
+
+
+
diff --git a/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/breadcrumbs/FoundationBreadcrumbs.java b/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/breadcrumbs/FoundationBreadcrumbs.java
new file mode 100644
index 0000000000..97bb81c37c
--- /dev/null
+++ b/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/breadcrumbs/FoundationBreadcrumbs.java
@@ -0,0 +1,87 @@
+package org.wicketstuff.foundation.breadcrumbs;
+
+import java.util.List;
+
+import org.apache.wicket.behavior.AttributeAppender;
+import org.apache.wicket.markup.ComponentTag;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.link.AbstractLink;
+import org.apache.wicket.markup.html.list.ListItem;
+import org.apache.wicket.markup.html.list.ListView;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.util.ListModel;
+import org.wicketstuff.foundation.component.FoundationBasePanel;
+import org.wicketstuff.foundation.util.Attribute;
+
+/**
+ * Breadcrumbs come in handy to show a navigation trail for users clicking through a site or app.
+ * http://foundation.zurb.com/docs/components/breadcrumbs.html
+ * @author ilkka
+ *
+ */
+public abstract class FoundationBreadcrumbs extends FoundationBasePanel {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Create FoundationBreadcrumbs.
+ * @param id - Wicket id.
+ * @param items - List of breadcrumbs items.
+ */
+ public FoundationBreadcrumbs(String id, List items) {
+ this(id, new ListModel<>(items));
+ }
+
+ /**
+ * Create FoundationBreadcrumbs.
+ * @param id - Wicket id.
+ * @param itemsModel - Model providing the list of breadcrumbs items.
+ */
+ public FoundationBreadcrumbs(String id, IModel> itemsModel) {
+ super(id);
+ BreadcrumbsContainer breadcrumbsContainer = new BreadcrumbsContainer("breadcrumbsContainer");
+ add(breadcrumbsContainer);
+ breadcrumbsContainer.add(new ListView("breadcrumbsItem", itemsModel) {
+
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ protected void populateItem(ListItem item) {
+ BreadcrumbsItem breadcrumbsItem = item.getModelObject();
+ if (breadcrumbsItem.isCurrent()) {
+ item.add(new AttributeAppender("class", "current"));
+ }
+ if (breadcrumbsItem.isDisabled()) {
+ item.add(new AttributeAppender("class", "unavailable"));
+ }
+ AbstractLink link = createLink("breadcrumbsItemLink", item.getIndex());
+ item.add(link);
+ link.add(new Label("breadcrumbsItemTitle", breadcrumbsItem.getTitle()));
+ }
+ });
+ }
+
+ /**
+ * Create link for FoundationBreadcrumbs.
+ * @param id - Wicket id.
+ * @param idx - Index number of the item.
+ * @return AbstractLink
+ */
+ public abstract AbstractLink createLink(String id, int idx);
+
+ private static class BreadcrumbsContainer extends WebMarkupContainer {
+
+ private static final long serialVersionUID = 1L;
+
+ public BreadcrumbsContainer(String id) {
+ super(id);
+ }
+
+ @Override
+ protected void onComponentTag(ComponentTag tag) {
+ Attribute.setClass(tag, "breadcrumbs");
+ super.onComponentTag(tag);
+ }
+ }
+}
diff --git a/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/button/ButtonColor.java b/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/button/ButtonColor.java
new file mode 100644
index 0000000000..064ddcd92f
--- /dev/null
+++ b/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/button/ButtonColor.java
@@ -0,0 +1,5 @@
+package org.wicketstuff.foundation.button;
+
+public enum ButtonColor {
+ SECONDARY, SUCCESS, ALERT;
+}
\ No newline at end of file
diff --git a/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/button/ButtonExpansion.java b/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/button/ButtonExpansion.java
new file mode 100644
index 0000000000..372b044305
--- /dev/null
+++ b/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/button/ButtonExpansion.java
@@ -0,0 +1,5 @@
+package org.wicketstuff.foundation.button;
+
+public enum ButtonExpansion {
+ EXPAND;
+}
\ No newline at end of file
diff --git a/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/button/ButtonOptions.java b/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/button/ButtonOptions.java
new file mode 100644
index 0000000000..530022a90e
--- /dev/null
+++ b/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/button/ButtonOptions.java
@@ -0,0 +1,104 @@
+package org.wicketstuff.foundation.button;
+
+import java.io.Serializable;
+
+/**
+ * Options for different types of Foundation buttons.
+ * @author ilkka
+ *
+ */
+public class ButtonOptions implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ private ButtonSize size;
+ private ButtonColor color;
+ private ButtonRadius radius;
+ private ButtonState state;
+ private ButtonExpansion expansion;
+
+ public ButtonOptions() {
+ }
+
+ public ButtonOptions(ButtonSize size) {
+ this.size = size;
+ }
+
+ public ButtonOptions(ButtonColor color) {
+ this.color = color;
+ }
+
+ public ButtonOptions(ButtonRadius radius) {
+ this.radius = radius;
+ }
+
+ public ButtonOptions(ButtonState state) {
+ this.state = state;
+ }
+
+ public ButtonOptions(ButtonExpansion expansion) {
+ this.expansion = expansion;
+ }
+
+ public ButtonOptions(ButtonOptions options) {
+ this.size = options.getFoundationButtonSize();
+ this.color = options.getFoundationButtonColor();
+ this.radius = options.getFoundationButtonRadius();
+ this.state = options.getFoundationButtonState();
+ this.expansion = options.getFoundationButtonExpansion();
+ }
+
+ public ButtonSize getFoundationButtonSize() {
+ return size;
+ }
+
+ public ButtonOptions setFoundationButtonSize(ButtonSize foundationButtonSize) {
+ this.size = foundationButtonSize;
+ return this;
+ }
+
+ public ButtonColor getFoundationButtonColor() {
+ return color;
+ }
+
+ public ButtonOptions setFoundationButtonColor(ButtonColor foundationButtonColor) {
+ this.color = foundationButtonColor;
+ return this;
+ }
+
+ public ButtonRadius getFoundationButtonRadius() {
+ return radius;
+ }
+
+ public ButtonOptions setFoundationButtonRadius(ButtonRadius foundationButtonRadius) {
+ this.radius = foundationButtonRadius;
+ return this;
+ }
+
+ public ButtonState getFoundationButtonState() {
+ return state;
+ }
+
+ public ButtonOptions setFoundationButtonState(ButtonState foundationButtonState) {
+ this.state = foundationButtonState;
+ return this;
+ }
+
+ public ButtonExpansion getFoundationButtonExpansion() {
+ return expansion;
+ }
+
+ public ButtonOptions setFoundationButtonExpansion(ButtonExpansion foundationButtonExpansion) {
+ this.expansion = foundationButtonExpansion;
+ return this;
+ }
+
+ public ButtonOptions reset() {
+ size = null;
+ color = null;
+ radius = null;
+ state = null;
+ expansion = null;
+ return this;
+ }
+}
diff --git a/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/button/ButtonRadius.java b/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/button/ButtonRadius.java
new file mode 100644
index 0000000000..f8860e38ac
--- /dev/null
+++ b/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/button/ButtonRadius.java
@@ -0,0 +1,5 @@
+package org.wicketstuff.foundation.button;
+
+public enum ButtonRadius {
+ RADIUS, ROUND;
+}
\ No newline at end of file
diff --git a/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/button/ButtonSize.java b/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/button/ButtonSize.java
new file mode 100644
index 0000000000..e25c0293c1
--- /dev/null
+++ b/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/button/ButtonSize.java
@@ -0,0 +1,5 @@
+package org.wicketstuff.foundation.button;
+
+public enum ButtonSize {
+ TINY, SMALL, MEDIUM, LARGE;
+}
diff --git a/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/button/ButtonState.java b/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/button/ButtonState.java
new file mode 100644
index 0000000000..5d6e8b1148
--- /dev/null
+++ b/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/button/ButtonState.java
@@ -0,0 +1,5 @@
+package org.wicketstuff.foundation.button;
+
+public enum ButtonState {
+ DISABLED;
+}
\ No newline at end of file
diff --git a/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/button/FoundationAjaxButton.java b/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/button/FoundationAjaxButton.java
new file mode 100644
index 0000000000..4633e93b73
--- /dev/null
+++ b/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/button/FoundationAjaxButton.java
@@ -0,0 +1,102 @@
+package org.wicketstuff.foundation.button;
+
+import org.apache.wicket.ajax.markup.html.form.AjaxButton;
+import org.apache.wicket.markup.ComponentTag;
+import org.apache.wicket.markup.MarkupStream;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.Model;
+
+/**
+ * Buttons are convenient tools when you need more traditional actions. To that end, Foundation has many
+ * easy to use button styles that you can customize or override to fit your needs.
+ * http://foundation.zurb.com/docs/components/buttons.html
+ * @author ilkka
+ *
+ */
+public class FoundationAjaxButton extends AjaxButton {
+
+ private static final long serialVersionUID = 1L;
+
+ private IModel optionsModel;
+
+ /**
+ * Create FoundationAjaxButton.
+ * @param id Wicket id.
+ */
+ public FoundationAjaxButton(String id) {
+ this(id, new ButtonOptions());
+ }
+
+ /**
+ * Create FoundationAjaxButton.
+ * @param id Wicket id.
+ * @param options Options for the button.
+ */
+ public FoundationAjaxButton(String id, ButtonOptions options) {
+ super(id);
+ optionsModel = Model.of(options);
+ add(new FoundationButtonBehavior(optionsModel));
+ }
+
+ /**
+ * Create FoundationAjaxButton.
+ * @param id Wicket id.
+ * @param form The form to be submitted.
+ * @param options Options for the button.
+ */
+ public FoundationAjaxButton(String id, Form> form, ButtonOptions options) {
+ super(id, form);
+ optionsModel = Model.of(options);
+ add(new FoundationButtonBehavior(optionsModel));
+ }
+
+ /**
+ * Create FoundationAjaxButton.
+ * @param id Wicket id.
+ * @param model Model for button title.
+ * @param options Options for the button.
+ */
+ public FoundationAjaxButton(String id, IModel model, ButtonOptions options) {
+ super(id, model);
+ optionsModel = Model.of(options);
+ add(new FoundationButtonBehavior(optionsModel));
+ }
+
+ /**
+ * Create FoundationAjaxButton.
+ * @param id Wicket id.
+ * @param model Model for button title.
+ * @param form The form to be submitted.
+ * @param options Options for the button.
+ */
+ public FoundationAjaxButton(String id, IModel model, Form> form, ButtonOptions options) {
+ this(id, model, form, Model.of(options));
+ }
+
+ /**
+ * Create FoundationAjaxButton.
+ * @param id Wicket id.
+ * @param model Model for button title.
+ * @param form The form to be submitted.
+ * @param optionsModel Model providing options for the button.
+ */
+ public FoundationAjaxButton(String id, IModel model, Form> form, IModel optionsModel) {
+ super(id, model, form);
+ this.optionsModel = optionsModel;
+ add(new FoundationButtonBehavior(optionsModel));
+ }
+
+ @Override
+ public void onComponentTagBody(MarkupStream markupStream,
+ ComponentTag openTag) {
+ this.replaceComponentTagBody(markupStream, openTag, this.getDefaultModelObjectAsString());
+ super.onComponentTagBody(markupStream, openTag);
+ }
+
+ @Override
+ protected void onDetach() {
+ this.optionsModel.detach();
+ super.onDetach();
+ }
+}
diff --git a/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/button/FoundationAjaxLink.java b/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/button/FoundationAjaxLink.java
new file mode 100644
index 0000000000..8cd8ca21cb
--- /dev/null
+++ b/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/button/FoundationAjaxLink.java
@@ -0,0 +1,88 @@
+package org.wicketstuff.foundation.button;
+
+import org.apache.wicket.ajax.markup.html.AjaxLink;
+import org.apache.wicket.markup.ComponentTag;
+import org.apache.wicket.markup.MarkupStream;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.util.lang.Args;
+
+/**
+ * Buttons are convenient tools when you need more traditional actions. To that end, Foundation has many
+ * easy to use button styles that you can customize or override to fit your needs.
+ * http://foundation.zurb.com/docs/components/buttons.html
+ * @author ilkka
+ *
+ * @param The type of the model object.
+ */
+public abstract class FoundationAjaxLink extends AjaxLink {
+
+ private static final long serialVersionUID = 1L;
+
+ private IModel optionsModel;
+
+ /**
+ * Create FoundationAjaxLink.
+ * @param id Wicket id.
+ */
+ public FoundationAjaxLink(String id) {
+ this(id, new ButtonOptions());
+ }
+
+ /**
+ * Create FoundationAjaxLink.
+ * @param id Wicket id.
+ * @param options Options for the link.
+ */
+ public FoundationAjaxLink(String id, ButtonOptions options) {
+ super(id);
+ Args.notNull(options, "options");
+ optionsModel = Model.of(options);
+ add(new FoundationButtonBehavior(optionsModel));
+ }
+
+ /**
+ * Create FoundationAjaxLink.
+ * @param id Wicket id.
+ * @param model Model for the link.
+ */
+ public FoundationAjaxLink(String id, IModel model) {
+ this(id, model, new ButtonOptions());
+ }
+
+ /**
+ * Create FoundationAjaxLink.
+ * @param id Wicket id.
+ * @param model Model for the link.
+ * @param options Options for the link.
+ */
+ public FoundationAjaxLink(String id, IModel model, ButtonOptions options) {
+ this(id, model, Model.of(options));
+ }
+
+ /**
+ * Create FoundationAjaxLink.
+ * @param id Wicket id.
+ * @param model Model for the link.
+ * @param optionsModel Model providing options for the link.
+ */
+ public FoundationAjaxLink(String id, IModel model, IModel optionsModel) {
+ super(id, model);
+ Args.notNull(optionsModel, "optionsModel");
+ this.optionsModel = optionsModel;
+ add(new FoundationButtonBehavior(this.optionsModel));
+ }
+
+ @Override
+ public void onComponentTagBody(MarkupStream markupStream,
+ ComponentTag openTag) {
+ this.replaceComponentTagBody(markupStream, openTag, this.getDefaultModelObjectAsString());
+ super.onComponentTagBody(markupStream, openTag);
+ }
+
+ @Override
+ protected void onDetach() {
+ this.optionsModel.detach();
+ super.onDetach();
+ }
+}
diff --git a/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/button/FoundationAjaxSubmitLink.java b/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/button/FoundationAjaxSubmitLink.java
new file mode 100644
index 0000000000..0ceeff6dd5
--- /dev/null
+++ b/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/button/FoundationAjaxSubmitLink.java
@@ -0,0 +1,88 @@
+package org.wicketstuff.foundation.button;
+
+import org.apache.wicket.ajax.markup.html.form.AjaxSubmitLink;
+import org.apache.wicket.markup.ComponentTag;
+import org.apache.wicket.markup.MarkupStream;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.util.lang.Args;
+
+/**
+ * Buttons are convenient tools when you need more traditional actions. To that end, Foundation has many
+ * easy to use button styles that you can customize or override to fit your needs.
+ * http://foundation.zurb.com/docs/components/buttons.html
+ * @author ilkka
+ *
+ */
+public class FoundationAjaxSubmitLink extends AjaxSubmitLink {
+
+ private static final long serialVersionUID = 1L;
+
+ private IModel optionsModel;
+
+ /**
+ * Create FoundationAjaxSubmitLink.
+ * @param id - Wicket id.
+ */
+ public FoundationAjaxSubmitLink(String id) {
+ this(id, new ButtonOptions());
+ }
+
+ /**
+ * Create FoundationAjaxSubmitLink.
+ * @param id - Wicket id.
+ * @param options - Options for the link.
+ */
+ public FoundationAjaxSubmitLink(String id, ButtonOptions options) {
+ this(id, Model.of(options));
+ }
+
+ /**
+ * Create FoundationAjaxSubmitLink.
+ * @param id - Wicket id.
+ * @param optionsModel - Model providing options for the link.
+ */
+ public FoundationAjaxSubmitLink(String id, IModel optionsModel) {
+ super(id);
+ Args.notNull(optionsModel, "optionsModel");
+ this.optionsModel = optionsModel;
+ add(new FoundationButtonBehavior(this.optionsModel));
+ }
+
+ /**
+ * Create FoundationAjaxSubmitLink.
+ * @param id - Wicket id.
+ * @param form - Form to be submitted by the link.
+ * @param options - Options for the link.
+ */
+ public FoundationAjaxSubmitLink(String id, Form> form, ButtonOptions options) {
+ this(id, form, Model.of(options));
+ }
+
+ /**
+ * Create FoundationAjaxSubmitLink.
+ * @param id - Wicket id.
+ * @param form - Form to be submitted by the link.
+ * @param optionsModel - Model providing options for the link.
+ */
+ public FoundationAjaxSubmitLink(String id, Form> form, IModel optionsModel) {
+ super(id, form);
+ Args.notNull(optionsModel, "optionsModel");
+ this.optionsModel = optionsModel;
+ add(new FoundationButtonBehavior(this.optionsModel));
+ }
+
+ @Override
+ public void onComponentTagBody(MarkupStream markupStream,
+ ComponentTag openTag) {
+ this.replaceComponentTagBody(markupStream, openTag, this.getDefaultModelObjectAsString());
+ super.onComponentTagBody(markupStream, openTag);
+ }
+
+ @Override
+ protected void onDetach() {
+ this.optionsModel.detach();
+ super.onDetach();
+ }
+}
diff --git a/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/button/FoundationBookmarkablePageLink.java b/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/button/FoundationBookmarkablePageLink.java
new file mode 100644
index 0000000000..41837419d5
--- /dev/null
+++ b/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/button/FoundationBookmarkablePageLink.java
@@ -0,0 +1,97 @@
+package org.wicketstuff.foundation.button;
+
+import org.apache.wicket.Page;
+import org.apache.wicket.markup.ComponentTag;
+import org.apache.wicket.markup.MarkupStream;
+import org.apache.wicket.markup.html.link.BookmarkablePageLink;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.request.mapper.parameter.PageParameters;
+import org.apache.wicket.util.lang.Args;
+
+/**
+ * Buttons are convenient tools when you need more traditional actions. To that end, Foundation has many
+ * easy to use button styles that you can customize or override to fit your needs.
+ * http://foundation.zurb.com/docs/components/buttons.html
+ * @author ilkka
+ *
+ * @param The type of the model object.
+ */
+public class FoundationBookmarkablePageLink extends BookmarkablePageLink {
+
+ private static final long serialVersionUID = 1L;
+
+ private IModel optionsModel;
+
+ /**
+ * Create FoundationBookmarkablePageLink.
+ * @param id - Wicket id.
+ * @param pageClass - Target page's class.
+ */
+ public FoundationBookmarkablePageLink(String id, Class pageClass) {
+ this(id, pageClass, new ButtonOptions());
+ }
+
+ /**
+ * Create FoundationBookmarkablePageLink.
+ * @param id - Wicket id.
+ * @param pageClass - Target page's class.
+ * @param options - Options for the link.
+ */
+ public FoundationBookmarkablePageLink(String id, Class pageClass, ButtonOptions options) {
+ this(id, pageClass, Model.of(options));
+ }
+
+ /**
+ * Create FoundationBookmarkablePageLink.
+ * @param id - Wicket id.
+ * @param pageClass - Target page's class.
+ * @param optionsModel - Model providing options for the link.
+ */
+ public FoundationBookmarkablePageLink(String id, Class pageClass, IModel optionsModel) {
+ super(id, pageClass);
+ Args.notNull(optionsModel, "optionsModel");
+ this.optionsModel = optionsModel;
+ add(new FoundationButtonBehavior(optionsModel));
+ }
+
+ /**
+ * Create FoundationBookmarkablePageLink.
+ * @param id - Wicket id.
+ * @param pageClass - Target page's class.
+ * @param parameters - Parameters for the target page.
+ * @param options - Options for the link.
+ */
+ public FoundationBookmarkablePageLink(String id, Class pageClass,
+ PageParameters parameters, ButtonOptions options) {
+ this(id, pageClass, parameters, Model.of(options));
+ }
+
+ /**
+ * Create FoundationBookmarkablePageLink.
+ * @param id - Wicket id.
+ * @param pageClass - Target page's class.
+ * @param parameters - Parameters for the target page.
+ * @param optionsModel - Model providing options for the link.
+ */
+ public FoundationBookmarkablePageLink(String id, Class pageClass,
+ PageParameters parameters, IModel optionsModel) {
+ super(id, pageClass, parameters);
+ Args.notNull(optionsModel, "optionsModel");
+ this.optionsModel = optionsModel;
+ add(new FoundationButtonBehavior(optionsModel));
+ }
+
+ @Override
+ public void onComponentTagBody(MarkupStream markupStream,
+ ComponentTag openTag) {
+ this.replaceComponentTagBody(markupStream, openTag, this.getDefaultModelObjectAsString());
+ super.onComponentTagBody(markupStream, openTag);
+ }
+
+ @Override
+ protected void onDetach() {
+ this.optionsModel.detach();
+ super.onDetach();
+ }
+}
diff --git a/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/button/FoundationButton.java b/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/button/FoundationButton.java
new file mode 100644
index 0000000000..cc16209491
--- /dev/null
+++ b/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/button/FoundationButton.java
@@ -0,0 +1,89 @@
+package org.wicketstuff.foundation.button;
+
+import org.apache.wicket.markup.ComponentTag;
+import org.apache.wicket.markup.MarkupStream;
+import org.apache.wicket.markup.html.form.Button;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.util.lang.Args;
+
+/**
+ * Buttons are convenient tools when you need more traditional actions. To that end, Foundation has many
+ * easy to use button styles that you can customize or override to fit your needs.
+ * http://foundation.zurb.com/docs/components/buttons.html
+ * @author ilkka
+ *
+ */
+public class FoundationButton extends Button {
+
+ private static final long serialVersionUID = 1L;
+
+ private IModel optionsModel;
+
+ /**
+ * Create FoundationButton.
+ * @param id - Wicket id.
+ */
+ public FoundationButton(String id) {
+ this(id, new ButtonOptions());
+ }
+
+ /**
+ * Create FoundationButton.
+ * @param id - Wicket id.
+ * @param options - Options for the button.
+ */
+ public FoundationButton(String id, ButtonOptions options) {
+ super(id);
+ Args.notNull(options, "options");
+ optionsModel = Model.of(options);
+ add(new FoundationButtonBehavior(optionsModel));
+ }
+
+ /**
+ * Create FoundationButton.
+ * @param id - Wicket id.
+ * @param model - Model for the title.
+ */
+ public FoundationButton(String id, IModel model) {
+ super(id, model);
+ optionsModel = Model.of(new ButtonOptions());
+ add(new FoundationButtonBehavior(optionsModel));
+ }
+
+ /**
+ * Create FoundationButton.
+ * @param id - Wicket id.
+ * @param model - Model for the title.
+ * @param options - Options for the button.
+ */
+ public FoundationButton(String id, IModel model, ButtonOptions options) {
+ this(id, model, Model.of(options));
+ }
+
+ /**
+ * Create FoundationButton.
+ * @param id - Wicket id.
+ * @param model - Model for the title.
+ * @param optionsModel - Model for the button options.
+ */
+ public FoundationButton(String id, IModel model, IModel optionsModel) {
+ super(id, model);
+ Args.notNull(optionsModel, "optionsModel");
+ this.optionsModel = optionsModel;
+ add(new FoundationButtonBehavior(optionsModel));
+ }
+
+ @Override
+ public void onComponentTagBody(MarkupStream markupStream,
+ ComponentTag openTag) {
+ this.replaceComponentTagBody(markupStream, openTag, this.getDefaultModelObjectAsString());
+ super.onComponentTagBody(markupStream, openTag);
+ }
+
+ @Override
+ protected void onDetach() {
+ this.optionsModel.detach();
+ super.onDetach();
+ }
+}
diff --git a/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/button/FoundationButtonBehavior.java b/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/button/FoundationButtonBehavior.java
new file mode 100644
index 0000000000..7de0aed41a
--- /dev/null
+++ b/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/button/FoundationButtonBehavior.java
@@ -0,0 +1,58 @@
+package org.wicketstuff.foundation.button;
+
+import org.apache.wicket.Component;
+import org.apache.wicket.markup.ComponentTag;
+import org.apache.wicket.model.IModel;
+import org.wicketstuff.foundation.behavior.FoundationBaseBehavior;
+import org.wicketstuff.foundation.util.Attribute;
+import org.wicketstuff.foundation.util.StringUtil;
+
+/**
+ * Behavior providing correct CSS class names based on supplied ButtonOptions.
+ * @author ilkka
+ *
+ */
+public class FoundationButtonBehavior extends FoundationBaseBehavior {
+
+ private static final long serialVersionUID = 1L;
+
+ private IModel optionsModel;
+
+ public FoundationButtonBehavior(IModel optionsModel) {
+ this.optionsModel = optionsModel;
+ }
+
+ @Override
+ public void onComponentTag(Component component, ComponentTag tag) {
+
+ Attribute.setClass(tag, "button");
+ ButtonOptions options = optionsModel.getObject();
+ if (options.getFoundationButtonSize() != null) {
+ Attribute.addClass(tag, StringUtil.EnumNameToCssClassName(options
+ .getFoundationButtonSize().name()));
+ }
+ if (options.getFoundationButtonColor() != null) {
+ Attribute.addClass(tag, StringUtil.EnumNameToCssClassName(options
+ .getFoundationButtonColor().name()));
+ }
+ if (options.getFoundationButtonRadius() != null) {
+ Attribute.addClass(tag, StringUtil.EnumNameToCssClassName(options
+ .getFoundationButtonRadius().name()));
+ }
+ if (options.getFoundationButtonState() != null) {
+ Attribute.addClass(tag, StringUtil.EnumNameToCssClassName(options
+ .getFoundationButtonState().name()));
+ }
+ if (options.getFoundationButtonExpansion() != null) {
+ Attribute.addClass(tag, StringUtil.EnumNameToCssClassName(options
+ .getFoundationButtonExpansion().name()));
+ }
+ super.onComponentTag(component, tag);
+ }
+
+ @Override
+ public void detach(Component component) {
+ optionsModel.detach();
+ super.detach(component);
+ }
+}
diff --git a/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/button/FoundationLink.java b/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/button/FoundationLink.java
new file mode 100644
index 0000000000..a38e646ec7
--- /dev/null
+++ b/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/button/FoundationLink.java
@@ -0,0 +1,88 @@
+package org.wicketstuff.foundation.button;
+
+import org.apache.wicket.markup.ComponentTag;
+import org.apache.wicket.markup.MarkupStream;
+import org.apache.wicket.markup.html.link.Link;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.util.lang.Args;
+
+/**
+ * Buttons are convenient tools when you need more traditional actions. To that end, Foundation has many
+ * easy to use button styles that you can customize or override to fit your needs.
+ * http://foundation.zurb.com/docs/components/buttons.html
+ * @author ilkka
+ *
+ * @param The type of the model object.
+ */
+public abstract class FoundationLink extends Link {
+
+ private static final long serialVersionUID = 1L;
+
+ private IModel optionsModel;
+
+ /**
+ * Create FoundationLink.
+ * @param id - Wicket id.
+ */
+ public FoundationLink(String id) {
+ this(id, new ButtonOptions());
+ }
+
+ /**
+ * Create FoundationLink.
+ * @param id - Wicket id.
+ * @param options - Options for the link.
+ */
+ public FoundationLink(String id, ButtonOptions options) {
+ super(id);
+ Args.notNull(options, "options");
+ optionsModel = Model.of(options);
+ add(new FoundationButtonBehavior(optionsModel));
+ }
+
+ /**
+ * Create FoundationLink.
+ * @param id - Wicket id.
+ * @param model - Model for the link.
+ */
+ public FoundationLink(String id, IModel model) {
+ this(id, model, new ButtonOptions());
+ }
+
+ /**
+ * Create FoundationLink.
+ * @param id - Wicket id.
+ * @param model - Model for the link.
+ * @param options - Options for the link.
+ */
+ public FoundationLink(String id, IModel model, ButtonOptions options) {
+ this(id, model, Model.of(options));
+ }
+
+ /**
+ * Create FoundationLink.
+ * @param id - Wicket id.
+ * @param model - Model for the link.
+ * @param optionsModel - Model for the link options.
+ */
+ public FoundationLink(String id, IModel model, IModel optionsModel) {
+ super(id, model);
+ Args.notNull(optionsModel, "optionsModel");
+ this.optionsModel = optionsModel;
+ add(new FoundationButtonBehavior(this.optionsModel));
+ }
+
+ @Override
+ public void onComponentTagBody(MarkupStream markupStream,
+ ComponentTag openTag) {
+ this.replaceComponentTagBody(markupStream, openTag, this.getDefaultModelObjectAsString());
+ super.onComponentTagBody(markupStream, openTag);
+ }
+
+ @Override
+ protected void onDetach() {
+ this.optionsModel.detach();
+ super.onDetach();
+ }
+}
diff --git a/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/button/FoundationSubmitLink.java b/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/button/FoundationSubmitLink.java
new file mode 100644
index 0000000000..97b5b27250
--- /dev/null
+++ b/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/button/FoundationSubmitLink.java
@@ -0,0 +1,107 @@
+package org.wicketstuff.foundation.button;
+
+import org.apache.wicket.markup.ComponentTag;
+import org.apache.wicket.markup.MarkupStream;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.markup.html.form.SubmitLink;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.util.lang.Args;
+
+/**
+ * Buttons are convenient tools when you need more traditional actions. To that end, Foundation has many
+ * easy to use button styles that you can customize or override to fit your needs.
+ * http://foundation.zurb.com/docs/components/buttons.html
+ * @author ilkka
+ *
+ */
+public class FoundationSubmitLink extends SubmitLink {
+
+ private static final long serialVersionUID = 1L;
+
+ private IModel optionsModel;
+
+ /**
+ * Create FoundationSubmitLink.
+ * @param id - Wicket id.
+ */
+ public FoundationSubmitLink(String id) {
+ this(id, new ButtonOptions());
+ }
+
+ /**
+ * Create FoundationSubmitLink.
+ * @param id - Wicket id.
+ * @param options - Options for the link.
+ */
+ public FoundationSubmitLink(String id, ButtonOptions options) {
+ super(id);
+ Args.notNull(options, "options");
+ optionsModel = Model.of(options);
+ add(new FoundationButtonBehavior(optionsModel));
+ }
+
+ /**
+ * Create FoundationSubmitLink.
+ * @param id - Wicket id.
+ * @param form - Form to be submitted by the link.
+ * @param options - Options for the link.
+ */
+ public FoundationSubmitLink(String id, Form> form, ButtonOptions options) {
+ super(id, form);
+ Args.notNull(options, "options");
+ optionsModel = Model.of(options);
+ add(new FoundationButtonBehavior(optionsModel));
+ }
+
+ /**
+ * Create FoundationSubmitLink.
+ * @param id - Wicket id.
+ * @param model - Model for the link.
+ * @param options - Options for the link.
+ */
+ public FoundationSubmitLink(String id, IModel> model, ButtonOptions options) {
+ super(id, model);
+ Args.notNull(options, "options");
+ optionsModel = Model.of(options);
+ add(new FoundationButtonBehavior(optionsModel));
+ }
+
+ /**
+ * Create FoundationSubmitLink.
+ * @param id - Wicket id.
+ * @param model - Model for the link.
+ * @param form - Form to be submitted by the link.
+ * @param options - Options for the link.
+ */
+ public FoundationSubmitLink(String id, IModel> model, Form> form, ButtonOptions options) {
+ this(id, model, form, Model.of(options));
+ }
+
+ /**
+ * Create FoundationSubmitLink.
+ * @param id - Wicket id.
+ * @param model - Model for the link.
+ * @param form - Form to be submitted by the link.
+ * @param optionsModel - Model for the link options.
+ */
+ public FoundationSubmitLink(String id, IModel> model, Form> form, IModel optionsModel) {
+ super(id, model, form);
+ Args.notNull(optionsModel, "optionsModel");
+ this.optionsModel = optionsModel;
+ add(new FoundationButtonBehavior(optionsModel));
+ }
+
+ @Override
+ public void onComponentTagBody(MarkupStream markupStream,
+ ComponentTag openTag) {
+ this.replaceComponentTagBody(markupStream, openTag, this.getDefaultModelObjectAsString());
+ super.onComponentTagBody(markupStream, openTag);
+ }
+
+ @Override
+ protected void onDetach() {
+ this.optionsModel.detach();
+ super.onDetach();
+ }
+}
diff --git a/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/buttongroup/ButtonGroupOptions.java b/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/buttongroup/ButtonGroupOptions.java
new file mode 100644
index 0000000000..16899a53e3
--- /dev/null
+++ b/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/buttongroup/ButtonGroupOptions.java
@@ -0,0 +1,64 @@
+package org.wicketstuff.foundation.buttongroup;
+
+import java.io.Serializable;
+
+import org.wicketstuff.foundation.button.ButtonColor;
+import org.wicketstuff.foundation.button.ButtonRadius;
+
+/**
+ * Options for FoundationButtonGroup.
+ * @author ilkka
+ *
+ */
+public class ButtonGroupOptions implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ private ButtonRadius radius;
+ private ButtonColor color;
+ private ButtonGroupStacking stacking;
+
+ public ButtonGroupOptions() {
+ }
+
+ public ButtonGroupOptions(ButtonRadius radius) {
+ this.radius = radius;
+ }
+
+ public ButtonGroupOptions(ButtonColor color) {
+ this.color = color;
+ }
+
+ public ButtonGroupOptions(ButtonGroupStacking stacking) {
+ this.stacking = stacking;
+ }
+
+ public ButtonGroupOptions(ButtonGroupOptions other) {
+ this.radius = other.radius;
+ this.color = other.color;
+ this.stacking = other.stacking;
+ }
+
+ public ButtonRadius getRadius() {
+ return radius;
+ }
+ public ButtonGroupOptions setRadius(ButtonRadius radius) {
+ this.radius = radius;
+ return this;
+ }
+ public ButtonColor getColor() {
+ return color;
+ }
+ public ButtonGroupOptions setColor(ButtonColor color) {
+ this.color = color;
+ return this;
+ }
+ public ButtonGroupStacking getStacking() {
+ return stacking;
+ }
+ public ButtonGroupOptions setStacking(ButtonGroupStacking stacking) {
+ this.stacking = stacking;
+ return this;
+ }
+
+}
diff --git a/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/buttongroup/ButtonGroupStacking.java b/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/buttongroup/ButtonGroupStacking.java
new file mode 100644
index 0000000000..9139b6f1d2
--- /dev/null
+++ b/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/buttongroup/ButtonGroupStacking.java
@@ -0,0 +1,7 @@
+package org.wicketstuff.foundation.buttongroup;
+
+public enum ButtonGroupStacking {
+
+ STACK, STACK_FOR_SMALL;
+
+}
diff --git a/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/buttongroup/FoundationButtonBarBorder.html b/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/buttongroup/FoundationButtonBarBorder.html
new file mode 100644
index 0000000000..7011772ac9
--- /dev/null
+++ b/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/buttongroup/FoundationButtonBarBorder.html
@@ -0,0 +1,14 @@
+
+
+
+
+wicket-foundation
+
+
+
+
+
+
+
+
+
diff --git a/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/buttongroup/FoundationButtonBarBorder.java b/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/buttongroup/FoundationButtonBarBorder.java
new file mode 100644
index 0000000000..4cc961d411
--- /dev/null
+++ b/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/buttongroup/FoundationButtonBarBorder.java
@@ -0,0 +1,41 @@
+package org.wicketstuff.foundation.buttongroup;
+
+import org.apache.wicket.AttributeModifier;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.model.IModel;
+import org.wicketstuff.foundation.border.FoundationBaseBorder;
+
+/**
+ * ButtonBarBorder is handy for wrapping multiple button groups together.
+ * @author ilkka
+ *
+ */
+public class FoundationButtonBarBorder extends FoundationBaseBorder {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Create FoundationButtonBarBorder.
+ * @param id - Wicket id.
+ */
+ public FoundationButtonBarBorder(String id) {
+ super(id);
+ initComponents();
+ }
+
+ /**
+ * Create FoundationButtonBarBorder.
+ * @param id - Wicket id.
+ * @param model - Model for the border.
+ */
+ public FoundationButtonBarBorder(String id, IModel> model) {
+ super(id, model);
+ initComponents();
+ }
+
+ private void initComponents() {
+ WebMarkupContainer wrapper = new WebMarkupContainer("wrapper");
+ wrapper.add(new AttributeModifier("class", "button-bar"));
+ this.addToBorder(wrapper);
+ }
+}
diff --git a/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/buttongroup/FoundationButtonGroup.html b/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/buttongroup/FoundationButtonGroup.html
new file mode 100644
index 0000000000..c4cad84438
--- /dev/null
+++ b/jdk-1.7-parent/wicket-foundation/wicket-foundation-core/src/main/java/org/wicketstuff/foundation/buttongroup/FoundationButtonGroup.html
@@ -0,0 +1,14 @@
+
+
+
+
+wicket-foundation
+
+
+
+