You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by ad...@apache.org on 2017/11/02 11:33:28 UTC
[24/26] wicket git commit: ported other samples and added source
button
ported other samples and added source button
Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/9e4046cb
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/9e4046cb
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/9e4046cb
Branch: refs/heads/WICKET-6490
Commit: 9e4046cb41d090a405a6c710fdd1bc0f17c9d325
Parents: a6e5935
Author: Andrea Del Bene <ad...@apache.org>
Authored: Wed Nov 1 15:44:53 2017 +0100
Committer: Andrea Del Bene <ad...@apache.org>
Committed: Wed Nov 1 15:44:53 2017 +0100
----------------------------------------------------------------------
.../wicket/examples/WicketExamplePage.html | 31 ++--------
.../wicket/examples/WicketExamplePage.java | 15 ++++-
.../ajaxhellobrowser/AjaxHelloBrowser.html | 23 ++++---
.../wicket/examples/cdi/CdiExamplePage.html | 5 +-
.../CustomLoadedTemplate.html | 64 ++++++++++++++------
.../wicket/examples/datetime/DateTimePage.html | 5 +-
.../wicket/examples/homepage/HomePage.java | 2 +
.../examples/library/AuthenticatedWebPage.html | 3 +-
.../apache/wicket/examples/template/Index.html | 3 +-
.../wicket/examples/homepage/HomePage.html | 2 +-
wicket-examples/src/main/webapp/style.css | 3 +
11 files changed, 90 insertions(+), 66 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/wicket/blob/9e4046cb/wicket-examples/src/main/java/org/apache/wicket/examples/WicketExamplePage.html
----------------------------------------------------------------------
diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/WicketExamplePage.html b/wicket-examples/src/main/java/org/apache/wicket/examples/WicketExamplePage.html
index 7cdd85e..196f417 100644
--- a/wicket-examples/src/main/java/org/apache/wicket/examples/WicketExamplePage.html
+++ b/wicket-examples/src/main/java/org/apache/wicket/examples/WicketExamplePage.html
@@ -14,37 +14,11 @@
rel="stylesheet" />
<script src="//code.jquery.com/jquery-1.11.3.min.js"></script>
-<link rel="stylesheet" type="text/css"
- href="//cdn.jsdelivr.net/jquery.slick/1.5.5/slick.css" />
-<link rel="stylesheet" type="text/css"
- href="//cdn.jsdelivr.net/jquery.slick/1.5.5/slick-theme.css" />
-
-<script type="text/javascript"
- src="//cdn.jsdelivr.net/jquery.slick/1.5.5/slick.min.js"></script>
-
</head>
<body>
<div class="header default">
<div class="l-container">
- <nav class="mainmenu">
- <ul>
- <!-- /start/quickstart.html || /learn/ -->
- <li class=""><a href="/start/quickstart.html">Quick Start</a></li>
- <!-- /start/download.html || /learn/ -->
- <li class=""><a href="/start/download.html">Download</a></li>
- <!-- /learn || /learn/ -->
- <li class=""><a href="/learn">Documentation</a></li>
- <!-- /help || /learn/ -->
- <li class=""><a href="/help">Support</a></li>
- <!-- /contribute || /learn/ -->
- <li class=""><a href="/contribute">Contribute</a></li>
- <!-- /community || /learn/ -->
- <li class=""><a href="/community">Community</a></li>
- <!-- /apache || /learn/ -->
- <li class=""><a href="/apache">Apache</a></li>
- </ul>
- </nav>
<div class="logo">
<a href="/"><img src="/img/logo-apachewicket-white.svg"
alt="Apache Wicket"></a>
@@ -53,6 +27,11 @@
</div>
<main>
<div class="l-container">
+ <div class="text-right">
+ <a wicket:id="sources" class="button">
+ Source code
+ </a>
+ </div>
<div id="content">
<wicket:child/>
</div>
http://git-wip-us.apache.org/repos/asf/wicket/blob/9e4046cb/wicket-examples/src/main/java/org/apache/wicket/examples/WicketExamplePage.java
----------------------------------------------------------------------
diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/WicketExamplePage.java b/wicket-examples/src/main/java/org/apache/wicket/examples/WicketExamplePage.java
index b7a423f..0b9a812 100644
--- a/wicket-examples/src/main/java/org/apache/wicket/examples/WicketExamplePage.java
+++ b/wicket-examples/src/main/java/org/apache/wicket/examples/WicketExamplePage.java
@@ -16,7 +16,11 @@
*/
package org.apache.wicket.examples;
+import org.apache.wicket.examples.source.SourcesPage;
import org.apache.wicket.markup.html.WebPage;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.link.BookmarkablePageLink;
+import org.apache.wicket.markup.html.link.PopupSettings;
import org.apache.wicket.model.IModel;
import org.apache.wicket.request.mapper.parameter.PageParameters;
import org.apache.wicket.util.string.Strings;
@@ -48,7 +52,16 @@ public class WicketExamplePage extends WebPage
super(pageParameters);
final String packageName = getClass().getPackage().getName();
- add(new WicketExampleHeader("mainNavigation", Strings.afterLast(packageName, '.'), this));
+ add(new Label("mainNavigation", Strings.afterLast(packageName, '.')));
+
+ BookmarkablePageLink<Void> link = new BookmarkablePageLink<Void>("sources",
+ SourcesPage.class, SourcesPage.generatePageParameters(this));
+ add(link);
+
+ PopupSettings settings = new PopupSettings("sources", PopupSettings.RESIZABLE);
+ settings.setWidth(800);
+ settings.setHeight(600);
+ link.setPopupSettings(settings);
explain();
}
http://git-wip-us.apache.org/repos/asf/wicket/blob/9e4046cb/wicket-examples/src/main/java/org/apache/wicket/examples/ajaxhellobrowser/AjaxHelloBrowser.html
----------------------------------------------------------------------
diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/ajaxhellobrowser/AjaxHelloBrowser.html b/wicket-examples/src/main/java/org/apache/wicket/examples/ajaxhellobrowser/AjaxHelloBrowser.html
index 48e9a0e..7ad6381 100644
--- a/wicket-examples/src/main/java/org/apache/wicket/examples/ajaxhellobrowser/AjaxHelloBrowser.html
+++ b/wicket-examples/src/main/java/org/apache/wicket/examples/ajaxhellobrowser/AjaxHelloBrowser.html
@@ -5,17 +5,16 @@
<link rel="stylesheet" type="text/css" href="style.css"/>
</head>
<body>
- <div wicket:id="mainNavigation"></div>
-
- <p>
- This page uses <em>org.apache.wicket.ajax.AjaxClientInfoBehavior</em>
- to collect the following information: <br /><br />
- ClientProperties: <span wicket:id="clientinfo">client info here</span>
- </p>
-
- <p>
- <span wicket:id="clienttime">client time info here</span>
- </p>
-
+ <wicket:extend>
+ <p>
+ This page uses <em>org.apache.wicket.ajax.AjaxClientInfoBehavior</em>
+ to collect the following information: <br /><br />
+ ClientProperties: <span wicket:id="clientinfo">client info here</span>
+ </p>
+
+ <p>
+ <span wicket:id="clienttime">client time info here</span>
+ </p>
+ </wicket:extend>
</body>
</html>
http://git-wip-us.apache.org/repos/asf/wicket/blob/9e4046cb/wicket-examples/src/main/java/org/apache/wicket/examples/cdi/CdiExamplePage.html
----------------------------------------------------------------------
diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/cdi/CdiExamplePage.html b/wicket-examples/src/main/java/org/apache/wicket/examples/cdi/CdiExamplePage.html
index ce30e2d..b5499f1 100644
--- a/wicket-examples/src/main/java/org/apache/wicket/examples/cdi/CdiExamplePage.html
+++ b/wicket-examples/src/main/java/org/apache/wicket/examples/cdi/CdiExamplePage.html
@@ -7,12 +7,13 @@
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>
- <span wicket:id="mainNavigation" />
+ <wicket:extend>
<h2>Welcome to Context, Dependencies, and Injection Integration Examples</h2>
<p><wicket:link><a href="CdiHomePage.html">[go back]</a></wicket:link></p>
<wicket:child/>
- </body>
+ </wicket:extend>
+</body>
</html>
http://git-wip-us.apache.org/repos/asf/wicket/blob/9e4046cb/wicket-examples/src/main/java/org/apache/wicket/examples/customresourceloading/CustomLoadedTemplate.html
----------------------------------------------------------------------
diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/customresourceloading/CustomLoadedTemplate.html b/wicket-examples/src/main/java/org/apache/wicket/examples/customresourceloading/CustomLoadedTemplate.html
index 295476d..0364878 100644
--- a/wicket-examples/src/main/java/org/apache/wicket/examples/customresourceloading/CustomLoadedTemplate.html
+++ b/wicket-examples/src/main/java/org/apache/wicket/examples/customresourceloading/CustomLoadedTemplate.html
@@ -1,25 +1,49 @@
<?xml version="1.0" encoding="UTF-8"?>
-<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+<html>
<head>
- <title>Wicket Examples - custom resource loading</title>
- <link rel="stylesheet" type="text/css" href="style.css"/>
+<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+<meta charset="utf-8">
+<title>Home | Apache Wicket</title>
+<meta name="viewport" content="width=device-width, initial-scale=1" />
+
+<link rel="shortcut icon" href="favicon.ico"
+ type="image/vnd.microsoft.icon" />
+<link rel="stylesheet" href="style.css" type="text/css" media="screen" />
+<link
+ href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css"
+ rel="stylesheet" />
+
+<script src="//code.jquery.com/jquery-1.11.3.min.js"></script>
</head>
+
<body>
- <wicket:extend>
- <p>
- This page was loaded by a component specific override. You can use that - with care - if you have
- to implement custom loading strategies that are very local to the component. For instance, a custom
- component that loads it's template from a database and for which you don't want the application
- to have to know about it's differing loading resource.
- </p>
- <p>
- This example loads the custom template just once, though it may reload when resource polling is
- turned on and the template changes. If you want a load the template every time a page (or panel)
- is requested, you can additionally let your container implement IMarkupCacheKeyProvider, and then
- return null in the implementation of getCacheKey; Wicket will not cache templates without a
- cache key. This functionality can be used to e.g. when you want to load templates from a database,
- and you know that the actual templates can be different from request to request.
- </p>
-</wicket:extend>
+ <div class="header default">
+ <div class="l-container">
+ <div class="logo">
+ <a href="/"><img src="/img/logo-apachewicket-white.svg"
+ alt="Apache Wicket"></a>
+ </div>
+ </div>
+ </div>
+ <main>
+ <div class="l-container">
+ <div id="content">
+ <p>
+ This page was loaded by a component specific override. You can use that - with care - if you have
+ to implement custom loading strategies that are very local to the component. For instance, a custom
+ component that loads it's template from a database and for which you don't want the application
+ to have to know about it's differing loading resource.
+ </p>
+ <p>
+ This example loads the custom template just once, though it may reload when resource polling is
+ turned on and the template changes. If you want a load the template every time a page (or panel)
+ is requested, you can additionally let your container implement IMarkupCacheKeyProvider, and then
+ return null in the implementation of getCacheKey; Wicket will not cache templates without a
+ cache key. This functionality can be used to e.g. when you want to load templates from a database,
+ and you know that the actual templates can be different from request to request.
+ </p>
+ </div>
+ </div>
+ </main>
</body>
-</html>
+</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/wicket/blob/9e4046cb/wicket-examples/src/main/java/org/apache/wicket/examples/datetime/DateTimePage.html
----------------------------------------------------------------------
diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/datetime/DateTimePage.html b/wicket-examples/src/main/java/org/apache/wicket/examples/datetime/DateTimePage.html
index 2589935..8142254 100644
--- a/wicket-examples/src/main/java/org/apache/wicket/examples/datetime/DateTimePage.html
+++ b/wicket-examples/src/main/java/org/apache/wicket/examples/datetime/DateTimePage.html
@@ -7,7 +7,7 @@
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>
- <span wicket:id="mainNavigation" />
+ <wicket:extend>
<form wicket:id="form">
<div>
@@ -55,5 +55,6 @@
<input wicket:id="submit" type="submit" value="Submit"/>
</form>
- </body>
+ </wicket:extend>
+</body>
</html>
http://git-wip-us.apache.org/repos/asf/wicket/blob/9e4046cb/wicket-examples/src/main/java/org/apache/wicket/examples/homepage/HomePage.java
----------------------------------------------------------------------
diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/homepage/HomePage.java b/wicket-examples/src/main/java/org/apache/wicket/examples/homepage/HomePage.java
index f44283a..94dcd51 100644
--- a/wicket-examples/src/main/java/org/apache/wicket/examples/homepage/HomePage.java
+++ b/wicket-examples/src/main/java/org/apache/wicket/examples/homepage/HomePage.java
@@ -52,6 +52,8 @@ public class HomePage extends WicketExamplePage
return version;
}
}));
+
+ get("sources").setVisible(false);
}
}
http://git-wip-us.apache.org/repos/asf/wicket/blob/9e4046cb/wicket-examples/src/main/java/org/apache/wicket/examples/library/AuthenticatedWebPage.html
----------------------------------------------------------------------
diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/library/AuthenticatedWebPage.html b/wicket-examples/src/main/java/org/apache/wicket/examples/library/AuthenticatedWebPage.html
index d8ded31..ba14c8a 100644
--- a/wicket-examples/src/main/java/org/apache/wicket/examples/library/AuthenticatedWebPage.html
+++ b/wicket-examples/src/main/java/org/apache/wicket/examples/library/AuthenticatedWebPage.html
@@ -5,7 +5,7 @@
</head>
<body>
- <span wicket:id="mainNavigation" />
+ <wicket:extend>
<p>
<wicket:link><a href = "Home.html">Home</a></wicket:link> 
@@ -16,5 +16,6 @@
</div>
</p>
+</wicket:extend>
</body>
</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/wicket/blob/9e4046cb/wicket-examples/src/main/java/org/apache/wicket/examples/template/Index.html
----------------------------------------------------------------------
diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/template/Index.html b/wicket-examples/src/main/java/org/apache/wicket/examples/template/Index.html
index c9d4407..6113e4a 100644
--- a/wicket-examples/src/main/java/org/apache/wicket/examples/template/Index.html
+++ b/wicket-examples/src/main/java/org/apache/wicket/examples/template/Index.html
@@ -5,7 +5,7 @@
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>
- <span wicket:id="mainNavigation" />
+ <wicket:extend>
<h1>Template example</h1>
@@ -30,5 +30,6 @@
</wicket:link>
</p>
+</wicket:extend>
</body>
</html>
http://git-wip-us.apache.org/repos/asf/wicket/blob/9e4046cb/wicket-examples/src/main/resources/org/apache/wicket/examples/homepage/HomePage.html
----------------------------------------------------------------------
diff --git a/wicket-examples/src/main/resources/org/apache/wicket/examples/homepage/HomePage.html b/wicket-examples/src/main/resources/org/apache/wicket/examples/homepage/HomePage.html
index 9849093..a1f868e 100644
--- a/wicket-examples/src/main/resources/org/apache/wicket/examples/homepage/HomePage.html
+++ b/wicket-examples/src/main/resources/org/apache/wicket/examples/homepage/HomePage.html
@@ -1,5 +1,5 @@
<wicket:extend>
- <div id="header"><div class="version"> Wicket Version: <span wicket:id="version"/></div></div>
+ <div id="header"><strong> Wicket Version: <span wicket:id="version"/></strong></div>
<h1>    Menu</h1>
<table>
<tbody>
http://git-wip-us.apache.org/repos/asf/wicket/blob/9e4046cb/wicket-examples/src/main/webapp/style.css
----------------------------------------------------------------------
diff --git a/wicket-examples/src/main/webapp/style.css b/wicket-examples/src/main/webapp/style.css
index 5402bfd..3498560 100644
--- a/wicket-examples/src/main/webapp/style.css
+++ b/wicket-examples/src/main/webapp/style.css
@@ -255,6 +255,7 @@ input::-moz-focus-inner {
.button,
input[type=submit],
+input[type=reset],
button, .button--neutral,
input[type=submit].button--neutral,
button.button--neutral, .button--success,
@@ -286,11 +287,13 @@ button.button--alert {
.button,
input[type=submit],
+input[type=reset],
button {
background: #FF9925;
color: #fff; }
.button:hover,
input[type=submit]:hover,
+ input[type=reset]:hover,
button:hover {
background: #ffb158;
color: #fff; }