Updated quickstart version for M5
Project: http://git-wip-us.apache.org/repos/asf/wicket-site/repo Commit: http://git-wip-us.apache.org/repos/asf/wicket-site/commit/0d038375 Tree: http://git-wip-us.apache.org/repos/asf/wicket-site/tree/0d038375 Diff: http://git-wip-us.apache.org/repos/asf/wicket-site/diff/0d038375 Branch: refs/heads/asf-site Commit: 0d03837582adfbfc96c1475b2382391ec170b597 Parents: 21ddc28 Author: Andrea Del Bene <adelb...@apache.org> Authored: Thu Mar 30 20:10:34 2017 +0200 Committer: Andrea Del Bene <adelb...@apache.org> Committed: Thu Mar 30 20:10:34 2017 +0200 ---------------------------------------------------------------------- _config.yml | 4 +- content/archetype-catalog.xml | 4 +- content/atom.xml | 2 +- content/contribute/build.html | 22 ++++----- content/contribute/ides.html | 6 +-- content/contribute/patch.html | 2 +- content/contribute/release.html | 52 ++++++++++---------- content/contribute/write.html | 4 +- content/learn/examples/ajaxcounter.html | 18 +++---- content/learn/examples/dropdownchoice.html | 8 +-- content/learn/examples/guestbook.html | 28 +++++------ content/learn/examples/helloworld.html | 6 +-- content/learn/examples/markupinheritance.html | 6 +-- content/learn/examples/navomatic.html | 10 ++-- content/learn/examples/servlet3x.html | 14 +++--- content/learn/examples/usingfragments.html | 10 ++-- ...-1.4-takes-typesafety-to-the-next-level.html | 8 +-- .../news/2010/08/11/wicket-1.4.10-released.html | 4 +- content/news/2011/08/23/cve-2011-2712.html | 2 +- .../news/2011/09/07/wicket-1.5-released.html | 8 +-- .../news/2012/03/22/wicket-cve-2012-1089.html | 2 +- .../2012/05/29/wicket-6.0.0-beta2-released.html | 4 +- .../news/2013/01/23/wicket-6.5.0-released.html | 2 +- .../news/2013/06/27/wicket-6.9.0-released.html | 2 +- .../news/2013/07/10/wicket-6.9.1-released.html | 2 +- .../news/2013/08/18/wicket-6.10.0-released.html | 2 +- .../news/2013/09/20/wicket-6.11.0-released.html | 2 +- .../news/2013/11/01/wicket-6.12.0-released.html | 2 +- .../news/2014/01/05/wicket-6.13.0-released.html | 2 +- .../2016/07/25/wicket-8.0.0-M1-released.html | 4 +- content/start/download.html | 2 +- content/start/quickstart.html | 4 +- content/start/wicket-8.x.html | 4 +- 33 files changed, 126 insertions(+), 126 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/wicket-site/blob/0d038375/_config.yml ---------------------------------------------------------------------- diff --git a/_config.yml b/_config.yml index e4944b6..c0a80a8 100644 --- a/_config.yml +++ b/_config.yml @@ -16,14 +16,14 @@ sass: sass_dir: _sass wicket: version: 7.6.0 - version_80: 8.0.0-M4 + version_80: 8.0.0-M5 version_70: 7.6.0 version_60: 6.26.0 version_15: 1.5.17 version_14: 1.4.23 version_13: 1.3.7 released: 2016-12-29 - versions: [6.26.0, 1.5.17, 1.4.23, 7.6.0, 1.5-SNAPSHOT, 6.27.0-SNAPSHOT, 7.7.0-SNAPSHOT, 8.0.0-M4, 8.0.0-SNAPSHOT] + versions: [6.26.0, 1.5.17, 1.4.23, 7.6.0, 1.5-SNAPSHOT, 6.27.0-SNAPSHOT, 7.7.0-SNAPSHOT, 8.0.0-M5, 8.0.0-SNAPSHOT] navigation: - id: start http://git-wip-us.apache.org/repos/asf/wicket-site/blob/0d038375/content/archetype-catalog.xml ---------------------------------------------------------------------- diff --git a/content/archetype-catalog.xml b/content/archetype-catalog.xml index b94017d..43d59ee 100644 --- a/content/archetype-catalog.xml +++ b/content/archetype-catalog.xml @@ -12,8 +12,8 @@ <archetype> <groupId>org.apache.wicket</groupId> <artifactId>wicket-archetype-quickstart</artifactId> - <version>8.0.0-M4</version> - <description>Wicket 8.0.0-M4 Quickstart</description> + <version>8.0.0-M5</version> + <description>Wicket 8.0.0-M5 Quickstart</description> </archetype> <archetype> http://git-wip-us.apache.org/repos/asf/wicket-site/blob/0d038375/content/atom.xml ---------------------------------------------------------------------- diff --git a/content/atom.xml b/content/atom.xml index 4e0d8b9..1bf7adb 100644 --- a/content/atom.xml +++ b/content/atom.xml @@ -3,7 +3,7 @@ <title>Apache Wicket</title> <link href="http://wicket.apache.org/atom.xml" rel="self"/> <link href="http://wicket.apache.org/"/> - <updated>2017-03-30T15:40:40+02:00</updated> + <updated>2017-03-30T20:09:49+02:00</updated> <id>http://wicket.apache.org/</id> <author> <name>Apache Wicket</name> http://git-wip-us.apache.org/repos/asf/wicket-site/blob/0d038375/content/contribute/build.html ---------------------------------------------------------------------- diff --git a/content/contribute/build.html b/content/contribute/build.html index db3c2de..666e260 100644 --- a/content/contribute/build.html +++ b/content/contribute/build.html @@ -66,7 +66,7 @@ maintainable, enterprise ready build. The book is available for free from the Mergere website.</p> <h2 id="getting-your-wicket-version">Getting your Wicket version</h2> <p>Clone the master branch from Apache Git Wicket repository</p> -<figure class="highlight"><pre><code class="language-console" data-lang="console">$ git clone http://git-wip-us.apache.org/repos/asf/wicket.git</code></pre></figure> +<figure class="highlight"><pre><code class="language-console" data-lang="console"><span class="w">$ </span><span class="nc">git</span><span class="kv"> clone http://git-wip-us.apache.org/repos/asf/wicket.git</span></code></pre></figure> <p>This will give you a directory structure like the following directory tree:</p> <figure class="highlight"><pre><code class="language-console" data-lang="console">wicket wicket/wicket-core @@ -75,12 +75,12 @@ wicket/wicket-spring wicket/wicket-auth-roles wicket/wicket-examples wicket/wicket-spring-annot -...</code></pre></figure> +<span class="err">...</span></code></pre></figure> <p>To check out a different branch use:</p> -<figure class="highlight"><pre><code class="language-console" data-lang="console">$ cd wicket -$ git checkout -b release/wicket-x.y.z release/wicket-x.y.z -# verify the branch with: -$ git branch</code></pre></figure> +<figure class="highlight"><pre><code class="language-console" data-lang="console"><span class="w">$ </span><span class="nc">cd</span><span class="kv"> wicket +</span><span class="w">$ </span><span class="nc">git</span><span class="kv"> checkout -b release/wicket-x.y.z release/wicket-x.y.z +</span><span class="ni"># </span><span class="nc">verify</span><span class="kv"> the branch with: +</span><span class="w">$ </span><span class="nc">git</span><span class="kv"> branch</span></code></pre></figure> <p>In this document we focus at the maven project descriptor located in the top level directory, which enforces default settings for all Wicket projects such as plug-in settings, versioning of the Wicket projects, managing the various @@ -93,9 +93,9 @@ This top-level project doesnât have sources for itself.</p> fully compatible with that Java version, you will need to build it with a Java 6 compiler and runtime library.</p> <p>If you havenât done so already change into the Wicket root directory:</p> -<figure class="highlight"><pre><code class="language-console" data-lang="console">cd wicket</code></pre></figure> +<figure class="highlight"><pre><code class="language-console" data-lang="console"><span class="err">cd wicket</span></code></pre></figure> <p>Now building all of Wicket is as simple as issuing the following command:</p> -<figure class="highlight"><pre><code class="language-console" data-lang="console">mvn install</code></pre></figure> +<figure class="highlight"><pre><code class="language-console" data-lang="console"><span class="err">mvn install</span></code></pre></figure> <p>This will compile, test, package and install all Wicket projects. Installation means putting the jar files into your local Maven repository, including the source, but without the javadoc jars (this is a Wicket specific configuration, @@ -114,7 +114,7 @@ automatically.</p> <h3 id="coping-with-test-failures">Coping with test failures</h3> <p>As this is our main development you might/will encounter failing unit tests. These can be skipped using:</p> -<figure class="highlight"><pre><code class="language-console" data-lang="console">mvn -Dmaven.test.skip=true install</code></pre></figure> +<figure class="highlight"><pre><code class="language-console" data-lang="console"><span class="err">mvn -Dmaven.test.skip=true install</span></code></pre></figure> <p>Of course, all bets are off then and your mileage may vary if you use such a built jar.</p> <h3 id="using-your-own-built-artifacts">Using your own built artifacts</h3> @@ -129,7 +129,7 @@ version. So in your pom.xml you can use:</p> <span class="nt"></dependency></span></code></pre></figure> <p>And adding this to your Eclipse, NetBeans or IntelliJ IDEA project classpath is then as simple as:</p> -<figure class="highlight"><pre><code class="language-console" data-lang="console">mvn eclipse:eclipse</code></pre></figure> +<figure class="highlight"><pre><code class="language-console" data-lang="console"><span class="err">mvn eclipse:eclipse</span></code></pre></figure> <p>or opening the project using Netbeans or IDEAs Maven integration.</p> <p>Maven will then add all the necessary JAR files to the projectâs classpath.</p> <p>One thing you need to make sure is that you have set the <code class="highlighter-rouge">M2_REPO</code> classpath @@ -137,7 +137,7 @@ variable in Eclipse (or a similar construct in Netbeans), and point it to your local repository, typically found in <code class="highlighter-rouge">C:\Documents and Settings\username\.m2\repo</code> or (for unix buffs) <code class="highlighter-rouge">~/.m2/repo</code></p> <p>You can add this setting using maven:</p> -<figure class="highlight"><pre><code class="language-console" data-lang="console">mvn -Declipse.workspace=<path-to-eclipse-workspace> eclipse:add-maven-repo</code></pre></figure> +<figure class="highlight"><pre><code class="language-console" data-lang="console"><span class="err">mvn -Declipse.workspace=<path-to-eclipse-workspace> eclipse:add-maven-repo</span></code></pre></figure> </section> </div> </main> http://git-wip-us.apache.org/repos/asf/wicket-site/blob/0d038375/content/contribute/ides.html ---------------------------------------------------------------------- diff --git a/content/contribute/ides.html b/content/contribute/ides.html index e76f5b7..1315729 100644 --- a/content/contribute/ides.html +++ b/content/contribute/ides.html @@ -63,13 +63,13 @@ by their respective development teams.</p> <h3 id="eclipse">Eclipse</h3> <p>Eclipse offers a good support for Maven based projects with <a href="http://www.eclipse.org/m2e/">plugin M2Eclipse</a>. Once installed you can go to âImportâ¦->Existing Maven Projectsâ and import one or more Maven projects into your workspace.</p> <p>Alternatively, you can generate an Eclipse project typing the following command on projectâs root:</p> -<figure class="highlight"><pre><code class="language-console" data-lang="console">mvn eclipse:eclipse</code></pre></figure> +<figure class="highlight"><pre><code class="language-console" data-lang="console"><span class="err">mvn eclipse:eclipse</span></code></pre></figure> <p>Maven will add all the necessary JAR files to the projectâs classpath. Now the sources can be imported in Eclipse using the âExisting Projects into Workspaceâ wizard.</p> <p>If not already present the <code class="highlighter-rouge">M2_REPO</code> classpath variable has to point to your local Maven repository. The repository is typically found in <code class="highlighter-rouge">C:\Documents and Settings\<username>\.m2\repo</code> or (for unix buffs) <code class="highlighter-rouge">~/.m2/repo</code>. It can be set within Eclipse (Preferences->Java->Build Path->Classpath Variables) or with the help of Maven:</p> -<figure class="highlight"><pre><code class="language-console" data-lang="console">mvn -Declipse.workspace=<path-to-eclipse-workspace> eclipse:add-maven-repo</code></pre></figure> +<figure class="highlight"><pre><code class="language-console" data-lang="console"><span class="err">mvn -Declipse.workspace=<path-to-eclipse-workspace> eclipse:add-maven-repo</span></code></pre></figure> <p>If you want to go along with the Wicket way of code formatting you should import the Wicket code format profile into your workspace (Preferences->Java->Code Style->Formatter), found in:</p> -<figure class="highlight"><pre><code class="language-console" data-lang="console"><path-to-eclipse-workspace>/wicket-core/EclipseCodeFormat.xml</code></pre></figure> +<figure class="highlight"><pre><code class="language-console" data-lang="console"><span class="err"><path-to-eclipse-workspace>/wicket-core/EclipseCodeFormat.xml</span></code></pre></figure> <p>Finally configure the editor to automatically format all edited lines and organize imports on save (Preferences->Java->Editor->Save Actions).</p> <h3 id="netbeans">NetBeans</h3> <p>NetBeans comes with Maven integration. Further help can be found at their <a href="http://wiki.netbeans.org/MavenBestPractices" title="NetBeans Community Wiki">Wiki</a></p> http://git-wip-us.apache.org/repos/asf/wicket-site/blob/0d038375/content/contribute/patch.html ---------------------------------------------------------------------- diff --git a/content/contribute/patch.html b/content/contribute/patch.html index 716d7bf..755722e 100644 --- a/content/contribute/patch.html +++ b/content/contribute/patch.html @@ -116,7 +116,7 @@ Git</a> and when you have finished your work create a patch with the following commands:</p> <figure class="highlight"><pre><code class="language-console" data-lang="console">git add any_files_you_created_modified_or_deleted -git diff --cached > /tmp/WICKET-NNNN.patch</code></pre></figure> +<span class="err">git diff --cached > /tmp/WICKET-NNNN.patch</span></code></pre></figure> <p>where NNNN is the issue number. Finally, attach that file (/tmp/WICKET-NNNN.patch) to the <a href="https://issues.apache.org/jira/browse/WICKET">JIRA</a></p> http://git-wip-us.apache.org/repos/asf/wicket-site/blob/0d038375/content/contribute/release.html ---------------------------------------------------------------------- diff --git a/content/contribute/release.html b/content/contribute/release.html index 391b218..c23f0aa 100644 --- a/content/contribute/release.html +++ b/content/contribute/release.html @@ -75,24 +75,24 @@ <ul> <li>Start gpg-agent as a daemon (OS X, using homebrew installation of gpg, gpg-agent, pinentry):</li> </ul> -<figure class="highlight"><pre><code class="language-console" data-lang="console"> eval `gpg-agent --daemon --pinentry-program /usr/local/bin/pinentry`</code></pre></figure> +<figure class="highlight"><pre><code class="language-console" data-lang="console"><span class="err"> eval `gpg-agent --daemon --pinentry-program /usr/local/bin/pinentry`</span></code></pre></figure> <ul> <li>Create an environment variable such that you can copy/paste several of the following commands (substitute 6.0.0 with the number youâre actually going to release):</li> </ul> -<figure class="highlight"><pre><code class="language-console" data-lang="console">export NEWVERSION=6.0.0</code></pre></figure> +<figure class="highlight"><pre><code class="language-console" data-lang="console"><span class="err">export NEWVERSION=6.0.0</span></code></pre></figure> <ul> <li>Sign pom.xml such that gpg-agent has enabled your key (and remove the .asc file). This triggers the pinentry program and sets the stage for gpg-agent:</li> </ul> <figure class="highlight"><pre><code class="language-console" data-lang="console">gpg --armor --detach-sign --use-agent --sign pom.xml -rm pom.xml.asc</code></pre></figure> +<span class="err">rm pom.xml.asc</span></code></pre></figure> <ul> <li>Create release branch:</li> </ul> -<figure class="highlight"><pre><code class="language-console" data-lang="console">mvn release:branch -DbranchName=build/wicket-$NEWVERSION</code></pre></figure> +<figure class="highlight"><pre><code class="language-console" data-lang="console"><span class="err">mvn release:branch -DbranchName=build/wicket-$NEWVERSION</span></code></pre></figure> <ul> <li>Checkout the release branch:</li> </ul> -<figure class="highlight"><pre><code class="language-console" data-lang="console">git checkout build/wicket-$NEWVERSION</code></pre></figure> +<figure class="highlight"><pre><code class="language-console" data-lang="console"><span class="err">git checkout build/wicket-$NEWVERSION</span></code></pre></figure> <ul> <li> <p>Update archetypes/quickstart/src/main/archetype-resources/pom.xml to use NEWVERSION of Wicket and commit</p> @@ -106,16 +106,16 @@ rm pom.xml.asc</code></pre></figure> </ul> </li> </ul> -<figure class="highlight"><pre><code class="language-console" data-lang="console">mvn release:prepare</code></pre></figure> +<figure class="highlight"><pre><code class="language-console" data-lang="console"><span class="err">mvn release:prepare</span></code></pre></figure> <ul> <li>Remove last commit such that HEAD points to the NEWVERSION release, not the new development version</li> </ul> -<figure class="highlight"><pre><code class="language-console" data-lang="console">git reset HEAD^ --hard</code></pre></figure> +<figure class="highlight"><pre><code class="language-console" data-lang="console"><span class="err">git reset HEAD^ --hard</span></code></pre></figure> <ul> <li>Create source archive:</li> </ul> <figure class="highlight"><pre><code class="language-console" data-lang="console">git archive --format=tar.gz --prefix=apache-wicket-$NEWVERSION/ -o apache-wicket-$NEWVERSION.tar.gz wicket-$NEWVERSION -git archive --format=zip --prefix=apache-wicket-$NEWVERSION/ -o apache-wicket-$NEWVERSION.zip wicket-$NEWVERSION</code></pre></figure> +<span class="err">git archive --format=zip --prefix=apache-wicket-$NEWVERSION/ -o apache-wicket-$NEWVERSION.zip wicket-$NEWVERSION</span></code></pre></figure> <ul> <li><strong>NOTE 1</strong> the trailing â/â after âprefix=NEWVERSION is vital for the tarball</li> <li><strong>NOTE 2</strong> you can ignore the gpg generated messages telling âYou need a passphrase to unlock the secret key forâ, unless an error occurredâthese messages are not error messages</li> @@ -126,21 +126,21 @@ gpg --armor --detach-sign --use-agent --sign apache-wicket-$NEWVERSION.zip gpg --print-md SHA1 apache-wicket-$NEWVERSION.tar.gz > apache-wicket-$NEWVERSION.tar.gz.sha gpg --print-md MD5 apache-wicket-$NEWVERSION.tar.gz > apache-wicket-$NEWVERSION.tar.gz.md5 gpg --print-md SHA1 apache-wicket-$NEWVERSION.zip > apache-wicket-$NEWVERSION.zip.sha -gpg --print-md MD5 apache-wicket-$NEWVERSION.zip > apache-wicket-$NEWVERSION.zip.md5</code></pre></figure> +<span class="err">gpg --print-md MD5 apache-wicket-$NEWVERSION.zip > apache-wicket-$NEWVERSION.zip.md5</span></code></pre></figure> <p>To sign the tag (overwrites the maven generated tag), execute:</p> -<figure class="highlight"><pre><code class="language-console" data-lang="console">git tag -s --force wicket-$NEWVERSION</code></pre></figure> +<figure class="highlight"><pre><code class="language-console" data-lang="console"><span class="err">git tag -s --force wicket-$NEWVERSION</span></code></pre></figure> <h4 id="staging-the-build">Staging the build</h4> <figure class="highlight"><pre><code class="language-console" data-lang="console">ssh apache...@people.apache.org mkdir public_html/wicket-$NEWVERSION -scp apache-wicket-* apache...@people.apache.org:public_html/wicket-$NEWVERSION</code></pre></figure> +<span class="err">scp apache-wicket-* apache...@people.apache.org:public_html/wicket-$NEWVERSION</span></code></pre></figure> <p><strong>TODO</strong> figure out how to let <code class="highlighter-rouge">release:perform</code> work from a local checkout, such that we can actually <em>stage</em> the build instead of having to push the tag to our git repo.</p> <p>The following steps are ONLY necessary as long as the above TODO has not been resolved.</p> <figure class="highlight"><pre><code class="language-console" data-lang="console">git push origin build/wicket-$NEWVERSION:refs/heads/build/wicket-$NEWVERSION -git push -tags origin</code></pre></figure> +<span class="err">git push -tags origin</span></code></pre></figure> <p>The step below uploads the artifacts to a staging area for Maven. * assumes you have an Apache nexus account * will checkout a fresh copy and build it (ask Maven for why) * artifacts will have different signature than in previous release:prepare build (due to times changing)</p> -<figure class="highlight"><pre><code class="language-console" data-lang="console">mvn release:perform</code></pre></figure> +<figure class="highlight"><pre><code class="language-console" data-lang="console"><span class="err">mvn release:perform</span></code></pre></figure> <p>This will upload artifacts and signatures to Apache nexus in a staging repository.</p> <h4 id="create-a-binary-release">Create a binary release</h4> <p>As we donât vote on binary packages, but do want to cater to developers not using Maven, it is very convenient to create a download for non-Maven users.</p> @@ -163,14 +163,14 @@ gpg --print-md MD5 apache-wicket-$NEWVERSION-bin.tar.gz > apache-wicket-$NEW gpg --print-md SHA1 apache-wicket-$NEWVERSION-bin.zip > apache-wicket-$NEWVERSION.-binzip.sha gpg --print-md MD5 apache-wicket-$NEWVERSION-bin.zip > apache-wicket-$NEWVERSION-bin.zip.md5 ssh apache...@people.apache.org mkdir public_html/wicket-$NEWVERSION/bin -scp apache-wicket-*bin.* apache...@people.apache.org:public_html/wicket-$NEWVERSION/bin</code></pre></figure> +<span class="err">scp apache-wicket-*bin.* apache...@people.apache.org:public_html/wicket-$NEWVERSION/bin</span></code></pre></figure> <p>This binary release contains all required files to comply with the release policy, and the binary artefacts generated by our Maven release build, including the experimental modules and examples.</p> <h4 id="vote-the-build">Vote the build</h4> <p>Start a vote on dev@ for this release. Allow for at least 72 hours, and ensure you take into account weekends.</p> <h4 id="promoting-the-build">Promoting the build</h4> <p>The following two steps are only necessary when the previous TODO is resolved (you canât push the tag twice).</p> <figure class="highlight"><pre><code class="language-console" data-lang="console">git push origin build/wicket-$NEWVERSION:refs/heads/build/wicket-$NEWVERSION -git push -tags origin</code></pre></figure> +<span class="err">git push -tags origin</span></code></pre></figure> <p>You only need to do them if you havenât done so yet.</p> <p>See also <a href="#nexus">managing nexus</a> for the steps needed to publish the artifacts to Maven Central. And donât forget to announce the release!</p> <h2 id="release-14">Releasing Apache Wicket 1.4.x+</h2> @@ -192,7 +192,7 @@ git push -tags origin</code></pre></figure> <password>$your_apache_password</password> </server> </servers> -</settings></code></pre></figure> +<span class="err"></settings></span></code></pre></figure> <ul> <li>Make sure you have a GnuPG key which is added to <a href="https://svn.apache.org/repos/asf/wicket/common/KEYS">KEYS</a>. Read the header of KEYS file to see how to add it.</li> @@ -207,7 +207,7 @@ will copy the assemblies to your people.apache.org account.</li> <figure class="highlight"><pre><code class="language-console" data-lang="console">ssh people.apache.org mkdir /www/www.apache.org/dist/wicket/x.y.z mv ~/public_html/wicket-x.y.z/dist/* /www/www.apache.org/dist/wicket/x.y.z -chown -R :wicket /www/www.apache.org/dist/wicket/x.y.z</code></pre></figure> +<span class="err">chown -R :wicket /www/www.apache.org/dist/wicket/x.y.z</span></code></pre></figure> <ul> <li>Login to <a href="https://repository.apache.org">Apache Nexus Staging repo</a>, select the closed repository and click <strong>Release</strong>. It will be accessible immediately through the apache release repo and then within 1-2 hours through maven central.</li> <li>If the release is voted down you can <strong>Drop</strong> the staged release and then restage later after incorporating the necessary changes.</li> @@ -215,7 +215,7 @@ chown -R :wicket /www/www.apache.org/dist/wicket/x.y.z</code></pre></figure> </ul> <figure class="highlight"><pre><code class="language-console" data-lang="console">git checkout build/wicket-x.y.z git tag release/wicket-x.y.z -git push --tags</code></pre></figure> +<span class="err">git push --tags</span></code></pre></figure> <ul> <li>Wait until repo1.maven.org has picked up the release artifacts.</li> <li>Wait 24 hours until mirrors picked up release artifacts</li> @@ -238,7 +238,7 @@ git push --tags</code></pre></figure> <password>$password</password> </server> </servers> -</settings></code></pre></figure> +<span class="err"></settings></span></code></pre></figure> <p>This works if you can deploy artifacts into the repository.apache.org properly (i.e. you donât see failures mentioning 401 errors).</p> <h3 id="managing-staged-artifacts">Managing Staged Artifacts</h3> <p>By logging in with your Apache committer credentials to <a href="https://repository.apache.org">Apache Nexus Staging repo</a> you can access the management interface for the staged artifacts.</p> @@ -273,14 +273,14 @@ contains your announcement.</li> <a href="https://svn.apache.org/repos/asf/wicket/common/site/apidocs/1.4">https://svn.apache.org/repos/asf/wicket/common/site/apidocs/1.4</a> svnpubsub will push this directly to our website. (example script below)</li> </ul> -<figure class="highlight"><pre><code class="language-console" data-lang="console"># do this in your locally-checked-out release branch (i.e. svn.../releases/wicket-1.4.13) -mvn javadoc:aggregate -# note that you may need to tweak these paths to fit your configuration: -cp -r target/site/apidocs/* ../wicket-common/site/apidocs/1.4/ +<figure class="highlight"><pre><code class="language-console" data-lang="console"><span class="ni"># </span><span class="nc">do</span><span class="kv"> this in your locally-checked-out release branch (i.e. svn.../releases/wicket-1.4.13) +</span>mvn javadoc:aggregate +<span class="ni"># </span><span class="nc">note</span><span class="kv"> that you may need to tweak these paths to fit your configuration: +</span>cp -r target/site/apidocs/* ../wicket-common/site/apidocs/1.4/ cd ../wicket-common/ -# call "svn add" for files that are new (there's probably an easier way to do this) -svn stat | grep -e '^?' | sed 's/\?\W*//' | xargs svn add -svn commit -m "changes to update javadocs to latest release"</code></pre></figure> +<span class="ni"># </span><span class="nc">call</span><span class="kv"> "svn add" for files that are new (there's probably an easier way to do this) +</span>svn stat | grep -e '^?' | sed 's/\?\W*//' | xargs svn add +<span class="err">svn commit -m "changes to update javadocs to latest release"</span></code></pre></figure> </section> </div> </main> http://git-wip-us.apache.org/repos/asf/wicket-site/blob/0d038375/content/contribute/write.html ---------------------------------------------------------------------- diff --git a/content/contribute/write.html b/content/contribute/write.html index 85ea5a8..8dc7162 100644 --- a/content/contribute/write.html +++ b/content/contribute/write.html @@ -69,14 +69,14 @@ announcements, adding new committers and other important Wicket related news.</p <h2 id="install">Install Jekyll</h2> <p>Follow the instructions available on the <a href="http://github.com/mojombo/jekyll">Jekyll website</a>. Basically it boils down to:</p> -<figure class="highlight"><pre><code class="language-console" data-lang="console">gem install jekyll</code></pre></figure> +<figure class="highlight"><pre><code class="language-console" data-lang="console"><span class="err">gem install jekyll</span></code></pre></figure> <p>You also need to install the Pygments Python module.</p> <h2 id="clone">Clone wicket-site</h2> <p>Before you can edit the site, you need to clone it:</p> <figure class="highlight"><pre><code class="language-bash" data-lang="bash">git clone g...@github.com:apache/wicket-site.git</code></pre></figure> <h2 id="run">Run the site</h2> <p>You can run the website and edit it live:</p> -<figure class="highlight"><pre><code class="language-console" data-lang="console">jekyll serve -w</code></pre></figure> +<figure class="highlight"><pre><code class="language-console" data-lang="console"><span class="err">jekyll serve -w</span></code></pre></figure> <p>This not only runs the server, but watches for modifications and regenerates any modified files.</p> <p>You can check out the website running at <a href="http://localhost:4000">localhost, port 4000</a>.</p> http://git-wip-us.apache.org/repos/asf/wicket-site/blob/0d038375/content/learn/examples/ajaxcounter.html ---------------------------------------------------------------------- diff --git a/content/learn/examples/ajaxcounter.html b/content/learn/examples/ajaxcounter.html index e013c2d..6b99e5b 100644 --- a/content/learn/examples/ajaxcounter.html +++ b/content/learn/examples/ajaxcounter.html @@ -81,15 +81,15 @@ how it works on the Java side:</p> <span class="kn">import</span> <span class="nn">wicket.markup.html.link.Link</span><span class="o">;</span> <span class="kn">import</span> <span class="nn">wicket.model.Model</span><span class="o">;</span> <span class="kd">public</span> <span class="kd">class</span> <span class="nc">Index</span> <span class="kd">extends</span> <span class="n">QuickStartPage</span> <span class="o">{</span> - <span class="kd">public</span> <span class="n">Index</span><span class="o">()</span> <span class="o">{</span> + <span class="kd">public</span> <span class="nf">Index</span><span class="o">()</span> <span class="o">{</span> <span class="n">Model</span><span class="o"><</span><span class="n">Integer</span><span class="o">></span> <span class="n">model</span> <span class="o">=</span> <span class="k">new</span> <span class="n">Model</span><span class="o"><</span><span class="n">Integer</span><span class="o">>()</span> <span class="o">{</span> <span class="kd">private</span> <span class="kt">int</span> <span class="n">counter</span> <span class="o">=</span> <span class="mi">0</span><span class="o">;</span> - <span class="kd">public</span> <span class="n">Integer</span> <span class="n">getObject</span><span class="o">()</span> <span class="o">{</span> + <span class="kd">public</span> <span class="n">Integer</span> <span class="nf">getObject</span><span class="o">()</span> <span class="o">{</span> <span class="k">return</span> <span class="n">counter</span><span class="o">++;</span> <span class="o">}</span> <span class="o">};</span> <span class="n">add</span><span class="o">(</span><span class="k">new</span> <span class="n">Link</span><span class="o">(</span><span class="s">"link"</span><span class="o">)</span> <span class="o">{</span> - <span class="kd">public</span> <span class="kt">void</span> <span class="n">onClick</span><span class="o">()</span> <span class="o">{</span> + <span class="kd">public</span> <span class="kt">void</span> <span class="nf">onClick</span><span class="o">()</span> <span class="o">{</span> <span class="c1">// do nothing.</span> <span class="o">}</span> <span class="o">});</span> @@ -117,15 +117,15 @@ provides a fallback to a normal request in case no Ajax is available.</p> <span class="kn">import</span> <span class="nn">wicket.markup.html.basic.Label</span><span class="o">;</span> <span class="kn">import</span> <span class="nn">wicket.model.Model</span><span class="o">;</span> <span class="kd">public</span> <span class="kd">class</span> <span class="nc">Index</span> <span class="kd">extends</span> <span class="n">QuickStartPage</span> <span class="o">{</span> - <span class="kd">public</span> <span class="n">Index</span><span class="o">()</span> <span class="o">{</span> + <span class="kd">public</span> <span class="nf">Index</span><span class="o">()</span> <span class="o">{</span> <span class="n">Model</span><span class="o"><</span><span class="n">Integer</span><span class="o">></span> <span class="n">model</span> <span class="o">=</span> <span class="k">new</span> <span class="n">Model</span><span class="o"><</span><span class="n">Integer</span><span class="o">>()</span> <span class="o">{</span> <span class="kd">private</span> <span class="kt">int</span> <span class="n">counter</span> <span class="o">=</span> <span class="mi">0</span><span class="o">;</span> - <span class="kd">public</span> <span class="n">Integer</span> <span class="n">getObject</span><span class="o">()</span> <span class="o">{</span> + <span class="kd">public</span> <span class="n">Integer</span> <span class="nf">getObject</span><span class="o">()</span> <span class="o">{</span> <span class="k">return</span> <span class="n">counter</span><span class="o">++;</span> <span class="o">}</span> <span class="o">};</span> <span class="n">add</span><span class="o">(</span><span class="k">new</span> <span class="n">AjaxFallbackLink</span><span class="o">(</span><span class="s">"link"</span><span class="o">)</span> <span class="o">{</span> - <span class="kd">public</span> <span class="kt">void</span> <span class="n">onClick</span><span class="o">(</span><span class="n">AjaxRequestTarget</span> <span class="n">target</span><span class="o">)</span> <span class="o">{</span> + <span class="kd">public</span> <span class="kt">void</span> <span class="nf">onClick</span><span class="o">(</span><span class="n">AjaxRequestTarget</span> <span class="n">target</span><span class="o">)</span> <span class="o">{</span> <span class="c1">// add the components that need to be updated to </span> <span class="c1">// the target</span> <span class="o">}</span> @@ -145,17 +145,17 @@ request target.</p> <span class="kn">import</span> <span class="nn">wicket.markup.html.basic.Label</span><span class="o">;</span> <span class="kn">import</span> <span class="nn">wicket.model.Model</span><span class="o">;</span> <span class="kd">public</span> <span class="kd">class</span> <span class="nc">Index</span> <span class="kd">extends</span> <span class="n">QuickStartPage</span> <span class="o">{</span> - <span class="kd">public</span> <span class="n">Index</span><span class="o">()</span> <span class="o">{</span> + <span class="kd">public</span> <span class="nf">Index</span><span class="o">()</span> <span class="o">{</span> <span class="n">Model</span><span class="o"><</span><span class="n">Integer</span><span class="o">></span> <span class="n">model</span> <span class="o">=</span> <span class="k">new</span> <span class="n">Model</span><span class="o"><</span><span class="n">Integer</span><span class="o">>()</span> <span class="o">{</span> <span class="kd">private</span> <span class="kt">int</span> <span class="n">counter</span> <span class="o">=</span> <span class="mi">0</span><span class="o">;</span> - <span class="kd">public</span> <span class="n">Integer</span> <span class="n">getObject</span><span class="o">()</span> <span class="o">{</span> + <span class="kd">public</span> <span class="n">Integer</span> <span class="nf">getObject</span><span class="o">()</span> <span class="o">{</span> <span class="k">return</span> <span class="n">counter</span><span class="o">++;</span> <span class="o">}</span> <span class="o">};</span> <span class="kd">final</span> <span class="n">Label</span><span class="o"><</span><span class="n">Integer</span><span class="o">></span> <span class="n">label</span> <span class="o">=</span> <span class="k">new</span> <span class="n">Label</span><span class="o"><</span><span class="n">Integer</span><span class="o">>(</span><span class="s">"counter"</span><span class="o">,</span> <span class="n">model</span><span class="o">);</span> <span class="n">label</span><span class="o">.</span><span class="na">setOutputMarkupId</span><span class="o">(</span><span class="kc">true</span><span class="o">);</span> <span class="n">add</span><span class="o">(</span><span class="k">new</span> <span class="n">AjaxFallbackLink</span><span class="o">(</span><span class="s">"link"</span><span class="o">)</span> <span class="o">{</span> - <span class="kd">public</span> <span class="kt">void</span> <span class="n">onClick</span><span class="o">(</span><span class="n">AjaxRequestTarget</span> <span class="n">target</span><span class="o">)</span> <span class="o">{</span> + <span class="kd">public</span> <span class="kt">void</span> <span class="nf">onClick</span><span class="o">(</span><span class="n">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">// target is only available in an Ajax request</span> <span class="n">target</span><span class="o">.</span><span class="na">addComponent</span><span class="o">(</span><span class="n">label</span><span class="o">);</span> http://git-wip-us.apache.org/repos/asf/wicket-site/blob/0d038375/content/learn/examples/dropdownchoice.html ---------------------------------------------------------------------- diff --git a/content/learn/examples/dropdownchoice.html b/content/learn/examples/dropdownchoice.html index be6d985..633c5f2 100644 --- a/content/learn/examples/dropdownchoice.html +++ b/content/learn/examples/dropdownchoice.html @@ -69,13 +69,13 @@ select the manager of an employee.</p> <span class="cm">/** * Used to display the person. */</span> - <span class="kd">public</span> <span class="n">String</span> <span class="n">toString</span><span class="o">()</span> <span class="o">{</span> + <span class="kd">public</span> <span class="n">String</span> <span class="nf">toString</span><span class="o">()</span> <span class="o">{</span> <span class="k">return</span> <span class="n">name</span><span class="o">;</span> <span class="o">}</span> <span class="cm">/** * Gets the list of possible managers from the database. */</span> - <span class="kd">public</span> <span class="kd">static</span> <span class="n">List</span><span class="o"><</span><span class="n">Person</span><span class="o">></span> <span class="n">getManagers</span><span class="o">()</span> <span class="o">{</span> + <span class="kd">public</span> <span class="kd">static</span> <span class="n">List</span><span class="o"><</span><span class="n">Person</span><span class="o">></span> <span class="nf">getManagers</span><span class="o">()</span> <span class="o">{</span> <span class="c1">// gets the managers from the database</span> <span class="o">}</span> <span class="o">}</span></code></pre></figure> @@ -115,7 +115,7 @@ The <code class="highlighter-rouge"><option></code> tags are there for pre with the generated choices.</p> <p>Letâs see how the page looks like from the Java side:</p> <figure class="highlight"><pre><code class="language-java" data-lang="java"><span class="kd">public</span> <span class="kd">class</span> <span class="nc">AssignManagerPage</span> <span class="kd">extends</span> <span class="n">WebPage</span> <span class="o">{</span> - <span class="kd">public</span> <span class="n">AssignManagerPage</span><span class="o">(</span><span class="n">Person</span> <span class="n">employee</span><span class="o">)</span> <span class="o">{</span> + <span class="kd">public</span> <span class="nf">AssignManagerPage</span><span class="o">(</span><span class="n">Person</span> <span class="n">employee</span><span class="o">)</span> <span class="o">{</span> <span class="n">Form</span> <span class="n">form</span> <span class="o">=</span> <span class="k">new</span> <span class="n">Form</span><span class="o">(</span><span class="s">"form"</span><span class="o">);</span> <span class="n">add</span><span class="o">(</span><span class="n">form</span><span class="o">);</span> <span class="n">form</span><span class="o">.</span><span class="na">add</span><span class="o">(</span><span class="k">new</span> <span class="n">Label</span><span class="o">(</span><span class="s">"name"</span><span class="o">,</span> <span class="k">new</span> <span class="n">PropertyModel</span><span class="o"><</span><span class="n">String</span><span class="o">>(</span><span class="n">employee</span><span class="o">,</span> <span class="s">"name"</span><span class="o">)));</span> @@ -124,7 +124,7 @@ with the generated choices.</p> <span class="k">new</span> <span class="n">PropertyModel</span><span class="o"><</span><span class="n">Person</span><span class="o">>(</span><span class="n">employee</span><span class="o">,</span> <span class="s">"managedBy"</span><span class="o">),</span> <span class="k">new</span> <span class="n">LoadableDetachableModel</span><span class="o"><</span><span class="n">List</span><span class="o"><</span><span class="n">Person</span><span class="o">>>()</span> <span class="o">{</span> <span class="nd">@Override</span> - <span class="kd">protected</span> <span class="n">Object</span> <span class="n">load</span><span class="o">()</span> <span class="o">{</span> + <span class="kd">protected</span> <span class="n">Object</span> <span class="nf">load</span><span class="o">()</span> <span class="o">{</span> <span class="k">return</span> <span class="n">Person</span><span class="o">.</span><span class="na">getManagers</span><span class="o">();</span> <span class="o">}</span> <span class="o">}</span> http://git-wip-us.apache.org/repos/asf/wicket-site/blob/0d038375/content/learn/examples/guestbook.html ---------------------------------------------------------------------- diff --git a/content/learn/examples/guestbook.html b/content/learn/examples/guestbook.html index bc060ed..f545735 100644 --- a/content/learn/examples/guestbook.html +++ b/content/learn/examples/guestbook.html @@ -66,25 +66,25 @@ of this example.</p> <span class="kd">public</span> <span class="kd">class</span> <span class="nc">Comment</span> <span class="kd">implements</span> <span class="n">IClusterable</span> <span class="o">{</span> <span class="kd">private</span> <span class="n">String</span> <span class="n">text</span><span class="o">;</span> <span class="kd">private</span> <span class="n">Date</span> <span class="n">date</span> <span class="o">=</span> <span class="k">new</span> <span class="n">Date</span><span class="o">();</span> - <span class="kd">public</span> <span class="n">Comment</span><span class="o">()</span> <span class="o">{</span> + <span class="kd">public</span> <span class="nf">Comment</span><span class="o">()</span> <span class="o">{</span> <span class="o">}</span> - <span class="kd">public</span> <span class="n">Comment</span><span class="o">(</span><span class="kd">final</span> <span class="n">Comment</span> <span class="n">comment</span><span class="o">)</span> <span class="o">{</span> + <span class="kd">public</span> <span class="nf">Comment</span><span class="o">(</span><span class="kd">final</span> <span class="n">Comment</span> <span class="n">comment</span><span class="o">)</span> <span class="o">{</span> <span class="k">this</span><span class="o">.</span><span class="na">text</span> <span class="o">=</span> <span class="n">comment</span><span class="o">.</span><span class="na">text</span><span class="o">;</span> <span class="k">this</span><span class="o">.</span><span class="na">date</span> <span class="o">=</span> <span class="n">comment</span><span class="o">.</span><span class="na">date</span><span class="o">;</span> <span class="o">}</span> - <span class="kd">public</span> <span class="n">String</span> <span class="n">getText</span><span class="o">()</span> <span class="o">{</span> + <span class="kd">public</span> <span class="n">String</span> <span class="nf">getText</span><span class="o">()</span> <span class="o">{</span> <span class="k">return</span> <span class="n">text</span><span class="o">;</span> <span class="o">}</span> - <span class="kd">public</span> <span class="kt">void</span> <span class="n">setText</span><span class="o">(</span><span class="n">String</span> <span class="n">text</span><span class="o">)</span> <span class="o">{</span> + <span class="kd">public</span> <span class="kt">void</span> <span class="nf">setText</span><span class="o">(</span><span class="n">String</span> <span class="n">text</span><span class="o">)</span> <span class="o">{</span> <span class="k">this</span><span class="o">.</span><span class="na">text</span> <span class="o">=</span> <span class="n">text</span><span class="o">;</span> <span class="o">}</span> - <span class="kd">public</span> <span class="n">Date</span> <span class="n">getDate</span><span class="o">()</span> <span class="o">{</span> + <span class="kd">public</span> <span class="n">Date</span> <span class="nf">getDate</span><span class="o">()</span> <span class="o">{</span> <span class="k">return</span> <span class="n">date</span><span class="o">;</span> <span class="o">}</span> - <span class="kd">public</span> <span class="kt">void</span> <span class="n">setDate</span><span class="o">(</span><span class="n">Date</span> <span class="n">date</span><span class="o">)</span> <span class="o">{</span> + <span class="kd">public</span> <span class="kt">void</span> <span class="nf">setDate</span><span class="o">(</span><span class="n">Date</span> <span class="n">date</span><span class="o">)</span> <span class="o">{</span> <span class="k">this</span><span class="o">.</span><span class="na">date</span> <span class="o">=</span> <span class="n">date</span><span class="o">;</span> <span class="o">}</span> - <span class="kd">public</span> <span class="n">String</span> <span class="n">toString</span><span class="o">()</span> <span class="o">{</span> + <span class="kd">public</span> <span class="n">String</span> <span class="nf">toString</span><span class="o">()</span> <span class="o">{</span> <span class="k">return</span> <span class="s">"[Comment date = "</span> <span class="o">+</span> <span class="n">date</span> <span class="o">+</span> <span class="s">", text = "</span> <span class="o">+</span> <span class="n">text</span> <span class="o">+</span> <span class="s">"]"</span><span class="o">;</span> <span class="o">}</span> <span class="o">}</span></code></pre></figure> @@ -123,13 +123,13 @@ accomplished in just a few lines of code.</p> <span class="cm">/** * Constructor that is invoked when page is invoked without a session. */</span> - <span class="kd">public</span> <span class="n">GuestBook</span><span class="o">()</span> <span class="o">{</span> + <span class="kd">public</span> <span class="nf">GuestBook</span><span class="o">()</span> <span class="o">{</span> <span class="c1">// Add comment form</span> <span class="n">add</span><span class="o">(</span><span class="k">new</span> <span class="n">CommentForm</span><span class="o">(</span><span class="s">"commentForm"</span><span class="o">));</span> <span class="c1">// Add commentListView of existing comments</span> <span class="n">add</span><span class="o">(</span><span class="k">new</span> <span class="n">PropertyListView</span><span class="o"><</span><span class="n">Comment</span><span class="o">>(</span><span class="s">"comments"</span><span class="o">,</span> <span class="n">commentList</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="n">populateItem</span><span class="o">(</span><span class="kd">final</span> <span class="n">ListItem</span><span class="o"><</span><span class="n">Comment</span><span class="o">></span> <span class="n">listItem</span><span class="o">)</span> <span class="o">{</span> + <span class="kd">public</span> <span class="kt">void</span> <span class="nf">populateItem</span><span class="o">(</span><span class="kd">final</span> <span class="n">ListItem</span><span class="o"><</span><span class="n">Comment</span><span class="o">></span> <span class="n">listItem</span><span class="o">)</span> <span class="o">{</span> <span class="n">listItem</span><span class="o">.</span><span class="na">add</span><span class="o">(</span><span class="k">new</span> <span class="n">Label</span><span class="o">(</span><span class="s">"date"</span><span class="o">));</span> <span class="n">listItem</span><span class="o">.</span><span class="na">add</span><span class="o">(</span><span class="k">new</span> <span class="n">MultiLineLabel</span><span class="o">(</span><span class="s">"text"</span><span class="o">));</span> <span class="o">}</span> @@ -139,7 +139,7 @@ accomplished in just a few lines of code.</p> * A form that allows a user to add a comment. */</span> <span class="kd">public</span> <span class="kd">final</span> <span class="kd">class</span> <span class="nc">CommentForm</span> <span class="kd">extends</span> <span class="n">Form</span><span class="o"><</span><span class="n">ValueMap</span><span class="o">></span> <span class="o">{</span> - <span class="kd">public</span> <span class="n">CommentForm</span><span class="o">(</span><span class="kd">final</span> <span class="n">String</span> <span class="n">id</span><span class="o">)</span> <span class="o">{</span> + <span class="kd">public</span> <span class="nf">CommentForm</span><span class="o">(</span><span class="kd">final</span> <span class="n">String</span> <span class="n">id</span><span class="o">)</span> <span class="o">{</span> <span class="c1">// Construct form with no validation listener</span> <span class="kd">super</span><span class="o">(</span><span class="n">id</span><span class="o">,</span> <span class="k">new</span> <span class="n">CompoundPropertyModel</span><span class="o"><</span><span class="n">ValueMap</span><span class="o">>(</span><span class="k">new</span> <span class="n">ValueMap</span><span class="o">()));</span> <span class="c1">// this is just to make the unit test happy</span> @@ -153,7 +153,7 @@ accomplished in just a few lines of code.</p> * Show the resulting valid edit */</span> <span class="nd">@Override</span> - <span class="kd">public</span> <span class="kd">final</span> <span class="kt">void</span> <span class="n">onSubmit</span><span class="o">()</span> <span class="o">{</span> + <span class="kd">public</span> <span class="kd">final</span> <span class="kt">void</span> <span class="nf">onSubmit</span><span class="o">()</span> <span class="o">{</span> <span class="n">ValueMap</span> <span class="n">values</span> <span class="o">=</span> <span class="n">getModelObject</span><span class="o">();</span> <span class="c1">// check if the honey pot is filled</span> <span class="k">if</span> <span class="o">(</span><span class="n">StringUtils</span><span class="o">.</span><span class="na">isNotBlank</span><span class="o">((</span><span class="n">String</span><span class="o">)</span><span class="n">values</span><span class="o">.</span><span class="na">get</span><span class="o">(</span><span class="s">"comment"</span><span class="o">)))</span> <span class="o">{</span> @@ -173,7 +173,7 @@ accomplished in just a few lines of code.</p> <span class="cm">/** * Clears the comments. */</span> - <span class="kd">public</span> <span class="kd">static</span> <span class="kt">void</span> <span class="n">clear</span><span class="o">()</span> <span class="o">{</span> + <span class="kd">public</span> <span class="kd">static</span> <span class="kt">void</span> <span class="nf">clear</span><span class="o">()</span> <span class="o">{</span> <span class="n">commentList</span><span class="o">.</span><span class="na">clear</span><span class="o">();</span> <span class="o">}</span> <span class="o">}</span></code></pre></figure> @@ -236,10 +236,10 @@ final treat the modifications to the <code class="highlighter-rouge">web.xml</co <span class="kn">import</span> <span class="nn">org.apache.wicket.Page</span><span class="o">;</span> <span class="kn">import</span> <span class="nn">org.apache.wicket.examples.WicketExampleApplication</span><span class="o">;</span> <span class="kd">public</span> <span class="kd">class</span> <span class="nc">GuestBookApplication</span> <span class="kd">extends</span> <span class="n">WicketExampleApplication</span> <span class="o">{</span> - <span class="kd">public</span> <span class="n">GuestBookApplication</span><span class="o">()</span> <span class="o">{</span> + <span class="kd">public</span> <span class="nf">GuestBookApplication</span><span class="o">()</span> <span class="o">{</span> <span class="o">}</span> <span class="nd">@Override</span> - <span class="kd">public</span> <span class="n">Class</span><span class="o"><</span> <span class="o">?</span> <span class="kd">extends</span> <span class="n">Page</span><span class="o">></span> <span class="n">getHomePage</span><span class="o">()</span> <span class="o">{</span> + <span class="kd">public</span> <span class="n">Class</span><span class="o"><</span> <span class="o">?</span> <span class="kd">extends</span> <span class="n">Page</span><span class="o">></span> <span class="nf">getHomePage</span><span class="o">()</span> <span class="o">{</span> <span class="k">return</span> <span class="n">GuestBook</span><span class="o">.</span><span class="na">class</span><span class="o">;</span> <span class="o">}</span> <span class="o">}</span></code></pre></figure> http://git-wip-us.apache.org/repos/asf/wicket-site/blob/0d038375/content/learn/examples/helloworld.html ---------------------------------------------------------------------- diff --git a/content/learn/examples/helloworld.html b/content/learn/examples/helloworld.html index 9db3722..d2856e4 100644 --- a/content/learn/examples/helloworld.html +++ b/content/learn/examples/helloworld.html @@ -68,13 +68,13 @@ without having to go through the whole build-deploy cycle.</p> defines what the home page is, and allows for some configuration.</p> <figure class="highlight"><pre><code class="language-java" data-lang="java"><span class="kn">import</span> <span class="nn">org.apache.wicket.protocol.http.WebApplication</span><span class="o">;</span> <span class="kd">public</span> <span class="kd">class</span> <span class="nc">HelloWorldApplication</span> <span class="kd">extends</span> <span class="n">WebApplication</span> <span class="o">{</span> - <span class="kd">public</span> <span class="n">HelloWorldApplication</span><span class="o">()</span> <span class="o">{</span> + <span class="kd">public</span> <span class="nf">HelloWorldApplication</span><span class="o">()</span> <span class="o">{</span> <span class="o">}</span> <span class="cm">/** * @see org.apache.wicket.Application#getHomePage() */</span> <span class="nd">@Override</span> - <span class="kd">public</span> <span class="n">Class</span> <span class="n">getHomePage</span><span class="o">()</span> <span class="o">{</span> + <span class="kd">public</span> <span class="n">Class</span> <span class="nf">getHomePage</span><span class="o">()</span> <span class="o">{</span> <span class="k">return</span> <span class="n">HelloWorld</span><span class="o">.</span><span class="na">class</span><span class="o">;</span> <span class="o">}</span> <span class="o">}</span></code></pre></figure> @@ -85,7 +85,7 @@ rendered by the HelloWorld page is returned.</p> <figure class="highlight"><pre><code class="language-java" data-lang="java"><span class="kn">import</span> <span class="nn">org.apache.wicket.markup.html.WebPage</span><span class="o">;</span> <span class="kn">import</span> <span class="nn">org.apache.wicket.markup.html.basic.Label</span><span class="o">;</span> <span class="kd">public</span> <span class="kd">class</span> <span class="nc">HelloWorld</span> <span class="kd">extends</span> <span class="n">WebPage</span> <span class="o">{</span> - <span class="kd">public</span> <span class="n">HelloWorld</span><span class="o">()</span> <span class="o">{</span> + <span class="kd">public</span> <span class="nf">HelloWorld</span><span class="o">()</span> <span class="o">{</span> <span class="n">add</span><span class="o">(</span><span class="k">new</span> <span class="n">Label</span><span class="o">(</span><span class="s">"message"</span><span class="o">,</span> <span class="s">"Hello World!"</span><span class="o">));</span> <span class="o">}</span> <span class="o">}</span></code></pre></figure> http://git-wip-us.apache.org/repos/asf/wicket-site/blob/0d038375/content/learn/examples/markupinheritance.html ---------------------------------------------------------------------- diff --git a/content/learn/examples/markupinheritance.html b/content/learn/examples/markupinheritance.html index 8bba13a..ef47356 100644 --- a/content/learn/examples/markupinheritance.html +++ b/content/learn/examples/markupinheritance.html @@ -125,7 +125,7 @@ look at the example at hand. Letâs first create the base page.</p> <span class="kn">import</span> <span class="nn">wicket.markup.html.basic.Label</span><span class="o">;</span> <span class="kn">import</span> <span class="nn">wicket.markup.html.link.BookmarkablePageLink</span><span class="o">;</span> <span class="kd">public</span> <span class="kd">abstract</span> <span class="kd">class</span> <span class="nc">BasePage</span> <span class="kd">extends</span> <span class="n">WebPage</span> <span class="o">{</span> - <span class="kd">public</span> <span class="n">BasePage</span><span class="o">()</span> <span class="o">{</span> + <span class="kd">public</span> <span class="nf">BasePage</span><span class="o">()</span> <span class="o">{</span> <span class="n">add</span><span class="o">(</span><span class="k">new</span> <span class="n">BookmarkablePageLink</span><span class="o">(</span><span class="s">"page1"</span><span class="o">,</span> <span class="n">Page1</span><span class="o">.</span><span class="na">class</span><span class="o">));</span> <span class="n">add</span><span class="o">(</span><span class="k">new</span> <span class="n">BookmarkablePageLink</span><span class="o">(</span><span class="s">"page2"</span><span class="o">,</span> <span class="n">Page2</span><span class="o">.</span><span class="na">class</span><span class="o">));</span> <span class="n">add</span><span class="o">(</span><span class="k">new</span> <span class="n">Label</span><span class="o">(</span><span class="s">"footer"</span><span class="o">,</span> <span class="s">"This is in the footer"</span><span class="o">));</span> @@ -166,7 +166,7 @@ markup file and Java class. Letâs first implement <code class="highlighter-rou <figure class="highlight"><pre><code class="language-java" data-lang="java"><span class="kn">package</span> <span class="n">wicket</span><span class="o">.</span><span class="na">quickstart</span><span class="o">;</span> <span class="kn">import</span> <span class="nn">wicket.markup.html.basic.Label</span><span class="o">;</span> <span class="kd">public</span> <span class="kd">class</span> <span class="nc">Page1</span> <span class="kd">extends</span> <span class="n">BasePage</span> <span class="o">{</span> - <span class="kd">public</span> <span class="n">Page1</span><span class="o">()</span> <span class="o">{</span> + <span class="kd">public</span> <span class="nf">Page1</span><span class="o">()</span> <span class="o">{</span> <span class="n">add</span><span class="o">(</span><span class="k">new</span> <span class="n">Label</span><span class="o">(</span><span class="s">"label1"</span><span class="o">,</span> <span class="s">"This is in the subclass Page1"</span><span class="o">));</span> <span class="o">}</span> <span class="o">}</span></code></pre></figure> @@ -190,7 +190,7 @@ Wicket will not be able to render the component in the final page.</p> <figure class="highlight"><pre><code class="language-java" data-lang="java"><span class="kn">package</span> <span class="n">wicket</span><span class="o">.</span><span class="na">quickstart</span><span class="o">;</span> <span class="kn">import</span> <span class="nn">wicket.markup.html.basic.Label</span><span class="o">;</span> <span class="kd">public</span> <span class="kd">class</span> <span class="nc">Page2</span> <span class="kd">extends</span> <span class="n">BasePage</span> <span class="o">{</span> - <span class="kd">public</span> <span class="n">Page2</span><span class="o">()</span> <span class="o">{</span> + <span class="kd">public</span> <span class="nf">Page2</span><span class="o">()</span> <span class="o">{</span> <span class="n">add</span><span class="o">(</span><span class="k">new</span> <span class="n">Label</span><span class="o">(</span><span class="s">"label2"</span><span class="o">,</span> <span class="s">"This is in the subclass Page2"</span><span class="o">));</span> <span class="o">}</span> <span class="o">}</span></code></pre></figure> http://git-wip-us.apache.org/repos/asf/wicket-site/blob/0d038375/content/learn/examples/navomatic.html ---------------------------------------------------------------------- diff --git a/content/learn/examples/navomatic.html b/content/learn/examples/navomatic.html index 910288f..4ab7364 100644 --- a/content/learn/examples/navomatic.html +++ b/content/learn/examples/navomatic.html @@ -114,9 +114,9 @@ this case, we set Page1 to be our home page.</p> <figure class="highlight"><pre><code class="language-java" data-lang="java"><span class="kn">package</span> <span class="n">org</span><span class="o">.</span><span class="na">apache</span><span class="o">.</span><span class="na">wicket</span><span class="o">.</span><span class="na">examples</span><span class="o">.</span><span class="na">navomatic</span><span class="o">;</span> <span class="kn">import</span> <span class="nn">org.apache.wicket.protocol.http.WebApplication</span><span class="o">;</span> <span class="kd">public</span> <span class="kd">class</span> <span class="nc">NavomaticApplication</span> <span class="kd">extends</span> <span class="n">WebApplication</span> <span class="o">{</span> - <span class="kd">public</span> <span class="n">NavomaticApplication</span><span class="o">()</span> <span class="o">{</span> + <span class="kd">public</span> <span class="nf">NavomaticApplication</span><span class="o">()</span> <span class="o">{</span> <span class="o">}</span> - <span class="kd">public</span> <span class="n">Class</span> <span class="n">getHomePage</span><span class="o">()</span> <span class="o">{</span> + <span class="kd">public</span> <span class="n">Class</span> <span class="nf">getHomePage</span><span class="o">()</span> <span class="o">{</span> <span class="k">return</span> <span class="n">Page1</span><span class="o">.</span><span class="na">class</span><span class="o">;</span> <span class="o">}</span> <span class="o">}</span></code></pre></figure> @@ -125,7 +125,7 @@ this case, we set Page1 to be our home page.</p> <figure class="highlight"><pre><code class="language-java" data-lang="java"><span class="kn">package</span> <span class="n">wicket</span><span class="o">.</span><span class="na">examples</span><span class="o">.</span><span class="na">navomatic</span><span class="o">;</span> <span class="kn">import</span> <span class="nn">org.apache.wicket.markup.html.WebPage</span><span class="o">;</span> <span class="kd">public</span> <span class="kd">class</span> <span class="nc">Page1</span> <span class="kd">extends</span> <span class="n">WebPage</span> <span class="o">{</span> - <span class="kd">public</span> <span class="n">Page1</span><span class="o">()</span> <span class="o">{</span> + <span class="kd">public</span> <span class="nf">Page1</span><span class="o">()</span> <span class="o">{</span> <span class="n">add</span><span class="o">(</span><span class="k">new</span> <span class="n">NavomaticBorder</span><span class="o">(</span><span class="s">"navomaticBorder"</span><span class="o">));</span> <span class="o">}</span> <span class="o">}</span></code></pre></figure> @@ -146,7 +146,7 @@ two names match, Wicket associates the NavomaticBorder Java component with the <p>The Page2 Java and HTML files look almost identical (and weâll omit the sources for Page3 altogether because it follows the same pattern):</p> <figure class="highlight"><pre><code class="language-java" data-lang="java"><span class="kd">public</span> <span class="kd">class</span> <span class="nc">Page2</span> <span class="kd">extends</span> <span class="n">WebPage</span> <span class="o">{</span> - <span class="kd">public</span> <span class="n">Page2</span><span class="o">()</span> <span class="o">{</span> + <span class="kd">public</span> <span class="nf">Page2</span><span class="o">()</span> <span class="o">{</span> <span class="n">add</span><span class="o">(</span><span class="k">new</span> <span class="n">NavomaticBorder</span><span class="o">(</span><span class="s">"navomaticBorder"</span><span class="o">));</span> <span class="o">}</span> <span class="o">}</span></code></pre></figure> @@ -167,7 +167,7 @@ is in the NavomaticBorder markup.</p> <span class="kn">import</span> <span class="nn">org.apache.wicket.markup.html.border.Border</span><span class="o">;</span> <span class="kn">import</span> <span class="nn">org.apache.wicket.markup.html.border.BoxBorder</span><span class="o">;</span> <span class="kd">public</span> <span class="kd">class</span> <span class="nc">NavomaticBorder</span> <span class="kd">extends</span> <span class="n">Border</span> <span class="o">{</span> - <span class="kd">public</span> <span class="n">NavomaticBorder</span><span class="o">(</span><span class="kd">final</span> <span class="n">String</span> <span class="n">componentName</span><span class="o">)</span> <span class="o">{</span> + <span class="kd">public</span> <span class="nf">NavomaticBorder</span><span class="o">(</span><span class="kd">final</span> <span class="n">String</span> <span class="n">componentName</span><span class="o">)</span> <span class="o">{</span> <span class="kd">super</span><span class="o">(</span><span class="n">componentName</span><span class="o">);</span> <span class="n">addToBorder</span><span class="o">(</span><span class="k">new</span> <span class="n">BoxBorder</span><span class="o">(</span><span class="s">"navigationBorder"</span><span class="o">));</span> <span class="n">addToBorder</span><span class="o">(</span><span class="k">new</span> <span class="n">BoxBorder</span><span class="o">(</span><span class="s">"bodyBorder"</span><span class="o">));</span> http://git-wip-us.apache.org/repos/asf/wicket-site/blob/0d038375/content/learn/examples/servlet3x.html ---------------------------------------------------------------------- diff --git a/content/learn/examples/servlet3x.html b/content/learn/examples/servlet3x.html index a1b9f50..d576f5d 100644 --- a/content/learn/examples/servlet3x.html +++ b/content/learn/examples/servlet3x.html @@ -76,10 +76,10 @@ example. You have to place them into the scanned package or in sub packages. (co <span class="kn">import</span> <span class="nn">org.springframework.web.context.support.AnnotationConfigWebApplicationContext</span><span class="o">;</span> <span class="nd">@WebListener</span> <span class="kd">public</span> <span class="kd">class</span> <span class="nc">MyContextLoaderListener</span> <span class="kd">extends</span> <span class="n">ContextLoaderListener</span> <span class="o">{</span> - <span class="kd">public</span> <span class="n">MyContextLoaderListener</span><span class="o">()</span> <span class="o">{</span> + <span class="kd">public</span> <span class="nf">MyContextLoaderListener</span><span class="o">()</span> <span class="o">{</span> <span class="kd">super</span><span class="o">(</span><span class="n">getWebApplicationContext</span><span class="o">());</span> <span class="o">}</span> - <span class="kd">private</span> <span class="kd">static</span> <span class="n">WebApplicationContext</span> <span class="n">getWebApplicationContext</span><span class="o">()</span> <span class="o">{</span> + <span class="kd">private</span> <span class="kd">static</span> <span class="n">WebApplicationContext</span> <span class="nf">getWebApplicationContext</span><span class="o">()</span> <span class="o">{</span> <span class="n">AnnotationConfigWebApplicationContext</span> <span class="n">context</span> <span class="o">=</span> <span class="k">new</span> <span class="n">AnnotationConfigWebApplicationContext</span><span class="o">();</span> <span class="n">context</span><span class="o">.</span><span class="na">scan</span><span class="o">(</span><span class="s">"com.my.package"</span><span class="o">);</span> @@ -110,10 +110,10 @@ autowired by using the @SpringBean annotation in any wicket component like a Web <span class="nd">@Autowired</span> <span class="kd">private</span> <span class="n">HttpSession</span> <span class="n">httpSession</span><span class="o">;</span> <span class="nd">@PostConstruct</span> - <span class="kd">public</span> <span class="kt">void</span> <span class="n">postConstruct</span><span class="o">()</span> <span class="o">{</span> + <span class="kd">public</span> <span class="kt">void</span> <span class="nf">postConstruct</span><span class="o">()</span> <span class="o">{</span> <span class="c1">// do something after the bean has been constructed</span> <span class="o">}</span> - <span class="kd">public</span> <span class="n">HttpSession</span> <span class="n">getHttpSession</span><span class="o">()</span> <span class="o">{</span> + <span class="kd">public</span> <span class="n">HttpSession</span> <span class="nf">getHttpSession</span><span class="o">()</span> <span class="o">{</span> <span class="k">return</span> <span class="n">httpSession</span><span class="o">;</span> <span class="o">}</span> <span class="o">}</span></code></pre></figure> @@ -124,7 +124,7 @@ autowired by using the @SpringBean annotation in any wicket component like a Web <span class="kd">public</span> <span class="kd">class</span> <span class="nc">HelloWorld</span> <span class="kd">extends</span> <span class="n">WebPage</span> <span class="o">{</span> <span class="nd">@SpringBean</span> <span class="kd">private</span> <span class="n">MySessionBean</span> <span class="n">mySessionBean</span><span class="o">;</span> - <span class="kd">public</span> <span class="n">HomePage</span><span class="o">()</span> <span class="o">{</span> + <span class="kd">public</span> <span class="nf">HomePage</span><span class="o">()</span> <span class="o">{</span> <span class="c1">// do something</span> <span class="o">}</span> <span class="o">}</span></code></pre></figure> @@ -140,11 +140,11 @@ example: <a href="helloworld.html">Hello World!</a></p> <span class="kn">import</span> <span class="nn">com.my.package.HelloWorld</span><span class="o">;</span> <span class="kd">public</span> <span class="kd">class</span> <span class="nc">MyApplication</span> <span class="kd">extends</span> <span class="n">WebApplication</span> <span class="o">{</span> <span class="nd">@Override</span> - <span class="kd">public</span> <span class="n">Class</span><span class="o"><?</span> <span class="kd">extends</span> <span class="n">Page</span><span class="o">></span> <span class="n">getHomePage</span><span class="o">()</span> <span class="o">{</span> + <span class="kd">public</span> <span class="n">Class</span><span class="o"><?</span> <span class="kd">extends</span> <span class="n">Page</span><span class="o">></span> <span class="nf">getHomePage</span><span class="o">()</span> <span class="o">{</span> <span class="k">return</span> <span class="n">HelloWorld</span><span class="o">.</span><span class="na">class</span><span class="o">;</span> <span class="o">}</span> <span class="nd">@Override</span> - <span class="kd">protected</span> <span class="kt">void</span> <span class="n">init</span><span class="o">()</span> <span class="o">{</span> + <span class="kd">protected</span> <span class="kt">void</span> <span class="nf">init</span><span class="o">()</span> <span class="o">{</span> <span class="kd">super</span><span class="o">.</span><span class="na">init</span><span class="o">();</span> <span class="n">getComponentInstantiationListeners</span><span class="o">().</span><span class="na">add</span><span class="o">(</span><span class="k">new</span> <span class="n">SpringComponentInjector</span><span class="o">(</span><span class="k">this</span><span class="o">,</span> <span class="n">WebApplicationContextUtils</span><span class="o">.</span><span class="na">getRequiredWebApplicationContext</span><span class="o">(</span> http://git-wip-us.apache.org/repos/asf/wicket-site/blob/0d038375/content/learn/examples/usingfragments.html ---------------------------------------------------------------------- diff --git a/content/learn/examples/usingfragments.html b/content/learn/examples/usingfragments.html index d86ebe2..a827efd 100644 --- a/content/learn/examples/usingfragments.html +++ b/content/learn/examples/usingfragments.html @@ -86,9 +86,9 @@ and web markup container.</p> <span class="kn">import</span> <span class="nn">wicket.markup.html.list.Loop</span><span class="o">;</span> <span class="kn">import</span> <span class="nn">wicket.markup.html.panel.Fragment</span><span class="o">;</span> <span class="kd">public</span> <span class="kd">class</span> <span class="nc">Index</span> <span class="kd">extends</span> <span class="n">QuickStartPage</span> <span class="o">{</span> - <span class="kd">public</span> <span class="n">Index</span><span class="o">()</span> <span class="o">{</span> + <span class="kd">public</span> <span class="nf">Index</span><span class="o">()</span> <span class="o">{</span> <span class="n">Loop</span> <span class="n">loop</span> <span class="o">=</span> <span class="k">new</span> <span class="n">Loop</span><span class="o">(</span><span class="s">"list"</span><span class="o">,</span> <span class="mi">5</span><span class="o">)</span> <span class="o">{</span> - <span class="kd">protected</span> <span class="kt">void</span> <span class="n">populateItem</span><span class="o">(</span><span class="n">LoopItem</span> <span class="n">item</span><span class="o">)</span> <span class="o">{</span> + <span class="kd">protected</span> <span class="kt">void</span> <span class="nf">populateItem</span><span class="o">(</span><span class="n">LoopItem</span> <span class="n">item</span><span class="o">)</span> <span class="o">{</span> <span class="n">String</span> <span class="n">fragmentId</span> <span class="o">=</span> <span class="s">"fragment"</span> <span class="o">+</span> <span class="o">(</span><span class="n">item</span><span class="o">.</span><span class="na">getIteration</span><span class="o">()</span> <span class="o">%</span> <span class="mi">2</span> <span class="o">+</span> <span class="mi">1</span><span class="o">);</span> <span class="n">item</span><span class="o">.</span><span class="na">add</span><span class="o">(</span><span class="k">new</span> <span class="n">Fragment</span><span class="o">(</span><span class="s">"panel"</span><span class="o">,</span> <span class="n">fragmentId</span><span class="o">,</span> <span class="n">Index</span><span class="o">.</span><span class="na">this</span><span class="o">));</span> <span class="o">}</span> @@ -123,14 +123,14 @@ subclass for fragment one to encapsulate the component.</p> <span class="kn">import</span> <span class="nn">wicket.markup.html.panel.Fragment</span><span class="o">;</span> <span class="kd">public</span> <span class="kd">class</span> <span class="nc">Index</span> <span class="kd">extends</span> <span class="n">QuickStartPage</span> <span class="o">{</span> <span class="kd">public</span> <span class="kd">class</span> <span class="nc">Fragment1</span> <span class="kd">extends</span> <span class="n">Fragment</span> <span class="o">{</span> - <span class="kd">public</span> <span class="n">Fragment1</span><span class="o">(</span><span class="n">String</span> <span class="n">id</span><span class="o">,</span> <span class="n">String</span> <span class="n">markupId</span><span class="o">)</span> <span class="o">{</span> + <span class="kd">public</span> <span class="nf">Fragment1</span><span class="o">(</span><span class="n">String</span> <span class="n">id</span><span class="o">,</span> <span class="n">String</span> <span class="n">markupId</span><span class="o">)</span> <span class="o">{</span> <span class="kd">super</span><span class="o">(</span><span class="n">id</span><span class="o">,</span> <span class="n">markupId</span><span class="o">,</span> <span class="n">Index</span><span class="o">.</span><span class="na">this</span><span class="o">);</span> <span class="n">add</span><span class="o">(</span><span class="k">new</span> <span class="n">Label</span><span class="o">(</span><span class="s">"label"</span><span class="o">,</span> <span class="s">"Hello, World!"</span><span class="o">));</span> <span class="o">}</span> <span class="o">}</span> - <span class="kd">public</span> <span class="n">Index</span><span class="o">()</span> <span class="o">{</span> + <span class="kd">public</span> <span class="nf">Index</span><span class="o">()</span> <span class="o">{</span> <span class="n">Loop</span> <span class="n">loop</span> <span class="o">=</span> <span class="k">new</span> <span class="n">Loop</span><span class="o">(</span><span class="s">"list"</span><span class="o">,</span> <span class="mi">5</span><span class="o">)</span> <span class="o">{</span> - <span class="kd">protected</span> <span class="kt">void</span> <span class="n">populateItem</span><span class="o">(</span><span class="n">LoopItem</span> <span class="n">item</span><span class="o">)</span> <span class="o">{</span> + <span class="kd">protected</span> <span class="kt">void</span> <span class="nf">populateItem</span><span class="o">(</span><span class="n">LoopItem</span> <span class="n">item</span><span class="o">)</span> <span class="o">{</span> <span class="kt">int</span> <span class="n">index</span> <span class="o">=</span> <span class="o">(</span><span class="n">item</span><span class="o">.</span><span class="na">getIteration</span><span class="o">()</span> <span class="o">%</span> <span class="mi">2</span> <span class="o">+</span> <span class="mi">1</span><span class="o">);</span> <span class="n">String</span> <span class="n">fragmentId</span> <span class="o">=</span> <span class="s">"fragment"</span> <span class="o">+</span> <span class="n">index</span><span class="o">;</span> <span class="k">if</span> <span class="o">(</span><span class="n">index</span> <span class="o">==</span> <span class="mi">1</span><span class="o">)</span> <span class="o">{</span> http://git-wip-us.apache.org/repos/asf/wicket-site/blob/0d038375/content/news/2009/07/30/wicket-1.4-takes-typesafety-to-the-next-level.html ---------------------------------------------------------------------- diff --git a/content/news/2009/07/30/wicket-1.4-takes-typesafety-to-the-next-level.html b/content/news/2009/07/30/wicket-1.4-takes-typesafety-to-the-next-level.html index 3bdf6e0..cbe4d0d 100644 --- a/content/news/2009/07/30/wicket-1.4-takes-typesafety-to-the-next-level.html +++ b/content/news/2009/07/30/wicket-1.4-takes-typesafety-to-the-next-level.html @@ -99,7 +99,7 @@ nationalities, credit card processors, etc.</p> <p>The signature of a constructor for the <code class="highlighter-rouge">DropDownChoice</code> component in Wicket 1.3 was:</p> <figure class="highlight"><pre><code class="language-java" data-lang="java"><span class="kd">public</span> <span class="kd">class</span> <span class="nc">DropDownChoice</span> <span class="kd">extends</span> <span class="o">...</span> - <span class="kd">public</span> <span class="n">DropDownChoice</span><span class="o">(</span><span class="n">String</span> <span class="n">id</span><span class="o">,</span> <span class="n">IModel</span> <span class="n">model</span><span class="o">,</span> <span class="n">IModel</span> <span class="n">choices</span><span class="o">)</span> + <span class="kd">public</span> <span class="nf">DropDownChoice</span><span class="o">(</span><span class="n">String</span> <span class="n">id</span><span class="o">,</span> <span class="n">IModel</span> <span class="n">model</span><span class="o">,</span> <span class="n">IModel</span> <span class="n">choices</span><span class="o">)</span> <span class="o">}</span></code></pre></figure> <p>As you can see, this constructor doesnât give much insight into what goes where (other than the names of the parameters). The first parameter is the @@ -110,7 +110,7 @@ to assign the right IModel values to the right parameters. Now take a look at the same constructor, but now in Wicket 1.4. The signature for our generified constructor looks like the following example.</p> <figure class="highlight"><pre><code class="language-java" data-lang="java"><span class="kd">public</span> <span class="o"><</span><span class="n">T</span><span class="o">></span> <span class="n">DropDownChoice</span> <span class="kd">extends</span> <span class="o">...</span> - <span class="kd">public</span> <span class="n">DropDownChoice</span><span class="o">(</span><span class="n">String</span> <span class="n">id</span><span class="o">,</span> <span class="n">IModel</span><span class="o"><</span><span class="n">T</span><span class="o">></span> <span class="n">model</span><span class="o">,</span> <span class="n">IModel</span><span class="o"><?</span> <span class="kd">extends</span> <span class="n">List</span><span class="o"><?</span> <span class="kd">extends</span> <span class="n">T</span><span class="o">>></span> <span class="n">choices</span><span class="o">)</span> + <span class="kd">public</span> <span class="nf">DropDownChoice</span><span class="o">(</span><span class="n">String</span> <span class="n">id</span><span class="o">,</span> <span class="n">IModel</span><span class="o"><</span><span class="n">T</span><span class="o">></span> <span class="n">model</span><span class="o">,</span> <span class="n">IModel</span><span class="o"><?</span> <span class="kd">extends</span> <span class="n">List</span><span class="o"><?</span> <span class="kd">extends</span> <span class="n">T</span><span class="o">>></span> <span class="n">choices</span><span class="o">)</span> <span class="o">}</span></code></pre></figure> <p>Here we communicate that the first <code class="highlighter-rouge">IModel</code> parameter is a <code class="highlighter-rouge">T</code>, which is the single value that will be provided when the <code class="highlighter-rouge">DropDownChoice</code> selects one @@ -129,9 +129,9 @@ use a model or use two different model types: which one should be in the lead? We chose to generify only the components that clearly benefited from the extra type information, leading to clean code like this:</p> <figure class="highlight"><pre><code class="language-java" data-lang="java"><span class="n">ListView</span><span class="o"><</span><span class="n">Person</span><span class="o">></span> <span class="n">peopleListView</span> <span class="o">=</span> <span class="k">new</span> <span class="n">ListView</span><span class="o"><</span><span class="n">Person</span><span class="o">>(</span><span class="s">"people"</span><span class="o">,</span> <span class="n">people</span><span class="o">)</span> <span class="o">{</span> - <span class="kd">protected</span> <span class="kt">void</span> <span class="n">populateItem</span><span class="o">(</span><span class="n">ListItem</span><span class="o"><</span><span class="n">Person</span><span class="o">></span> <span class="n">item</span><span class="o">)</span> <span class="o">{</span> + <span class="kd">protected</span> <span class="kt">void</span> <span class="nf">populateItem</span><span class="o">(</span><span class="n">ListItem</span><span class="o"><</span><span class="n">Person</span><span class="o">></span> <span class="n">item</span><span class="o">)</span> <span class="o">{</span> <span class="n">item</span><span class="o">.</span><span class="na">add</span><span class="o">(</span><span class="k">new</span> <span class="n">Link</span><span class="o"><</span><span class="n">Person</span><span class="o">>(</span><span class="s">"editPerson"</span><span class="o">,</span> <span class="n">item</span><span class="o">.</span><span class="na">getModel</span><span class="o">()){</span> - <span class="kd">public</span> <span class="kt">void</span> <span class="n">onClick</span><span class="o">()</span> <span class="o">{</span> + <span class="kd">public</span> <span class="kt">void</span> <span class="nf">onClick</span><span class="o">()</span> <span class="o">{</span> <span class="n">Person</span> <span class="n">p</span> <span class="o">=</span> <span class="n">getModelObject</span><span class="o">();</span> <span class="n">setResponsePage</span><span class="o">(</span><span class="k">new</span> <span class="n">EditPersonPage</span><span class="o">(</span><span class="n">p</span><span class="o">));</span> <span class="o">}</span> http://git-wip-us.apache.org/repos/asf/wicket-site/blob/0d038375/content/news/2010/08/11/wicket-1.4.10-released.html ---------------------------------------------------------------------- diff --git a/content/news/2010/08/11/wicket-1.4.10-released.html b/content/news/2010/08/11/wicket-1.4.10-released.html index a06e97f..2be7867 100644 --- a/content/news/2010/08/11/wicket-1.4.10-released.html +++ b/content/news/2010/08/11/wicket-1.4.10-released.html @@ -81,7 +81,7 @@ thirty bug fixes and improvements.</p> * </p> * */</span> - <span class="kd">protected</span> <span class="kt">void</span> <span class="n">onInitialize</span><span class="o">()</span> <span class="o">{}</span> + <span class="kd">protected</span> <span class="kt">void</span> <span class="nf">onInitialize</span><span class="o">()</span> <span class="o">{}</span> <span class="o">}</span></code></pre></figure> <p>Component configuration allows developers to easier configure component states such as visibility, enabled, etc. From the javadoc:</p> <figure class="highlight"><pre><code class="language-java" data-lang="java"><span class="kd">public</span> <span class="kd">class</span> <span class="nc">Component</span> <span class="o">{</span> @@ -143,7 +143,7 @@ thirty bug fixes and improvements.</p> * } * </pre> */</span> - <span class="kd">protected</span> <span class="kt">void</span> <span class="n">onConfigure</span><span class="o">()</span> <span class="o">{}</span> + <span class="kd">protected</span> <span class="kt">void</span> <span class="nf">onConfigure</span><span class="o">()</span> <span class="o">{}</span> <span class="o">}</span></code></pre></figure> <ul> <li><a href="http://svn.apache.org/repos/asf/wicket/releases/wicket-1.4.10/">Subversion tag</a></li>