| <!DOCTYPE html> |
| <html> |
| <head> |
| <title>Apache Wicket - Wicket 1.4.10 released</title> |
| |
| <link rel="stylesheet" href="/css/screen.css" type="text/css" media="screen" /> |
| |
| <!--[if lt ie 7]> |
| <link rel="stylesheet" href="/css/ie.css" type="text/css" media="screen" /> |
| <![endif]--> |
| <link rel="shortcut icon" href="/favicon.ico" type="image/vnd.microsoft.icon" /> |
| <link rel="alternate" type="application/atom+xml" href="/atom.xml" /> |
| <meta http-equiv="content-type" content="text/html;charset=utf-8" /> |
| </head> |
| <body> |
| <div id="container"> |
| <div id="content"> |
| <div id="header"><a href="/"><h1 id="logo"><span>Apache Wicket</span></h1></a></div> |
| <div id="navigation"> |
| <h5><a name="Navigation-Wicket"></a>Meet Wicket</h5> |
| <ul> |
| <li> |
| <a href="/" title="Index">Home</a> |
| </li> |
| <li> |
| <a href="/meet/introduction.html" title="Introduction">Introduction</a> |
| </li> |
| <li> |
| <a href="/meet/features.html" title="Features">Features</a> |
| </li> |
| <li> |
| <a href="/meet/buzz.html" title="Buzz">Buzz</a> |
| </li> |
| <li> |
| <a href="/meet/vision.html" title="Vision">Vision</a> |
| </li> |
| <li> |
| <a href="/meet/blogs.html" title="Blogs">Blogs</a> |
| </li> |
| </ul> |
| <h5> |
| <a name="Navigation-GettingStarted" id="Navigation-GettingStarted"></a>Get Started |
| </h5> |
| <ul> |
| <li> |
| <a href="/start/download.html" title="Download Wicket">Download Wicket</a> |
| </li> |
| <li> |
| <a href="/start/quickstart.html" title="Getting started via a Maven Archetype">Quickstart</a> |
| </li> |
| <li> |
| <a href="http://www.jweekend.com/dev/LegUp" rel="nofollow">More archetypes</a> |
| </li> |
| <li> |
| <a href="/help" title="Get help">Get help</a> |
| </li> |
| <li> |
| <a href="/help/email.html" title="Wicket Mailing Lists">Mailing Lists</a> |
| </li> |
| </ul> |
| <h5> |
| <a name="Navigation-Documentation" id="Navigation-Documentation"></a>Learn |
| </h5> |
| <ul> |
| <li> |
| <a href="/start/userguide.html" title="User Guide">User Guide</a> |
| </li> |
| <li> |
| <a href="/learn/examples" title="Examples">Examples</a> |
| </li> |
| <li> |
| <a href="http://www.wicket-library.com/wicket-examples/compref/">Components</a> |
| </li> |
| <li> |
| <a href="/learn/projects/" title="Projects extending basic Wicket">Projects</a> |
| </li> |
| <li> |
| <a href="https://cwiki.apache.org/confluence/display/WICKET">Wiki</a> |
| </li> |
| <li> |
| <a href="https://cwiki.apache.org/confluence/display/WICKET/Reference+library">Reference guide</a> |
| </li> |
| <li> |
| <a href="/learn/books" title="Books">Books</a> |
| </li> |
| <li> |
| <a href="/learn/ides.html" title="IDEs">IDEs</a> |
| </li> |
| </ul> |
| <h5> |
| <a name="Navigation-Releases" id="Navigation-Releases"></a>Releases |
| </h5> |
| <ul> |
| <li> |
| <a href="http://www.apache.org/dyn/closer.cgi/wicket/6.20.0">Wicket 6.20</a> |
| </li> |
| <li> |
| <a href="http://www.apache.org/dyn/closer.cgi/wicket/1.5.13">Wicket 1.5</a> |
| </li> |
| <li> |
| <a href="http://www.apache.org/dyn/closer.cgi/wicket/1.4.23">Wicket 1.4</a> |
| </li> |
| <li> |
| <a href="http://www.apache.org/dyn/closer.cgi/wicket/1.3.7">Wicket 1.3</a> |
| </li> |
| <li> |
| <a href="http://wicket.sf.net/wicket-1.2" class="external-link" rel="nofollow">Wicket 1.2</a> |
| </li> |
| <li> |
| <a href="http://wicket.sf.net/wicket-1.1" class="external-link" rel="nofollow">Wicket 1.1</a> |
| </li> |
| <li> |
| <a href="http://wicket.sf.net/wicket-1.0" class="external-link" rel="nofollow">Wicket 1.0</a> |
| </li> |
| </ul> |
| <h5> |
| <a name="Navigation-Docs" id="Navigation-Docs"></a>API Docs |
| </h5> |
| <ul> |
| <li> |
| <a href="http://ci.apache.org/projects/wicket/apidocs/6.x/" title="JavaDocs of Apache Wicket 6.x">Wicket 6.x</a> |
| </li> |
| <li> |
| <a href="http://ci.apache.org/projects/wicket/apidocs/1.5.x/" title="JavaDocs of Apache Wicket 1.5.x">Wicket 1.5</a> |
| </li> |
| <li> |
| <a href="http://ci.apache.org/projects/wicket/apidocs/1.4.x" title="JavaDocs of Apache Wicket 1.4.x">Wicket 1.4</a> |
| </li> |
| <li> |
| <a href="http://ci.apache.org/projects/wicket/apidocs/1.3.x" title="JavaDocs of Apache Wicket 1.3.x">Wicket 1.3</a> |
| </li> |
| </ul> |
| <h5>Wicket 7.x</h5> |
| <ul> |
| <li> |
| <a href="http://www.apache.org/dyn/closer.cgi/wicket/7.0.0-M6">Download M6</a> |
| </li> |
| <li> |
| <a href="https://cwiki.apache.org/confluence/display/WICKET/Migration+to+Wicket+7.0">Migration guide</a> |
| </li> |
| <li> |
| <a href="http://ci.apache.org/projects/wicket/apidocs/7.x/" title="JavaDocs of Apache Wicket 7.x">API Docs 7.x</a> |
| </li> |
| </ul> |
| <h5> |
| <a name="Navigation-Developers" id="Navigation-Developers"></a>Contribute |
| </h5> |
| <ul> |
| <li> |
| <a href="/contribute/write.html" title="Writing documentation">Writing docs</a> |
| </li> |
| <li> |
| <a href="/contribute/build.html" title="Building from SVN">Build Wicket</a> |
| </li> |
| <li> |
| <a href="/contribute/patch.html" title="Provide a patch">Provide a patch</a> |
| </li> |
| <li> |
| <a href="/contribute/release.html" title="Release Wicket">Release Wicket</a> |
| </li> |
| <li> |
| <a href="https://fisheye6.atlassian.com/browse/wicket-git" title="Git Overview" class="external-link" rel="nofollow">Fisheye</a> |
| </li> |
| </ul> |
| <h5> |
| <a name="Navigation-Apache" id="Navigation-Apache"></a>Apache |
| </h5> |
| <ul> |
| <li> |
| <a href="http://www.apache.org/" class="external-link" rel="nofollow">Apache</a> |
| </li> |
| <li> |
| <a href="http://www.apache.org/licenses/" class="external-link" rel="nofollow">License</a> |
| </li> |
| <li> |
| <a href="http://www.apache.org/foundation/sponsorship.html" class="external-link" rel="nofollow">Sponsorship</a> |
| </li> |
| <li> |
| <a href="http://apache.org/foundation/thanks.html" class="external-link" rel="nofollow">Thanks</a> |
| </li> |
| <li> |
| <a href="/apache/friends.html" title="Apache projects using Wicket">Friends</a> |
| </li> |
| </ul> |
| </div> |
| |
| <div id="contentbody"> |
| <h1>Wicket 1.4.10 released</h1> |
| <p>This is the tenth maintenance release of the 1.4.x series and brings over |
| thirty bug fixes and improvements.</p> |
| |
| <p>As well as bringing bug fixes and small improvements, 1.4.10 brings two major new features: |
| * Delayed component initialization |
| * Component configuration </p> |
| |
| <p>Delayed component initialization allows developers to initialize their components outside of a constructor, when more environment is available to the component instance. From the javadoc:</p> |
| |
| <div 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> |
| <span class="cm">/**</span> |
| <span class="cm"> * This method is meant to be used as an alternative to initialize components. Usually the</span> |
| <span class="cm"> * component's constructor is used for this task, but sometimes a component cannot be</span> |
| <span class="cm"> * initialized in isolation, it may need to access its parent component or its markup in order</span> |
| <span class="cm"> * to fully initialize. This method is invoked once per component's lifecycle when a path exists</span> |
| <span class="cm"> * from this component to the {@link Page} thus providing the component with an atomic callback</span> |
| <span class="cm"> * when the component's environment is built out.</span> |
| <span class="cm"> * <p></span> |
| <span class="cm"> * Overrides must call super#{@link #onInitialize()}. Usually this should be the first thing an</span> |
| <span class="cm"> * override does, much like a constructor.</span> |
| <span class="cm"> * </p></span> |
| <span class="cm"> * <p></span> |
| <span class="cm"> * Parent containers are guaranteed to be initialized before their children</span> |
| <span class="cm"> * </p></span> |
| <span class="cm"> * <p></span> |
| <span class="cm"> * It is safe to use {@link #getPage()} in this method</span> |
| <span class="cm"> * </p></span> |
| <span class="cm"> * </span> |
| <span class="cm"> * <p></span> |
| <span class="cm"> * NOTE:The timing of this call is not precise, the contract is that it is called sometime</span> |
| <span class="cm"> * before {@link Component#onBeforeRender()}.</span> |
| <span class="cm"> * </p></span> |
| <span class="cm"> * </span> |
| <span class="cm"> */</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></div> |
| |
| <p>Component configuration allows developers to easier configure component states such as visibility, enabled, etc. From the javadoc:</p> |
| |
| <div 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> |
| <span class="cm">/**</span> |
| <span class="cm"> * Called once per request on components before they are about to be rendered. This method</span> |
| <span class="cm"> * should be used to configure such things as visibility and enabled flags.</span> |
| <span class="cm"> * <p></span> |
| <span class="cm"> * Overrides must call {@code super.onConfigure()}, usually before any other code</span> |
| <span class="cm"> * </p></span> |
| <span class="cm"> * <p></span> |
| <span class="cm"> * NOTE: Component hierarchy should not be modified inside this method, instead it should be</span> |
| <span class="cm"> * done in {@link #onBeforeRender()}</span> |
| <span class="cm"> * </p></span> |
| <span class="cm"> * <p></span> |
| <span class="cm"> * NOTE: Why this method is preferrable to directly overriding {@link #isVisible()} and</span> |
| <span class="cm"> * {@link #isEnabled()}? Because those methods are called multiple times even for processing of</span> |
| <span class="cm"> * a single request. If they contain expensive logic they can slow down the response time of the</span> |
| <span class="cm"> * entire page. Further, overriding those methods directly on form components may lead to</span> |
| <span class="cm"> * inconsistent or unexpected state depending on when those methods are called in the form</span> |
| <span class="cm"> * processing workflow. It is a better practice to push changes to state rather than pull.</span> |
| <span class="cm"> * </p></span> |
| <span class="cm"> * <p></span> |
| <span class="cm"> * NOTE: If component's visibility or another property depends on another component you may call</span> |
| <span class="cm"> * {@code other.configure()} followed by {@code other.isVisible()} as mentioned in</span> |
| <span class="cm"> * {@link #configure()} javadoc.</span> |
| <span class="cm"> * </p></span> |
| <span class="cm"> * <p></span> |
| <span class="cm"> * NOTE: Why should {@link #onBeforeRender()} not be used for this? Because if visibility of a</span> |
| <span class="cm"> * component is toggled inside {@link #onBeforeRender()} another method needs to be overridden</span> |
| <span class="cm"> * to make sure {@link #onBeforeRender()} will be invoked on ivisible components:</span> |
| <span class="cm"> * </span> |
| <span class="cm"> * <pre></span> |
| <span class="cm"> * class MyComponent extends WebComponent</span> |
| <span class="cm"> * {</span> |
| <span class="cm"> * protected void onBeforeRender()</span> |
| <span class="cm"> * {</span> |
| <span class="cm"> * setVisible(Math.rand() &gt; 0.5f);</span> |
| <span class="cm"> * super.onBeforeRender();</span> |
| <span class="cm"> * }</span> |
| <span class="cm"> * </span> |
| <span class="cm"> * // if this override is forgotten, once invisible component will never become visible</span> |
| <span class="cm"> * protected boolean callOnBeforeRenderIfNotVisible()</span> |
| <span class="cm"> * {</span> |
| <span class="cm"> * return true;</span> |
| <span class="cm"> * }</span> |
| <span class="cm"> * }</span> |
| <span class="cm"> * </pre></span> |
| <span class="cm"> * </span> |
| <span class="cm"> * VS</span> |
| <span class="cm"> * </span> |
| <span class="cm"> * <pre></span> |
| <span class="cm"> * class MyComponent extends WebComponent</span> |
| <span class="cm"> * {</span> |
| <span class="cm"> * protected void onConfigure()</span> |
| <span class="cm"> * {</span> |
| <span class="cm"> * setVisible(Math.rand() &gt; 0.5f);</span> |
| <span class="cm"> * super.onConfigure();</span> |
| <span class="cm"> * }</span> |
| <span class="cm"> * }</span> |
| <span class="cm"> * </pre></span> |
| <span class="cm"> */</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></div> |
| |
| <ul> |
| <li><a href="http://svn.apache.org/repos/asf/wicket/releases/wicket-1.4.10/">Subversion tag</a> </li> |
| <li><a href="https://issues.apache.org/jira/secure/IssueNavigator.jspa?reset=true&mode=hide&sorter/order=DESC&sorter/field=priority&pid=12310561&fixfor=12315070">Changelog</a></li> |
| <li>To use in Maven: </li> |
| </ul> |
| |
| <div class="highlight"><pre><code class="language-xml" data-lang="xml"><span class="nt"><dependency></span> |
| <span class="nt"><groupId></span>org.apache.wicket<span class="nt"></groupId></span> |
| <span class="nt"><artifactId></span>wicket<span class="nt"></artifactId></span> |
| <span class="nt"><version></span>1.4.10<span class="nt"></version></span> |
| <span class="nt"></dependency></span></code></pre></div> |
| |
| <ul> |
| <li>Download the <a href="http://www.apache.org/dyn/closer.cgi/wicket/1.4.10">full |
| distribution</a> (including |
| source)</li> |
| </ul> |
| |
| </div> |
| <div id="clearer"></div> |
| <div id="footer"><span> |
| Copyright © 2015 — 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. |
| </span></div> |
| |
| </div> |
| </div> |
| </body> |
| </html> |