blob: 80ae961908fe8210fac81469a4ea7308b75c5912 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<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="/css/style.css" type="text/css" media="screen" />
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" 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 class="wicket8 index">
<div class="header jumbotron">
<nav class="mainmenu">
<ul>
<!-- /start/quickstart.html || / -->
<li class=""><a href="/start/quickstart.html">Quick Start</a></li>
<!-- /start/download.html || / -->
<li class=""><a href="/start/download.html">Download</a></li>
<!-- /learn || / -->
<li class=""><a href="/learn">Documentation</a></li>
<!-- /help || / -->
<li class=""><a href="/help">Support</a></li>
<!-- /contribute || / -->
<li class=""><a href="/contribute">Contribute</a></li>
<!-- /community || / -->
<li class=""><a href="/community">Community</a></li>
<!-- /apache || / -->
<li class=""><a href="/apache">Apache</a></li>
</ul>
</nav>
<div class="jumbotron-logo">
<a href="/"><img src="/img/logo-apachewicket-tungsten-8.svg" alt="Apache Wicket"></a>
<div class="jumbotron-poweredbyasf">powered by <b>The Apache Software Foundation</b></div>
</div>
<div class="jumbotron-mission">Write Less, Achieve More</div>
<div class="jumbotron-download">
<a class="button" href="/start/wicket-8.x.html" style="padding: 1em 3em; border-radius:5px">Download now &raquo;</a>
</div>
<div class="l-first">&nbsp;</div>
</div>
<div class="l-container">
<section>
<div class="l-full l-first preamble">
<h1 id="introduction">Announcing Apache&nbsp;Wicket&nbsp;8: Write Less, Achieve More</h1>
<p>
The Apache Wicket project announces the 8th major release of the open source Java web framework servicing websites and applications across the globe for over a decade. With this release Wicket embraces Java 8 idioms fully, allowing the use of lambda expressions in all the right places. With Wicket 8 you can write fewer, faster and more maintainable code.
</p>
</div>
<div class="l-first">
<div class="l-full">
<h3>A Careful Application of Java 8</h3>
<p>
While previous versions of Wicket work well with Java 8 and beyond, the Wicket API was not optimized to make full use of Java 8 idioms. After careful consideration and trying many paths to adopt new ways of combining Java 8 and Wicket, we finally settled on the current API.
</p>
<p>
Java 8’s new idioms and types have been applied throughout Wicket’s API. Learn more about the details below.
</p>
</div>
</div>
<div class="l-first">
<div class="l-one-third">
<h3>Java 8+ Required</h3>
<p>
Starting with Wicket 8 the minimum required version of Java is Java 8. All Wicket supplied projects have been upgraded to Java 8 and Wicket 8, and shortly all active community projects, such as Wicket Stuff, will follow suit.
</p>
<p>
With the adoption of Java 8 we were able to provide support for Lambdas.
</p>
</div>
<div class="l-one-third">
<h3>Servlet 3.1 Required</h3>
<p>
As of Wicket 8 we only support the Java Servlet API 3.1 (or newer). This means that to run applications built using Wicket 8 you have to run your application in a modern server like Tomcat 8.x, Jetty 9.1+ or a Java EE 7 compatible server.
</p>
</div>
<div class="l-one-third">
<h3>Java Date/Time API</h3>
<p>
Wicket 8 provides out-of-the-box support for the new types for handling dates in Java 8. These can be converted, validated and bound to components.
</p>
</div>
</div>
<div class="l-first">
<div class="l-two-third">
<h3>Lambdas in All The Right Places</h3>
<p>
The major feature of Java 8 was the addition of lambda support in the language. With Wicket 8 we have looked at providing lambda support in the API and have weighed it against performance and memory usage considerations.
</p>
<p>
In this light we have opted to continue using subclassing as the primary extension mechanism for Wicket components.
Factories for lambdas have been provided for various forms of models (databinding) and behaviors (adapters for components).
</p>
</div>
</div>
<div class="l-first">
<div class="l-full">
<h3>Optional is Sometimes Required</h3>
</div>
<div class="l-one-third">
<p>
The new Optional type in Java 8 is intended for places in your API where things can be null. In Wicket’s case we have adopted Optional in just those places to clarify the API.
</p>
<p>
For example the AjaxFallbackLink, a link that works using both with and without AJAX, now uses Optional to signify whether the link was clicked utilizing AJAX or normal request processing: the AJAX request is wrapped in an Optional. Previous versions of Wicket would provide a null value for the AJAX request.
</p>
<p>
Because we have modified the API to utilize Optional, you will get compile errors when you start migrating to Wicket 8. This gives you the exact positions where these improvements have occurred and you can start working with the Optional API.
</p>
</div>
<div class="l-two-third">
<figure class="highlight"><pre><code class="language-java" data-lang="java"><span class="c1">// WICKET 7:</span>
<span class="n">add</span><span class="o">(</span><span class="k">new</span> <span class="nc">AjaxFallbackLink</span><span class="o">&lt;</span><span class="nc">Void</span><span class="o">&gt;(</span><span class="s">"wicket7"</span><span class="o">)</span> <span class="o">{</span>
<span class="nd">@Override</span>
<span class="kd">public</span> <span class="kt">void</span> <span class="nf">onClick</span><span class="o">(</span><span class="nc">AjaxRequestTarget</span> <span class="n">target</span><span class="o">)</span> <span class="o">{</span>
<span class="k">if</span><span class="o">(</span><span class="n">target</span> <span class="o">!=</span> <span class="kc">null</span><span class="o">)</span> <span class="o">{</span>
<span class="c1">// ...</span>
<span class="o">}</span>
<span class="o">}</span>
<span class="o">});</span>
<span class="c1">// WICKET 8:</span>
<span class="n">add</span><span class="o">(</span><span class="k">new</span> <span class="nc">AjaxFallbackLink</span><span class="o">&lt;</span><span class="nc">Void</span><span class="o">&gt;(</span><span class="s">"wicket8"</span><span class="o">)</span> <span class="o">{</span>
<span class="nd">@Override</span>
<span class="kd">public</span> <span class="kt">void</span> <span class="nf">onClick</span><span class="o">(</span><span class="nc">Optional</span><span class="o">&lt;</span><span class="nc">AjaxRequestTarget</span><span class="o">&gt;</span> <span class="n">target</span><span class="o">)</span> <span class="o">{</span>
<span class="k">if</span><span class="o">(</span><span class="n">target</span><span class="o">.</span><span class="na">isPresent</span><span class="o">())</span> <span class="o">{</span>
<span class="c1">// ...</span>
<span class="o">}</span>
<span class="o">}</span>
<span class="o">});</span></code></pre></figure>
</div>
</div>
<div class="l-first">
<div class="l-full">
<h3>Models as Functional Interface</h3>
<p>
Wicket uses models as the databinding method: each data-aware component can take a model implementation to retrieve and store data in. From Wicket 8 we have made the root interface IModel a functional interface. You can now use lambdas where you can use models.
</p>
<p>
The following example binds a Label component to the name of a person object in different ways using Wicket 8:
</p>
<figure class="highlight"><pre><code class="language-java" data-lang="java"><span class="n">add</span><span class="o">(</span><span class="k">new</span> <span class="nc">Label</span><span class="o">(</span><span class="s">"name1"</span><span class="o">,</span> <span class="nl">person:</span><span class="o">:</span><span class="n">name</span><span class="o">));</span>
<span class="n">add</span><span class="o">(</span><span class="k">new</span> <span class="nc">Label</span><span class="o">(</span><span class="s">"name2"</span><span class="o">,</span> <span class="o">()</span> <span class="o">-&gt;</span> <span class="n">person</span><span class="o">.</span><span class="na">getName</span><span class="o">()));</span>
<span class="n">add</span><span class="o">(</span><span class="k">new</span> <span class="nc">Label</span><span class="o">(</span><span class="s">"name3"</span><span class="o">,</span> <span class="nc">LambdaModel</span><span class="o">.</span><span class="na">of</span><span class="o">(</span><span class="n">personModel</span><span class="o">,</span> <span class="nl">Person:</span><span class="o">:</span><span class="n">getName</span><span class="o">)));</span>
<span class="n">add</span><span class="o">(</span><span class="k">new</span> <span class="nc">Label</span><span class="o">(</span><span class="s">"name4"</span><span class="o">,</span>
<span class="nc">LambdaModel</span><span class="o">.</span><span class="na">of</span><span class="o">(</span><span class="n">contractModel</span><span class="o">,</span> <span class="nl">Contract:</span><span class="o">:</span><span class="n">getPerson</span><span class="o">)</span>
<span class="o">.</span><span class="na">map</span><span class="o">(</span><span class="nl">Person:</span><span class="o">:</span><span class="n">getName</span><span class="o">)));</span></code></pre></figure>
<p>
The new <code>LambdaModel</code> type in Wicket enables type safe, refactor safe databinding for components. Previously one would bind data to components using PropertyModel, using a string expression to determine the exact property to show. The string expression is something like <code>"person.name"</code>. This is inherently difficult to refactor when you decide to change the name field into for example <code>"lastName"</code>. With <code>LambdaModel</code>, this refactoring is trivial for IDEs to perform: the Java methods can easily be renamed and the IDE will find all the references.
</p>
<p>
Microbenchmarks have shown that using lambda models provides much better performance than the string based PropertyModel at the cost of slightly larger memory footprint.
</p>
</div>
</div>
<div class="l-first">
<div class="l-half">
<h3>No Rewrite Necessary</h3>
<p>
The Wicket team has been very careful of adopting Java 8 technologies and as such you don’t have to rewrite your whole application, whilst still reaping all the benefits of Java 8.
</p>
<p>
As this is a new major version we have, in accordance with semantic versioning, cleaned up many APIs and you will get compile errors when you migrate from previous Wicket versions.
</p>
</div>
<div class="l-half">
<h3>Migrating to Wicket 8</h3>
<p>
When you migrate from a previous Wicket version to Wicket 8, a full list of changes and migrations is available at the following page:
</p>
<p>
<a href="https://s.apache.org/wicket8migrate">https://s.apache.org/wicket8migrate</a>
</p>
<p>
Please consult this migration guide when you are moving towards Wicket 8.
</p>
</div>
</div>
<div class="l-first">
<div class="l-full">
<h2>Getting Started with Wicket 8</h2>
<p>
It is very easy to get started with Wicket: use our <a href="/start/quickstart.html">quick-start wizard</a> or
use one of the options below.
</p>
</div>
<div class="l-half">
<h3>Download using Apache Maven</h3>
<p>
With Apache Maven update your dependency to (and don't forget to
update any other dependencies on Wicket projects to the same version):
</p>
<figure class="highlight"><pre><code class="language-xml" data-lang="xml"><span class="nt">&lt;dependency&gt;</span>
<span class="nt">&lt;groupId&gt;</span>org.apache.wicket<span class="nt">&lt;/groupId&gt;</span>
<span class="nt">&lt;artifactId&gt;</span>wicket-core<span class="nt">&lt;/artifactId&gt;</span>
<span class="nt">&lt;version&gt;</span>8.8.0<span class="nt">&lt;/version&gt;</span>
<span class="nt">&lt;/dependency&gt;</span></code></pre></figure>
</div>
<div class="l-half">
<h3>Download sources/binaries manually</h3>
<p>
Or download and build the distribution yourself, or use our
convenience binary package
</p>
<ul>
<li>Source: <a href="http://www.apache.org/dyn/closer.cgi/wicket/8.8.0">8.8.0 source download</a></li>
<li>Binary: <a href="http://www.apache.org/dyn/closer.cgi/wicket/8.8.0/binaries">8.8.0 binary download</a></li>
</ul>
</div>
</div>
<hr />
<div class="l-full l-first preamble">
<h1 id="introduction">Introducing Apache&nbsp;Wicket</h1>
<p>Invented in 2004, Wicket is one of the few survivors of the Java
serverside web framework wars of the mid 2000's. Wicket is an open
source, component oriented, serverside, Java web application framework.
With a history of over a decade, it is still going strong and has a
solid future ahead. Learn why you should consider Wicket for your next
web application.</p>
</div>
<div class="l-first">
<div class="l-one-third">
<img src="/img/java-wicket-html5.png" class="l-full" />
<h3>Just Java &amp; HTML</h3>
<p>Leverage what you know about Java or your favourite HTML
editor to write Wicket applications. With pure Java code and HTML
markup Wicket is the go-to web framework for purists.</p>
</div>
<div class="l-one-third">
<img src="/img/wicket-safe.png" class="l-full" />
<h3>Secure by Default</h3>
<p>URLs do not expose sensitive information and all component paths are
session-relative. Wicket keeps your model private except those parts
you explicitly expose.</p>
</div>
<div class="l-one-third">
<img src="/img/wicket-components.png" class="l-full" />
<h3>AJAX Components</h3>
<p>Write Ajax applications without having to write a single line
of JavaScript code. Wicket's Ajax functionality makes it trivial
to update selected parts of a UI, and comes with a great selection
of basic Ajax components.</p>
</div>
</div>
<div class="l-first">
<div class="l-one-third">
<h3>Open Source with Apache License</h3>
<p>Since its inception in 2004 Wicket has been an open source
project and remains available under one of the most permissive
licenses: the Apache Software License.</p>
</div>
<div class="l-one-third">
<h3>Maintainable code</h3>
<p>Pages and Components in Wicket are real Java objects that support
encapsulation, inheritance and events. Create high level components
with ease and bundle its stylesheets, JavaScript and other resources
into one reusable package.</p>
</div>
<div class="l-one-third">
<h3>Internationalized to take on the world</h3>
<p>With support of over 25 languages out-of-the-box, Wicket let's
you get started in your own language, or a second language with no
effort. You can provide alternative languages on the application,
page, or even component level.</p>
</div>
</div>
<div class="l-first">
<div class="l-one-third">
<h3>Multi-tab and window support</h3>
<p>No more pain while keeping taps on multiple tabs and windows.
Wicket's automatic state storage ensures that your users can open
pages in new tabs and windows without causing problems.</p>
</div>
<div class="l-two-third">
<h3>Work with JavaScript and CSS</h3>
<p>Global JavaScript libraries and CSS styling mix properly with
component local JavaScript and CSS resources. You can use custom
component libraries that ship with default JavaScript behaviour and
CSS styling, without having to do anything yourself. Creating such
self-contained component libraries is as easy as creating a JAR
file.</p>
</div>
</div>
<div class="l-first">
<div class="l-one-third">
<h3>Test your pages and components</h3>
<p>With WicketTester you can achieve testing coverage your QA
department can only dream of. Test your pages without having to run
inside a browser, or start a container. Test your components directly,
check their rendered markup tags, attributes and contents with ease.</p>
</div>
<div class="l-one-third">
<h3>Injection support</h3>
<p>Inject your services into your pages and components with the
technology of your choosing: Wicket provides integration with CDI
(JSR-305), Spring and Guice.</p>
</div>
<div class="l-one-third">
<h3>JavaEE integration</h3>
<p>If you are using the Web profile of JavaEE 6 or newer, you can
leverage JPA, EJBs, Bean Validation and CDI with Wicket's integrations
for these specifications.</p>
</div>
</div>
<div class="l-first">
</div>
</section>
<section id="builtwithwicket" class="builtwithwicket">
<header class="preamble">
<h1 id="poweredby">Projects Using Apache Wicket</h1>
<p>
Many projects use Wicket but are not known for it.
Below you find a list of projects that are <a href="http://builtwithwicket.tumblr.com" rel="nofollow">Powered by Wicket</a>.
</p>
</header>
<article class="l-full">
<div class="builtwithwicket-slider"></div>
<br><br>
<p>
This list is generated from our Tumblr feed 'Built with Wicket'.
You can submit your own project to this list through
<a href="http://builtwithwicket.tumblr.com/submit" rel="nofollow">this form</a>.
</p>
</article>
<div class="l-first"></div>
<!-- Only display the blog image, title and post URL -->
<script type="text/javascript">
function randomIntFromInterval(min,max)
{
return Math.floor(Math.random()*(max-min+1)+min);
}
$.getJSON('./tumblr.json',
function(response) {
var posts = response.posts;
for(var postIndex in posts) {
var post = posts[postIndex];
var caption = jQuery('<div>' + post['photo-caption'] + '</div>').text().substring(0,150) + "...";
var newSlide = $('.builtwithwicket-slider').append(
'<div class="builtwithwicket-post">\n' +
' <img class="builtwithwicket-screenshot" data-lazy="' + post['photo-url-500'] + '">\n' +
' <p class="builtwithwicket-caption">' + caption + '</p>\n' +
' <a href="' + post['url'] + '" rel="nofollow">More</a>\n' +
'</div>');
}
$('.builtwithwicket-slider').slick({
arrows: true,
autoplay: true,
autoplaySpeed: 5000,
dots: true,
draggable: true,
infinite: true,
initialSlide: randomIntFromInterval(0, posts.length),
lazyLoad: 'ondemand',
pauseOnDotsHover: true,
responsive: [ {
breakpoint: 590,
settings: {
slidesToShow: 1,
slidesToScroll: 1
}
},
{
breakpoint: 960,
settings: {
slidesToShow: 2,
slidesToScroll: 2
}
},
],
slidesToShow: 3,
slidesToScroll: 3,
swipe: true,
});
});
</script>
</section>
<section id="news" class="">
<div class="l-full l-first preamble">
<h1 id="news">News about Apache Wicket</h1>
<p>Get the latest updates to releases, security bulletins, community
news and more.</p>
</div>
<div class="l-two-third">
<article>
<h2>Apache Wicket 8.8.0 released</h2>
<small>24 Apr 2020</small>
<p>The Apache Wicket PMC is proud to announce Apache Wicket 8.8.0!</p>
<p>Apache Wicket is an open source Java component oriented web application
framework that powers thousands of web applications and web sites for
governments, stores, universities, cities, banks, email providers, and
more. You can find more about Apache Wicket at https://wicket.apache.org</p>
<p>This release marks another minor release of Wicket 8. We
use semantic versioning for the development of Wicket, and as such no
API breaks are present breaks are present in this release compared to
8.0.0.</p>
<h2 id="using-this-release">Using this release</h2>
<p>With Apache Maven update your dependency to (and don’t forget to
update any other dependencies on Wicket projects to the same version):</p>
<figure class="highlight"><pre><code class="language-xml" data-lang="xml"><span class="nt">&lt;dependency&gt;</span>
<span class="nt">&lt;groupId&gt;</span>org.apache.wicket<span class="nt">&lt;/groupId&gt;</span>
<span class="nt">&lt;artifactId&gt;</span>wicket-core<span class="nt">&lt;/artifactId&gt;</span>
<span class="nt">&lt;version&gt;</span>8.8.0<span class="nt">&lt;/version&gt;</span>
<span class="nt">&lt;/dependency&gt;</span></code></pre></figure>
<p>Or download and build the distribution yourself, or use our
convenience binary package you can find here:</p>
<ul>
<li>Download: http://wicket.apache.org/start/wicket-8.x.html#manually</li>
</ul>
<a href="/news/2020/04/24/wicket-8.8.0-released.html">Read more...</a>
</article>
<article>
<h2>Apache Wicket 9.0.0-M5 released</h2>
<small>06 Apr 2020</small>
<p>The Apache Wicket PMC is proud to announce Apache Wicket 9.0.0-M5!</p>
<p>Apache Wicket is an open source Java component oriented web application
framework that powers thousands of web applications and web sites for
governments, stores, universities, cities, banks, email providers, and
more. You can find more about Apache Wicket at https://wicket.apache.org</p>
<p>This release marks another minor release of Wicket 9. We
use semantic versioning for the development of Wicket, and as such no
API breaks are present breaks are present in this release compared to
9.0.0.</p>
<h2 id="new-and-noteworthy">New and noteworthy</h2>
<p>With this milestone Wicket introduces support for content security policy (CSP) which
is active by default and prevents inline JavaScript and CSS code from been executed.
For more details about CSP support see Wicket 9 migration guide linked below.</p>
<h2 id="using-this-release">Using this release</h2>
<p>With Apache Maven update your dependency to (and don’t forget to
update any other dependencies on Wicket projects to the same version):</p>
<figure class="highlight"><pre><code class="language-xml" data-lang="xml"><span class="nt">&lt;dependency&gt;</span>
<span class="nt">&lt;groupId&gt;</span>org.apache.wicket<span class="nt">&lt;/groupId&gt;</span>
<span class="nt">&lt;artifactId&gt;</span>wicket-core<span class="nt">&lt;/artifactId&gt;</span>
<span class="nt">&lt;version&gt;</span>9.0.0-M5<span class="nt">&lt;/version&gt;</span>
<span class="nt">&lt;/dependency&gt;</span></code></pre></figure>
<p>Or download and build the distribution yourself, or use our
convenience binary package you can find here:</p>
<ul>
<li>Download: http://wicket.apache.org/start/wicket-9.x.html#manually</li>
</ul>
<a href="/news/2020/04/06/wicket-9.0.0-M5-released.html">Read more...</a>
</article>
</div>
<div class="l-one-third news">
<h2>Older news</h2>
<p>See the <a href="/news">archives</a> for all news
articles concerning release, security and community updates.</p>
<p>Note that you can subscribe to our <a type="application/atom+xml"
title="Atom 1.0 feed" href="/atom.xml">RSS feed</a> to
get updates in your favorite RSS reader the moment they happen.</p>
<ul>
<li>
<h3>Apache Wicket 9.0.0-M5 released</h3>
<small>06 Apr 2020</small>
The Apache Wicket PMC is proud to announce Apache Wicket 9.0.0-M5! Apache Wicket is an open source Java component oriented web application framework that powers...
<a href="/news/2020/04/06/wicket-9.0.0-M5-released.html">more</a>
</li>
<li>
<h3>Apache Wicket 9.0.0-M4 released</h3>
<small>09 Jan 2020</small>
The Apache Wicket PMC is proud to announce Apache Wicket 9.0.0-M4! Apache Wicket is an open source Java component oriented web application framework that powers...
<a href="/news/2020/01/09/wicket-9.0.0-M4-released.html">more</a>
</li>
<li>
<h3>Apache Wicket 7.16.0 released</h3>
<small>08 Jan 2020</small>
The Apache Wicket PMC is proud to announce Apache Wicket 7.16.0! Apache Wicket is an open source Java component oriented web application framework that powers...
<a href="/news/2020/01/08/wicket-7.16.0-released.html">more</a>
</li>
<li>
<h3>Apache Wicket 8.7.0 released</h3>
<small>07 Jan 2020</small>
The Apache Wicket PMC is proud to announce Apache Wicket 8.7.0! Apache Wicket is an open source Java component oriented web application framework that powers...
<a href="/news/2020/01/07/wicket-8.7.0-released.html">more</a>
</li>
<li>
<h3>Apache Wicket 9.0.0-M3 released</h3>
<small>16 Sep 2019</small>
The Apache Wicket PMC is proud to announce Apache Wicket 9.0.0-M3! Apache Wicket is an open source Java component oriented web application framework that powers...
<a href="/news/2019/09/16/wicket-9.0.0-M3-released.html">more</a>
</li>
</ul>
</div>
<div class="l-first"></div>
</section>
</div>
<footer class="l-container">
<div class="l-full">
<img src="/img/asf_logo_url.svg" style="height:90px; float:left; margin-right:10px;">
<div style="margin-top:12px;">Copyright © 2020 — The Apache Software Foundation. Apache Wicket, Wicket, Apache, the Apache feather logo, and the Apache Wicket project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.</div>
</div>
</footer>
</body>
</html>