Return-Path: Delivered-To: apmail-incubator-wicket-dev-archive@locus.apache.org Received: (qmail 12124 invoked from network); 5 Jan 2007 01:30:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Jan 2007 01:30:16 -0000 Received: (qmail 12971 invoked by uid 500); 5 Jan 2007 01:30:23 -0000 Delivered-To: apmail-incubator-wicket-dev-archive@incubator.apache.org Received: (qmail 12863 invoked by uid 500); 5 Jan 2007 01:30:22 -0000 Mailing-List: contact wicket-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: wicket-dev@incubator.apache.org Delivered-To: mailing list wicket-dev@incubator.apache.org Received: (qmail 12854 invoked by uid 99); 5 Jan 2007 01:30:22 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Jan 2007 17:30:22 -0800 X-ASF-Spam-Status: No, hits=2.9 required=10.0 tests=HTML_10_20,HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of igor.vaynberg@gmail.com designates 66.249.92.173 as permitted sender) Received: from [66.249.92.173] (HELO ug-out-1314.google.com) (66.249.92.173) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Jan 2007 17:30:13 -0800 Received: by ug-out-1314.google.com with SMTP id y2so6431217uge for ; Thu, 04 Jan 2007 17:29:51 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=XztYhU1tOFZUNNdJAcrY0txoqBYFIydZo0mSm3a7GKyOiGaJfAYnsfIt+Voux4zSx6csJNlwAynL7+Isht0kBwdVnCcW27rEio1zqpQf53OYTghl4To9R9qTycr5IeXFhaYSz5jIbT5bNYDMQgNntHkqCfqbddMW0msKt6l5uNU= Received: by 10.78.201.2 with SMTP id y2mr2804951huf.1167960591437; Thu, 04 Jan 2007 17:29:51 -0800 (PST) Received: by 10.78.121.10 with HTTP; Thu, 4 Jan 2007 17:29:51 -0800 (PST) Message-ID: <23eb48360701041729u4b89d83bmaaf90a97de58ff80@mail.gmail.com> Date: Thu, 4 Jan 2007 17:29:51 -0800 From: "Igor Vaynberg" To: wicket-dev@incubator.apache.org Subject: another big 2.0 refactor MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_18159_31986527.1167960591416" X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_18159_31986527.1167960591416 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline ive been discussing with johan offline, and here is what we came up with there is still a big onattach refactor to do in 2.0. big meaning it will affect a lot of users. the contract for onattach/ondetach was that these methods are called before the framework executes any method on the component, but right now onattach is pretty much onbeginrender with the exception that you are allowed to modify the component hieararchy. take a simple case of clicking link. the story should be: currently it is 1) resolve link component 2) invoke onclick 3) invoke onattach 4) invoke onbeforerender 5) invoke render 6) invoke onafterrender 7) invoke ondetach but should be 1) resolve link component 2) invoke onattach 3) invoke onclick 4) invoke onbeforerender 5) invoke render 6) invoke onafterrender 7) invoke ondetach notice 2 and 3 are reversed as per contract of onattach but there is a problem with this. suppose link has a compound model, and inside the link you call getmodelobject() since the model belongs to link's parent shouldnt link parent's onattach be called as well? the contract says so. the only way to guarantee onattach contract is to alter the event chain to this 1) resolve link component 2) invoke page.onattach 3) invoke onclick 4) invoke onbeforerender 5) invoke render 6) invoke onafterrender 7) invoke page.ondetach this means that all code that is in onattach needs to move to onbeforerender and onbeforerender needs to be relaxed to allow changes in the component hierarchy, while onattach should not allow modification of hierarchy. this restriction is necessary so, for example, link's parent doesnt remove the link before onclick is invoked on it. invocation chain for a page set into the request cycle via setresponsepage() would be the same but with step 3 taken out. the refactor itself will be pretty easy make onbeforerender final - this will make all overrides visible move code from overrides to onattach delete onbeforerender rename onattach to onbeforerender create new onattach thoughts? -igor ------=_Part_18159_31986527.1167960591416--