Page Edited :
WICKET :
Render strategies
Render strategies has been edited by Martijn Dashorst (Apr 24, 2007). Content:Table of contents Based on a post to the Wicket-User list by Johan Compagner > what are render strategies used for? by reading the javadocs I Action part is the part where the listeners are being called (lets say the Swing Action.actionPerformed() method) For example the action part is the Link.onClicked() or the Form.onSubmit() (models updated/ database updated) After that we get the rendering/response part. And now the render strategies are kicking in. ONE_PASS_RENDERIn the same request (ONE_PASS_RENDER) so the action part and the response part are done in the same http request. REDIRECT_TO_RENDERIn a redirect request (REDIRECT_TO_RENDER) so the action part set a response page. The response phase first sets REDIRECT_TO_BUFFER (default)And we have the combination which is the default (REDIRECT_TO_BUFFER). This has the best of both worlds. No reload button problems, because we do a client side redirect, but the rendering of the page itself is already done in the first request and stored in a buffer until the redirect returns, so because of this models are only attached and detached once and listviews only alter pages in one request, not 2. This is the best option for almost all situations except a non-sticky cluster environment because the redirect could then hit a different server from that in which the response buffer is being held. For these, though, the only really viable option is setting 1. |
Unsubscribe or edit your notifications preferences